]> code.delx.au - gnu-emacs-elpa/commitdiff
Set up Travis CI
authorDmitry Gutov <dgutov@yandex.ru>
Sat, 11 May 2013 08:02:02 +0000 (12:02 +0400)
committerDmitry Gutov <dgutov@yandex.ru>
Sat, 11 May 2013 08:02:39 +0000 (12:02 +0400)
.travis.yml [new file with mode: 0644]
Makefile
README.md

diff --git a/.travis.yml b/.travis.yml
new file mode 100644 (file)
index 0000000..bb0a9e0
--- /dev/null
@@ -0,0 +1,24 @@
+# https://github.com/rolandwalker/emacs-travis
+
+language: emacs-lisp
+
+env:
+  matrix:
+    - EMACS=emacs24
+    - EMACS=emacs-snapshot
+
+install:
+  - if [ "$EMACS" = "emacs24" ]; then
+        sudo add-apt-repository -y ppa:cassou/emacs &&
+        sudo apt-get update -qq &&
+        sudo apt-get install -qq emacs24 emacs24-el;
+    fi
+  - if [ "$EMACS" = "emacs-snapshot" ]; then
+        sudo add-apt-repository -y ppa:cassou/emacs &&
+        sudo apt-get update -qq &&
+        sudo apt-get install -qq emacs-snapshot &&
+        sudo apt-get install -qq emacs-snapshot-el emacs-snapshot-gtk;
+    fi
+
+script:
+  make test EMACS=${EMACS}
index a710a9377c68804acb16676aeb6f90d077c3cca3..f86786fb8264dc57b64c292ced2d00cc028dfcc1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
 # -*- Makefile -*-
 
+EMACS = emacs
+
 # Compile with noninteractive and relatively clean environment.
 BATCHFLAGS = -batch -q --no-site-file
 
@@ -8,7 +10,7 @@ SRCS = js2-mode.el js2-imenu-extras.el
 OBJS = $(SRCS:.el=.elc)
 
 %.elc: %.el
-       emacs $(BATCHFLAGS) -f batch-byte-compile $^
+       ${EMACS} $(BATCHFLAGS) -f batch-byte-compile $^
 
 all: $(OBJS)
 
@@ -17,8 +19,8 @@ clean:
 
 # custom build (require loads)
 js2-imenu-extras.elc: js2-mode.elc
-       emacs $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
+       ${EMACS} $(BATCHFLAGS) -l ./js2-mode.elc -f batch-byte-compile $*.el
 
 test:
-       emacs $(BATCHFLAGS) -l js2-mode.el -l tests/parser.el\
-         -l tests/indent.el -l tests/externs.el -f ert-run-tests-batch
+       ${EMACS} $(BATCHFLAGS) -l js2-mode.el -l tests/parser.el\
+         -l tests/indent.el -l tests/externs.el -f ert-run-tests-batch-and-exit
index c83cc4146402b101aa72835cea9724312bc104c7..9065cdfe319c2665160de98893ebf45517d82f59 100644 (file)
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-About
+About [![Build Status](https://travis-ci.org/mooz/js2-mode.png?branch=master)](https://travis-ci.org/mooz/js2-mode)
 ======
 
 Improved JavaScript editing mode for GNU Emacs ([description here](http://elpa.gnu.org/packages/js2-mode.html)).