-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
59 lines (50 loc) · 1.44 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# vim: hlsearch sw=2 ts=2 et :
image: ubuntu:xenial
cache:
key: ${CI_COMMIT_BRANCH}
stages:
- build
build-binaries:
stage: build
parallel:
matrix:
- FOO: x
BUILD_GHC_OPTIONS: |
ghc-options: {'jni': '-v -ddump-splices', 'jvm': '-v -ddump-splices'}
- FOO: x
BUILD_GHC_OPTIONS: |
# nothing
#also try
# BUILD_GHC_OPTIONS: "ghc-options: {'jni': '-v -ddump-splices'}"
script:
- echo "$CI_COMMIT_BRANCH"
- |
set -euxo pipefail
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
gcc \
libc6-dev \
libgmp-dev \
libtinfo-dev \
locales \
make \
openjdk-8-jdk-headless \
openjdk-8-jre-headless \
xz-utils
locale-gen "en_US.UTF-8"
export STACK_URL=https://github.com/commercialhaskell/stack/releases/download/v2.5.1/stack-2.5.1-linux-x86_64.tar.gz
curl -L "${STACK_URL}" | tar xz --wildcards --strip-components=1 -C /usr/bin '*/stack'
stack --resolver=lts-12 setup
echo "${BUILD_GHC_OPTIONS}" >> stack.yaml
cat -n stack.yaml
stack build --fast --dry-run
stack build --fast
LD_LIBRARY_PATH=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server stack exec app > out
if [ `cat out` == "1.2345" ] ; then
echo "success";
else
echo "failed, got" `cat out`;
exit 1;
fi