on master help sign in
add build and test ci job for local jenkins system
commite16314596896111cb2f585e9aec5900c7c364441 authorCorey O'Connor <coreyoconnor@gmail.com> dateSun 6 Apr 2014, 23:33 (13 years ago) parenteaef624
1 file changed+42
ci/build-and-test+42
ci/build-and-testnew file+42
@@ -0,0 +1,42 @@
1+#!/usr/bin/env bash
2+set -ex
3+
4+source /etc/profile
5+
6+function init-sandbox() {
7+ cabal sandbox init
8+}
9+
10+function build() {
11+ if [[ "${GHCVER}" > "7.4.2" ]] ; then
12+ cabal install --enable-tests --only-dependencies --force-reinstalls
13+ else
14+ echo "Skipping tests on ${GHCVER}"
15+ cabal install --only-dependencies --force-reinstalls
16+ fi
17+}
18+
19+function rebuild() {
20+ rm -rf dist
21+ build
22+}
23+
24+function rebuild-including-deps() {
25+ rm -rf .cabal-sandbox
26+ rm -rf cabal.sandbox.config
27+ init-sandbox
28+ build
29+}
30+
31+set -ex
32+
33+cd vty
34+if [[ ! -f cabal.sandbox.config ]] ; then
35+ init-sandbox
36+fi
37+
38+build || rebuild || rebuild-including-deps
39+
40+if [[ "${GHCVER}" > "7.4.2" ]] ; then
41+ cabal test
42+fi