From 190a92507cf395a359912f777c470cdd4d6dbef5 Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Wed, 27 Nov 2019 14:04:48 +0100 Subject: [PATCH] travis: split up scripts into statements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Advantages: - The build fails if a statement fails. Previously, errors in all but the last statement were silently ignored. - The Travis log gives a fine-grained view of the output of each statement. Add if statements because the '[…] &&' prefix results in YAML syntax errors. --- .travis.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2846259..6259587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,19 +3,19 @@ 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)" +install: + # 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 + - (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 + - 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 + - VER="$(nix eval nixpkgs.lib.version)" env: matrix: - PKG=nodeinfo STABLE=1 @@ -29,6 +29,6 @@ env: - PKG=elementsd STABLE=0 - PKG=electrs STABLE=1 - PKG=liquid-swap STABLE=1 -script: | - printf '%s (%s)\n' "$NIX_PATH" "$VER" - nix-build -A $PKG +script: + - printf '%s (%s)\n' "$NIX_PATH" "$VER" + - nix-build -A $PKG