aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2018-07-14 17:41:12 -0400
committerKyle Meyer <kyle@kyleam.com>2018-07-14 17:49:28 -0400
commit351b91f3c9b255751525b3b9b2e4f51cf9474ab0 (patch)
tree1cb26be361149ee87903f5797c6a1c108f733df9
parentd3d45177feebe1c709607e5e9fcfc02df4172150 (diff)
downloadannexview-351b91f3c9b255751525b3b9b2e4f51cf9474ab0.tar.gz
Set up GitLab CI
I'm not familiar with GitLab CI, so I'm probably doing something stupid here, but, after much tweaking, this at least should set up two jobs (no magit, magit) that pass (well...after the next commit).
-rw-r--r--.gitlab-ci.yml65
1 files changed, 65 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..2d02be9
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,65 @@
+image: ubuntu:trusty
+
+stages:
+ - build
+ - test
+
+variables:
+ EMACS_VERSION: "25.1"
+ CURL: "curl -fsSkL --retry 9 --retry-delay 9"
+ GHRAW: "https://raw.githubusercontent.com"
+
+before_script:
+ - apt-get update -qq && apt-get install -y -qq curl make libxml2
+
+cache:
+ paths:
+ - git-annex-standalone-amd64.tar.gz
+ - emacs.tar.gz
+ policy: pull
+
+download_dependencies:
+ stage: build
+ script:
+ - $CURL -O https://downloads.kitenet.net/git-annex/linux/current/git-annex-standalone-amd64.tar.gz
+ - $CURL -o emacs.tar.gz https://github.com/npostavs/emacs-travis/releases/download/bins/emacs-bin-${EMACS_VERSION}.tar.gz
+ artifacts:
+ expire_in: 1 day
+ paths:
+ - git-annex-standalone-amd64.tar.gz
+ - emacs.tar.gz
+
+.setup_dependencies: &setup_dependencies |
+ tar -xaf git-annex-standalone-amd64.tar.gz
+ tar -xaf emacs.tar.gz -C /
+ export PATH="$PWD/git-annex.linux${PATH:+:}$PATH"
+ export EMACS=/tmp/emacs/bin/emacs
+ git config --global user.name "A U Thor"
+ git config --global user.email a.u.thor@example.com
+
+.install_magit: &install_magit |
+ git clone --quiet https://github.com/magit/magit.git
+ cd magit
+ $CURL -O ${GHRAW}/magnars/dash.el/master/dash.el
+ $CURL -O ${GHRAW}/magit/ghub/master/ghub.el
+ $CURL -O ${GHRAW}/magit/magit-popup/master/magit-popup.el
+ $CURL -O ${GHRAW}/magit/with-editor/master/with-editor.el
+ $EMACS -Q --batch -L . -f batch-byte-compile dash.el ghub.el magit-popup.el with-editor.el
+ make lisp EMACSBIN=$EMACS DASH_DIR=$PWD
+ cd ..
+ $EMACS --batch -L magit -L magit/lisp --eval "(progn (require 'magit) (magit-version t))"
+
+test:no-magit:
+ stage: test
+ script:
+ - *setup_dependencies
+ - make EMACSBIN=$EMACS
+ - make test EMACSBIN=$EMACS
+
+test:magit:
+ stage: test
+ script:
+ - *setup_dependencies
+ - *install_magit
+ - make EMACSBIN=$EMACS LOAD_PATH="-L magit -L magit/lisp"
+ - make test EMACSBIN=$EMACS LOAD_PATH="-L magit -L magit/lisp"