diff --git a/.travis.yml b/.travis.yml index f0c4da4..9e38ccf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,24 @@ -sudo: required -language: emacs-lisp +language: generic +os: linux +env: + global: + - CURL="curl -fsSkL --retry 9 --retry-delay 9" + jobs: + - EMACS_VERSION=25.1 + - EMACS_VERSION=25.2 + - EMACS_VERSION=25.3 + - EMACS_VERSION=26.1 + - EMACS_VERSION=26.2 + - EMACS_VERSION=26.3 + - EMACS_VERSION=master +jobs: + allow_failures: + - env: EMACS_VERSION=master +install: + - $CURL -O https://github.com/npostavs/emacs-travis/releases/download/bins/emacs-bin-${EMACS_VERSION}.tar.gz + - tar -xaf emacs-bin-${EMACS_VERSION}.tar.gz -C / + - export EMACS=/tmp/emacs/bin/emacs + - $EMACS --version script: ./ci/run.sh notifications: diff --git a/ci/.emacs b/ci/.emacs index 586b865..5468e9e 100644 --- a/ci/.emacs +++ b/ci/.emacs @@ -1,16 +1,17 @@ ;; bootstrap quelpa (setq package-archives nil) (package-initialize) -(unless (require 'quelpa nil t) +(unless (package-installed-p 'quelpa) (with-temp-buffer - (url-insert-file-contents "https://raw.github.com/quelpa/quelpa/master/bootstrap.el") - (eval-buffer))) + (url-insert-file-contents "https://raw.githubusercontent.com/quelpa/quelpa/master/quelpa.el") + (eval-buffer) + (quelpa-self-upgrade))) ;; install use-package (quelpa 'use-package) ;; require the library -(add-to-list 'load-path travis-ci-dir) +(add-to-list 'load-path top-dir) (require 'quelpa-use-package) ;; test some installs @@ -19,8 +20,8 @@ (use-package flx-ido :quelpa (:stable t)) (use-package flx-ido :quelpa ((flx-ido) :upgrade t)) (use-package git-modes :quelpa (git-modes :fetcher github :repo "magit/git-modes")) -(use-package git-timemachine :quelpa ((git-timemachine :fetcher github :repo "pidu/git-timemachine") :stable t)) -(use-package git-timemachine :quelpa ((git-timemachine :fetcher github :repo "pidu/git-timemachine") :upgrade t)) +(use-package git-timemachine :quelpa ((git-timemachine :fetcher gitlab :repo "pidu/git-timemachine") :stable t)) +(use-package git-timemachine :quelpa ((git-timemachine :fetcher gitlab :repo "pidu/git-timemachine") :upgrade t)) ;; test advice (setq use-package-always-ensure t) diff --git a/ci/run.sh b/ci/run.sh index 92fce1b..71de077 100755 --- a/ci/run.sh +++ b/ci/run.sh @@ -6,31 +6,9 @@ export LC_ALL=en_US.UTF-8 trap "rm -rf ~/.emacs.d/" EXIT -if [ "$USER" == "vagrant" ]; then - dir=/vagrant -else - dir="$PWD" -fi - -pwd=`pwd` - -if ! test -e /usr/local/bin/emacs; then - { - >&2 echo "--- installing deps ---" - sudo apt-get update - sudo apt-get -y install build-essential wget git mercurial - sudo apt-get -y build-dep emacs23 - wget http://ftp.gnu.org/gnu/emacs/emacs-25.3.tar.gz -O- | tar xz - cd emacs-25.3 - >&2 echo "--- building emacs ---" - ./configure &&\ - make &&\ - sudo make install - sudo apt-get install -y -qq git - } > /dev/null -fi +dir="$PWD" echo "--- running tests ---" -emacs --batch --eval "(setq travis-ci-dir \"$dir\")" --load $dir/ci/.emacs +${EMACS} --batch --eval "(defvar top-dir \"$dir\")" --load $dir/ci/.emacs rm -rf ~/.emacs.d/