Skip to content

Commit

Permalink
Merge pull request #12 from tsuu32/fix/ci
Browse files Browse the repository at this point in the history
update travis ci
  • Loading branch information
steckerhalter committed Mar 8, 2020
2 parents dd908f0 + a83ba63 commit 00ce667
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 32 deletions.
23 changes: 21 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
13 changes: 7 additions & 6 deletions ci/.emacs
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down
26 changes: 2 additions & 24 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/

0 comments on commit 00ce667

Please sign in to comment.