summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--.travis.yml12
-rw-r--r--Makefile8
-rwxr-xr-xvagrant/provision.sh33
4 files changed, 40 insertions, 14 deletions
diff --git a/.gitignore b/.gitignore
index eb73962e..f058d2db 100644
--- a/.gitignore
+++ b/.gitignore
@@ -8,3 +8,4 @@ elpa
TAGS
.DS_STORE
dist
+.vagrant/
diff --git a/.travis.yml b/.travis.yml
index 14b57b59..59d0a8aa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,9 +1,13 @@
+sudo: true
language: emacs-lisp
env:
- - EMACS=emacs24
-# - EMACS=emacs-snapshot
+ - EMACS_BINARY=emacs-24.3-bin PATH=$HOME/.evm/bin:$PATH
+ - EMACS_BINARY=emacs-24.4-bin PATH=$HOME/.evm/bin:$PATH
+ - EMACS_BINARY=emacs-24.5-bin PATH=$HOME/.evm/bin:$PATH
+ - EMACS_BINARY=emacs-snapshot
+
before_script:
- sh vagrant/provision.sh
- - make EMACS=${EMACS} elpa
+ - make elpa
script:
- - make EMACS=${EMACS} test \ No newline at end of file
+ - make test
diff --git a/Makefile b/Makefile
index 66a0c6bb..ee8ac236 100644
--- a/Makefile
+++ b/Makefile
@@ -21,11 +21,13 @@ elpa:
$(CASK) update
touch $@
-.PHONY: build
+.PHONY: build version
build : elpa $(OBJECTS)
-.PHONY: test
-test : build
+version:
+ $(EMACS) --version
+
+test : version build
$(CASK) exec $(EMACS) --no-site-file --no-site-lisp --batch \
$(EMACSFLAGS) \
-l test/run-tests
diff --git a/vagrant/provision.sh b/vagrant/provision.sh
index 1837f2c1..452e22f7 100755
--- a/vagrant/provision.sh
+++ b/vagrant/provision.sh
@@ -12,16 +12,35 @@ apt () {
sudo apt-get install -yy "$@"
}
+install_emacs() {
+ # no EMACS version is specified use snapshot.
+ if [ -z $EMACS_BINARY ];then
+ export EMACS_BINARY=emacs-snapshot
+ fi
+ echo $EMACS_BINARY
+
+ if [ $EMACS_BINARY = "emacs-snapshot" ]; then
+ ppa ppa:ubuntu-elisp/ppa
+ apt_update
+ apt emacs-snapshot emacs-snapshot-el
+ else
+ apt_update
+ apt git
+ # evm install
+ sudo mkdir -p /usr/local/evm
+ sudo chown $USER: /usr/local/evm
+ curl -fsSkL https://raw.github.com/rejeep/evm/master/go | bash
+ export PATH=$HOME/.evm/bin:$PATH
+ evm install $EMACS_BINARY
+ evm use $EMACS_BINARY
+ fi
+}
+
# Silence debconf
export DEBIAN_FRONTEND='noninteractive'
-# Bring in the necessary PPAs
-ppa ppa:cassou/emacs
-apt_update
-
-# Install Emacs 24.x and Emacs snapshot
-apt emacs24 emacs24-el emacs24-common-non-dfsg \
- emacs-snapshot emacs-snapshot-el
+install_emacs
+emacs --version
# Install Cask for Emacs dependency management
CASK_VERSION=0.7.2