diff options
author | Alex Branham <alex.branham@gmail.com> | 2019-07-09 08:53:05 -0500 |
---|---|---|
committer | Alex Branham <alex.branham@gmail.com> | 2019-08-11 14:19:24 -0500 |
commit | 675a13713a66d21ba36f984f21b3fc32fc66384d (patch) | |
tree | d6ec816de793ede4d3eea499534df17fb031ef0d | |
parent | 08462cdf1e9c58c45ce3d4909bed7e69a25ed52c (diff) |
Switch CI to use EVM
-rw-r--r-- | .travis.yml | 66 | ||||
-rw-r--r-- | ledger-flymake.el | 4 | ||||
-rwxr-xr-x | tools/travis-install-ledger.sh | 48 |
3 files changed, 21 insertions, 97 deletions
diff --git a/.travis.yml b/.travis.yml index edadf85..9209c46 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,64 +1,32 @@ sudo: required - language: generic - -cache: - directories: - - ledger-master - - ledger-next - -os: - - linux - # - osx # Travis is saturated; see https://www.traviscistatus.com/ +dist: xenial env: matrix: - - EMACS_VERSION=emacs24 LEDGER_BRANCH=master - # - EMACS_VERSION=emacs24 LEDGER_BRANCH=apt-get # apt-get's ledger is too old - - EMACS_VERSION=emacs-snapshot LEDGER_BRANCH=next - -matrix: - allow_failures: - - env: EMACS_VERSION=emacs-snapshot LEDGER_BRANCH=next + - EVM_EMACS=emacs-24.3-travis + - EVM_EMACS=emacs-25.1-travis + # EVM doesn't support xenial yet, which we need since it has ledger version 3. + # See https://github.com/rejeep/evm/issues/125 + # - EVM_EMACS=emacs-26.1-travis + # - EVM_EMACS=emacs-26.2-travis + # - EVM_EMACS=emacs-git-snapshot-travis 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 - -install: - - if [ "$TRAVIS_OS_NAME-$EMACS_VERSION" = "linux-emacs24" ]; then - sudo add-apt-repository -y ppa:cassou/emacs && - sudo apt-get -qq update && - sudo apt-get -qq install emacs24 emacs24-el && - export EMACS=/usr/bin/emacs; - fi - - if [ "$TRAVIS_OS_NAME-$EMACS_VERSION" = "linux-emacs-snapshot" ]; then - sudo add-apt-repository -y ppa:ubuntu-elisp/ppa && - sudo apt-get -qq update && - sudo apt-get -qq install emacs-snapshot && - export EMACS=/usr/bin/emacs-snapshot; - fi - - if [ "$TRAVIS_OS_NAME-$EMACS_VERSION" = "osx-emacs24" ]; then - wget https://emacsformacosx.com/emacs-builds/Emacs-24.4-universal.dmg && - hdiutil attach Emacs-24.4-universal.dmg && - export EMACS=/Volumes/Emacs/Emacs.app/Contents/MacOS/Emacs; - fi - - if [ "$TRAVIS_OS_NAME-$EMACS_VERSION" = "osx-emacs25" ]; then - wget https://emacsformacosx.com/emacs-builds/Emacs-25.1-universal.dmg && - hdiutil attach Emacs-25.1-universal.dmg && - export EMACS=/Volumes/Emacs/Emacs.app/Contents/MacOS/Emacs; - fi + - 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 script: - - $EMACS --version + - emacs --version - ledger --version - - $EMACS --eval "(setq byte-compile-error-on-warn (>= emacs-major-version 25))" -L . --batch -f batch-byte-compile ledger-*.el - - cd test && make test-batch EMACS="$EMACS" + - emacs --eval "(setq byte-compile-error-on-warn (>= emacs-major-version 25))" -L . --batch -f batch-byte-compile *.el + - make -C test test-batch after_script: - - make checkdoc + - make -C test checkdoc notifications: email: false diff --git a/ledger-flymake.el b/ledger-flymake.el index 06bddd7..182efd7 100644 --- a/ledger-flymake.el +++ b/ledger-flymake.el @@ -29,6 +29,10 @@ (require 'flymake) (require 'ledger-exec) ; for `ledger-binary-path' +;; To silence byte compiler warnings in Emacs 25 and older: +(declare-function flymake-diag-region "flymake" (buffer line &optional col)) +(declare-function flymake-make-diagnostic "flymake" (buffer beg end type text &optional data overlay-properties)) + (defvar-local ledger--flymake-proc nil) (defcustom ledger-flymake-be-pedantic nil diff --git a/tools/travis-install-ledger.sh b/tools/travis-install-ledger.sh deleted file mode 100755 index e30ba3b..0000000 --- a/tools/travis-install-ledger.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/usr/bin/env bash - -set -eu -o pipefail -set -o xtrace - -BRANCH=$1 -LAST_BUILD_FILE=travis-last-build - -if [ "${TRAVIS_OS_NAME}" = "linux" ]; then - if [ "${BRANCH}" = "apt-get" ]; then - sudo apt-get update -qq - sudo apt-get install -qq ledger - else - sudo apt-get install -qq git - sudo apt-get install -qq libboost-all-dev # ledger needs Boost's runtime libraries - sudo apt-get install -qq libgmp-dev libmpfr-dev libedit-dev - - if [ ! -d "ledger-$BRANCH/.git" ]; then - git clone --depth 1 -b "$BRANCH" "https://github.com/ledger/ledger/" "ledger-$BRANCH" - fi - - cd "ledger-$BRANCH" - - git fetch origin - git reset --hard "origin/$BRANCH" - - REV="$(git rev-parse "$BRANCH")" - - if [ "$(cat "$LAST_BUILD_FILE" 2> /dev/null)" = "$REV" ]; then - echo "Build is up to date" - else - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update -qq - sudo apt-get install -qq gcc-4.8 g++-4.8 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 90 - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 90 - - cmake . - make -j2 - echo "$REV" > "$LAST_BUILD_FILE" - fi - fi -fi - -if [ "${TRAVIS_OS_NAME}" = "osx" ]; then - brew update - brew install ledger -fi |