2020-01-12 11:52:40 -08:00
|
|
|
dist: bionic # needed for KVM
|
2020-01-12 11:52:33 -08:00
|
|
|
language: shell
|
2019-07-19 09:41:36 -07:00
|
|
|
|
2019-11-27 05:04:48 -08:00
|
|
|
install:
|
2020-06-23 02:22:39 -07:00
|
|
|
- curl -L https://nixos.org/nix/install | sh
|
2019-11-27 05:04:48 -08:00
|
|
|
- . /home/travis/.nix-profile/etc/profile.d/nix.sh
|
|
|
|
- if [[ $STABLE == 1 ]]; then export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs)"; fi
|
|
|
|
- if [[ $STABLE == 0 ]]; then export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs-unstable)"; fi
|
2020-01-12 11:52:35 -08:00
|
|
|
- nix-env -iA cachix -f https://cachix.org/api/v1/install
|
|
|
|
- cachix use nix-bitcoin
|
2019-11-27 05:04:48 -08:00
|
|
|
- VER="$(nix eval nixpkgs.lib.version)"
|
2019-07-19 09:41:36 -07:00
|
|
|
env:
|
2020-01-12 11:52:36 -08:00
|
|
|
global:
|
|
|
|
# CACHIX_SIGNING_KEY
|
|
|
|
- secure: "xXCFZ7g+k5YmCGm8R8l3bZElVmt+RD1KscG3kGr5w4HyyDPTzFetPo+sT8bUpysDU0u3HWhfVhHtpog2mhNhwVl3tQwKXea3dHKC1i6ypBg3gjDngmJRR5wo++ocYDpK8qPaU7m/jHQTNFnTA4CbmMcc05GcYx/1Ai/ZGkNwWFjdIcVeOUoiol33gykMOXIGDg2qlXudt33wP53FHbX8L4fxzodWfAuxKK4AoGprxy5eSnU7LCaXxxJmu4HwuV+Ux2U1NfE/E33cvhlUvTQCswVSZFG06mg8rwhMG1ozsDvlL2itZlu/BeUQH5y3XMMlnJIUXUazkRBibf1w/ebVjpOF+anqkqmq8tcbFEa7T+RJeVTIsvP+L8rE8fcmuZtdg9hNmgRnLmaeT0vVwD1L2UqW9HdRyujdoS0jPYuoc1W7f1JQWfAPhBPQ1SrtKyNNqcbVJ34aN7b+4vCzRpQL1JTbmjzQIWhkiKN1qMo1v/wbIydW8yka4hc4JOfdQLaAJEPI1eAC1MLotSAegMnwKWE1dzm66MuPSipksYjZrvsB28cV4aCVUffIuRhrSr1i2afRHwTpNbK9U4/576hah15ftUdR79Sfkcoi1ekSQTFGRvkRIPYtkKLYwFa3jVA41qz7+IIZCf4TsApy3XDdFx91cRub7yPq9BeZ83A+qYQ="
|
2020-01-12 11:52:33 -08:00
|
|
|
jobs:
|
2020-07-16 07:49:36 -07:00
|
|
|
- TestModules=1 STABLE=1 SCENARIO=default
|
2020-09-27 03:43:19 -07:00
|
|
|
- TestModules=1 STABLE=1 SCENARIO=netns
|
2020-10-29 13:20:28 -07:00
|
|
|
- TestModules=1 STABLE=1 SCENARIO=netnsRegtest
|
2019-07-19 09:41:36 -07:00
|
|
|
- PKG=hwi STABLE=1
|
2020-04-26 11:51:28 -07:00
|
|
|
- PKG=hwi STABLE=0
|
2019-07-19 09:41:36 -07:00
|
|
|
- PKG=lightning-charge STABLE=1
|
|
|
|
- PKG=lightning-charge STABLE=0
|
|
|
|
- PKG=nanopos STABLE=1
|
|
|
|
- PKG=nanopos STABLE=0
|
|
|
|
- PKG=spark-wallet STABLE=1
|
|
|
|
- PKG=elementsd STABLE=1
|
|
|
|
- PKG=elementsd STABLE=0
|
|
|
|
- PKG=electrs STABLE=1
|
2020-04-28 14:56:15 -07:00
|
|
|
- PKG=electrs STABLE=0
|
2019-10-13 13:27:08 -07:00
|
|
|
- PKG=liquid-swap STABLE=1
|
2020-07-10 07:09:31 -07:00
|
|
|
- PKG=lightning-loop STABLE=0
|
2020-02-19 08:35:42 -08:00
|
|
|
- PKG=nixops19_09 STABLE=1
|
2020-05-18 02:51:18 -07:00
|
|
|
- PKG=joinmarket STABLE=1
|
|
|
|
- PKG=joinmarket STABLE=0
|
2020-11-18 18:01:45 -08:00
|
|
|
- PKG=clightning-plugins-all STABLE=1
|
2019-11-27 05:04:48 -08:00
|
|
|
script:
|
|
|
|
- printf '%s (%s)\n' "$NIX_PATH" "$VER"
|
2020-01-12 11:52:40 -08:00
|
|
|
- |
|
|
|
|
getBuildExpr() {
|
|
|
|
if [[ $TestModules ]]; then
|
|
|
|
if [[ ! -e /dev/kvm ]]; then
|
|
|
|
>&2 echo "No KVM available on VM Host."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
sudo chmod go+rw /dev/kvm
|
2020-07-16 07:49:36 -07:00
|
|
|
test/run-tests.sh --scenario $SCENARIO exprForCI
|
2020-01-12 11:52:40 -08:00
|
|
|
else
|
|
|
|
echo "(import ./. {}).$PKG"
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
- buildExpr=$(getBuildExpr)
|
|
|
|
- time nix-instantiate -E "$buildExpr" --add-root ./drv --indirect
|
2020-01-12 11:52:36 -08:00
|
|
|
- outPath=$(nix-store --query ./drv)
|
|
|
|
- |
|
|
|
|
if nix path-info --store https://nix-bitcoin.cachix.org $outPath &>/dev/null; then
|
|
|
|
echo "$outPath" has already been built successfully.
|
|
|
|
travis_terminate 0
|
|
|
|
fi
|
|
|
|
# Travis doesn't expose secrets to pull-request builds,
|
|
|
|
# so skip cache uploading in this case
|
|
|
|
- |
|
|
|
|
if [[ $CACHIX_SIGNING_KEY ]]; then
|
|
|
|
cachix push nix-bitcoin --watch-store &
|
|
|
|
cachixPid=$!
|
|
|
|
fi
|
|
|
|
- nix-build ./drv
|
|
|
|
- |
|
|
|
|
if [[ $CACHIX_SIGNING_KEY ]]; then
|
|
|
|
# Wait until cachix has finished uploading
|
|
|
|
# Run as root because yama/ptrace_scope != 0
|
|
|
|
ruby=$(nix-build '<nixpkgs>' -A ruby)/bin/ruby
|
|
|
|
time sudo $ruby helper/wait-for-network-idle.rb $cachixPid
|
|
|
|
fi
|