From: Dmitry Gutov Date: Sat, 11 May 2013 08:02:02 +0000 (+0400) Subject: Set up Travis CI X-Git-Url: https://code.delx.au/gnu-emacs-elpa/commitdiff_plain/757ae4bcc18549e85b3131664ca3639a759ad162 Set up Travis CI --- diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..bb0a9e077 --- /dev/null +++ b/.travis.yml @@ -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} diff --git a/Makefile b/Makefile index a710a9377..f86786fb8 100644 --- 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 diff --git a/README.md b/README.md index c83cc4146..9065cdfe3 100644 --- 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)).