summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Purcell <steve@sanityinc.com>2019-10-06 16:20:03 +1300
committerSteve Purcell <steve@sanityinc.com>2019-10-07 10:04:00 +1300
commit0cd9eb44aa7274668174e7eed4d5eed85bf40dbb (patch)
tree5af28358379882dd2d5f520390bdc0b5587e9bde
parentb503cf24b54cfcc98f533af80f85feb217bab10e (diff)
Install ledger via Nix
-rw-r--r--.travis.yml31
-rwxr-xr-xtools/install-ledger.sh18
2 files changed, 30 insertions, 19 deletions
diff --git a/.travis.yml b/.travis.yml
index 9e4fce7..1fb678d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,3 @@
-sudo: required
-
language: nix
cache:
@@ -12,29 +10,24 @@ os:
# - osx # Travis is saturated; see https://www.traviscistatus.com/
env:
- - EMACS_CI=emacs-24-3 LEDGER_BRANCH=master
- - EMACS_CI=emacs-24-4 LEDGER_BRANCH=master
- - EMACS_CI=emacs-24-5 LEDGER_BRANCH=master
- - EMACS_CI=emacs-25-1 LEDGER_BRANCH=master
- - EMACS_CI=emacs-25-2 LEDGER_BRANCH=master
- - EMACS_CI=emacs-25-3 LEDGER_BRANCH=master
- - EMACS_CI=emacs-26-1 LEDGER_BRANCH=master
- - EMACS_CI=emacs-26-2 LEDGER_BRANCH=master
- - EMACS_CI=emacs-26-3 LEDGER_BRANCH=master
- - EMACS_CI=emacs-snapshot LEDGER_BRANCH=next
+ - EMACS_CI=emacs-24-3 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-24-4 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-24-5 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-25-1 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-25-2 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-25-3 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-26-1 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-26-2 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-26-3 LEDGER_VERSION=stable
+ - EMACS_CI=emacs-snapshot LEDGER_VERSION=snapshot
matrix:
allow_failures:
- - env: EMACS_CI=emacs-snapshot LEDGER_BRANCH=next
-
-before_install:
- - ./tools/travis-install-ledger.sh $LEDGER_BRANCH
- - if [ "$TRAVIS_OS_NAME" = "linux" ]; then
- export PATH=$TRAVIS_BUILD_DIR/ledger-$LEDGER_BRANCH:$PATH;
- fi
+ - env: EMACS_CI=emacs-snapshot LEDGER_VERSION=snapshot
install:
- bash <(curl https://raw.githubusercontent.com/purcell/nix-emacs-ci/master/travis-install)
+ - tools/install-ledger.sh $LEDGER_VERSION
script:
- emacs --version
diff --git a/tools/install-ledger.sh b/tools/install-ledger.sh
new file mode 100755
index 0000000..a437047
--- /dev/null
+++ b/tools/install-ledger.sh
@@ -0,0 +1,18 @@
+#!/usr/bin/env bash
+
+set -eu -o pipefail
+set -o xtrace
+
+VERSION=$1
+
+case "$VERSION" in
+ stable)
+ nix-env -iA ledger -f '<nixpkgs>'
+ ;;
+ snapshot)
+ echo "$0: snapshot version of ledger currently unsupported"
+ ;;
+ *)
+ echo "$0: Unknown branch: $VERSION"
+ ;;
+esac