-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
63 lines (53 loc) · 1.71 KB
/
.travis.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
58
59
60
61
62
63
sudo: false
language: c
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
matrix:
include:
- compiler: ": # Stack LTS-7 Linux"
env: ARGS="--resolver lts-7"
os: linux
- compiler: ": # Stack LTS-7 OSX"
env: ARGS="--resolver lts-7"
os: osx
addons:
apt:
packages:
- libgmp-dev
before_install:
# Fix the build environment so we can build dependencies with gcc.
- mkdir -p $HOME/.local/{bin,lib,share,include}
- export CC=gcc
- export PATH=$HOME/.local/bin:$PATH
- export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
# Install ZMQ
- wget https://github.com/zeromq/zeromq4-1/releases/download/v4.1.5/zeromq-4.1.5.tar.gz
- tar -zxf zeromq-4.1.5.tar.gz
- pushd zeromq-4.1.5/ && ./configure --prefix=$HOME/.local && make install && popd
# Install Stack
- if [ ! -f "$HOME/.local/bin/stack" ];
then
STACK_URL="https://www.stackage.org/stack/$TRAVIS_OS_NAME-x86_64";
curl --location "$STACK_URL" > stack.tar.gz;
tar --strip-components=1 -zxf stack.tar.gz;
mv stack $HOME/.local/bin;
fi
install:
# Configure if need be.
- export PATH=$HOME/.local/bin:$PATH
- export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH
- export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
- if [ -f configure.ac ];
then
autoreconf -i;
fi
# Build.
- stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
script:
- export PATH=$HOME/.local/bin:$PATH
- export LD_LIBRARY_PATH=$HOME/.local/lib:$LD_LIBRARY_PATH
- export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH
- stack --no-terminal $ARGS test --bench --no-run-benchmarks --haddock --no-haddock-deps