summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Purcell <steve@sanityinc.com>2019-10-07 11:16:06 +1300
committerGitHub <noreply@github.com>2019-10-07 11:16:06 +1300
commit71ca5440cf03a019eaa24952e217ac10f6b6156f (patch)
tree2a0af3d8ad42eb053371aeb488587a0c8e46be9f
parenta114a537452b56f1a59ce56c58ce4b106da8a924 (diff)
parent6bbe1df7f728df202d35172fdfc2a380a67bbdac (diff)
Merge pull request #205 from ledger/use-nix-emacs-ci
Use nix emacs ci
-rw-r--r--.travis.yml49
-rw-r--r--tools/default.nix14
2 files changed, 46 insertions, 17 deletions
diff --git a/.travis.yml b/.travis.yml
index 16d40d0..05b3701 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,26 +1,41 @@
-sudo: required
-language: generic
-dist: xenial
+language: nix
+
+cache:
+ directories:
+ - ledger-master
+ - ledger-next
+
+os:
+ - linux
+ # - osx # Travis is saturated; see https://www.traviscistatus.com/
env:
- matrix:
- - EVM_EMACS=emacs-24.3-travis
- - EVM_EMACS=emacs-25.1-travis
- - EVM_EMACS=emacs-26.1-travis-linux-xenial
- - EVM_EMACS=emacs-26.3-travis-linux-xenial
- - EVM_EMACS=emacs-git-snapshot-travis-linux-xenial
-
-before_install:
- - sudo apt-get install -y ledger
- - git clone https://github.com/rejeep/evm.git $HOME/.evm
- - export PATH=$HOME/.evm/bin:$PATH
- - evm config path /tmp
- - evm install $EVM_EMACS --use --skip
+ - 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_VERSION=snapshot
+
+install:
+ - bash <(curl https://raw.githubusercontent.com/purcell/nix-emacs-ci/master/travis-install)
+ # TODO: cache builds of this using cachix
+ - nix-env -iA $LEDGER_VERSION -f tools
script:
- emacs --version
- ledger --version
- - emacs --eval "(setq byte-compile-error-on-warn (>= emacs-major-version 25))" -L . --batch -f batch-byte-compile *.el
+ # Byte compilation is known to fail in Emacs < 26.1 due to ledger-flymake.el, which should
+ # be packaged separately
+ - emacs --eval "(setq byte-compile-error-on-warn (>= emacs-major-version 26))" -L . --batch -f batch-byte-compile *.el
- make -C test test-batch
after_script:
diff --git a/tools/default.nix b/tools/default.nix
new file mode 100644
index 0000000..68fec02
--- /dev/null
+++ b/tools/default.nix
@@ -0,0 +1,14 @@
+{ pkgs ? import <nixpkgs> {} }:
+
+let
+ ledgerFromGit = builtins.fetchGit { url = git://github.com/ledger/ledger; };
+in
+{
+ stable = pkgs.ledger;
+
+ snapshot = (pkgs.callPackage ledgerFromGit {})
+ .overrideAttrs(a: {
+ doCheck = false;
+ cmakeFlags = a.cmakeFlags ++ [ "-DCMAKE_INSTALL_MANDIR=share/man" ];
+ });
+}