-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
72 lines (62 loc) · 2.39 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
64
65
66
67
68
69
70
71
72
# Test against different stack LTS versions.
env:
- PEDANTIC=--pedantic RESOLVER=lts-6.11 # Most recent GHC 7.10 LTS
- PEDANTIC= RESOLVER=nightly-2016-08-13 # GHC 8.0 Nightly
# Choose a lightweight base image; we provide our own build tools.
language: python
# Install Python 3.5 for use with the Python test suite and Jupyter.
python:
- "3.5"
# Enable caching.
sudo: false
# Enable packages we need.
addons:
apt:
packages:
- libgmp-dev # GHC
# Caching so the next build will be fast too.
# These caches are the same between resolvers, but this is fine,
# as Stack differentiates between its resolvers.
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
# Not all packages are available – see before_install for from-source builds.
before_install:
# Download and unpack the stack executable
- export PATH=$HOME/.local/bin:$PATH
- mkdir -p ~/.local/bin
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# Install zeromq3 -- the package is not supported yet on Travis whitelist... (06/06/2016)
- |
if [ ! -d "$HOME/zeromq/lib" ]; then
export OLDPWD=$(pwd)
travis_retry git clone http://www.github.com/zeromq/zeromq4-x.git libzmq
mkdir $HOME/zeromq
cd libzmq
travis_retry ./autogen.sh
travis_retry ./configure --prefix=$HOME/zeromq
make
travis_retry make install
cd $OLDPWD
fi
# Install nbconvert for testing the notebook
- pip install jupyter ipykernel notebook jupyter_client
# This step takes the longest, and is what generates the Stack cache.
install:
# Set path for pkg-config to find zeromq, otherwise install of zeromq4-haskell fails.
- export PKG_CONFIG_PATH=$HOME/zeromq/lib/pkgconfig/
- stack --resolver=$RESOLVER setup
- stack --resolver=$RESOLVER build --dependencies-only
script:
- export LD_LIBRARY_PATH=$HOME/zeromq/lib
- stack --resolver=$RESOLVER build
- stack --resolver=$RESOLVER exec kernel-basic install
- stack --resolver=$RESOLVER exec kernel-stdin install
- stack --resolver=$RESOLVER exec kernel-calculator install
- stack --resolver=$RESOLVER exec python python/tests.py
- stack --resolver=$RESOLVER test $PEDANTIC
- stack --resolver=$RESOLVER clean
- stack --resolver=$RESOLVER haddock &>haddock.out
- python python/ensure_haddock_coverage.py haddock.out