Merge #95: Add travis ci builds

aabf4a4730 travis: remove cachix push (William Casarin)
8e751c5f3c travis: disable unstable electrs, it is broken (William Casarin)
1e3afa54c5 travis: add travis yml (William Casarin)
d7d35b875a nixpkgs-pinned: fetch a tarball instead (William Casarin)

Pull request description:

  This builds everything to make sure everything works on either the latest release or unstable branch. In the future we could do more interesting nixops builds to test modules, but for now we just nix-build everything and make sure it compiles.

  We test the build with two different versions of nixpkgs:

    - nixpkgs-channels/nixos-19.03
    - nixpkgs-channels/nixos-unstable

ACKs for top commit:
  jonasnick:
    ACK aabf4a4730

Tree-SHA512: 7241552e65fe2e5325f23e271eeb1f87bdf59c85e5dbd8263326d14340bbbee17163d5cb9df3f562c86182b0585ab766fefddea627ee45f0cf8258b85ece6404
This commit is contained in:
Jonas Nick 2019-09-24 08:13:46 +00:00
commit 4fe9d5b5a0
No known key found for this signature in database
GPG Key ID: 4861DBF262123605
2 changed files with 40 additions and 10 deletions

35
.travis.yml Normal file
View File

@ -0,0 +1,35 @@
language: minimal
# broken:
# - PKG=electrs STABLE=0
# Retry installing nix due to nondeterministic error
# Fatal error: glibc detected an invalid stdio handle
# see:
# https://github.com/nh2/static-haskell-nix/pull/27#issuecomment-502652181
# https://github.com/nixos/nix/issues/2733
install: |
(for i in {1..5}; do bash <(curl https://nixos.org/nix/install) && exit 0; done; exit 1)
. /home/travis/.nix-profile/etc/profile.d/nix.sh
nix-env -iA cachix -f https://cachix.org/api/v1/install
cachix use nix-bitcoin
[ $STABLE -eq 1 ] && export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs)"
[ $STABLE -eq 0 ] && export NIX_PATH="nixpkgs=$(nix eval --raw -f pkgs/nixpkgs-pinned.nix nixpkgs-unstable)"
VER="$(nix eval nixpkgs.lib.version)"
env:
matrix:
- PKG=nodeinfo STABLE=1
- PKG=hwi STABLE=1
- PKG=hwi STABLE=0
- PKG=lightning-charge STABLE=1
- PKG=lightning-charge STABLE=0
- PKG=nanopos STABLE=1
- PKG=nanopos STABLE=0
- PKG=spark-wallet STABLE=1
- PKG=spark-wallet STABLE=0
- PKG=elementsd STABLE=1
- PKG=elementsd STABLE=0
- PKG=electrs STABLE=1
script: |
printf '%s (%s)\n' "$NIX_PATH" "$VER"
nix-build -A $PKG

View File

@ -1,12 +1,7 @@
let
fetch = rev: builtins.fetchTarball "https://github.com/nixos/nixpkgs-channels/archive/${rev}.tar.gz";
in
{ {
nixpkgs = builtins.fetchGit { nixpkgs = fetch "e6ad5e75f3bfaab5e7b7f0f128bf13d534879e65";
url = "https://github.com/nixos/nixpkgs-channels"; nixpkgs-unstable = fetch "765a71f15025ce78024bae3dc4a92bd2be3a8fbf";
ref = "nixos-19.03";
rev = "e6ad5e75f3bfaab5e7b7f0f128bf13d534879e65";
};
nixpkgs-unstable = builtins.fetchGit {
url = "https://github.com/nixos/nixpkgs-channels";
ref = "nixos-unstable";
rev = "765a71f15025ce78024bae3dc4a92bd2be3a8fbf";
};
} }