-
Notifications
You must be signed in to change notification settings - Fork 17
/
.travis.yml
85 lines (71 loc) · 2.4 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
73
74
75
76
77
78
79
80
81
82
83
84
# Copy these contents into the root directory of your Github project in a file
# named .travis.yml
# Use new container infrastructure to enable caching
sudo: true # to let apt-get install LAPACK/BLAS for us
# Choose a lightweight base image; we provide our own build tools.
language: c
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
- $HOME/.local/bin
# The different configurations we want to test. We have BUILD=cabal which uses
# cabal-install, and BUILD=stack which uses Stack. More documentation on each
# of those below.
#
# We set the compiler values here to tell Travis to use a different
# cache file per set of arguments.
#
# If you need to have different apt packages for each combination in the
# matrix, you can use a line such as:
matrix:
include:
- env: ARGS="" GHCVER=7.10.3 CABALVER=1.22 ALEXVER=3.1.7 HAPPYVER=1.19.5
compiler: ": #stack default"
addons: {apt: {packages: [ghc-7.10.3], sources: [hvr-ghc]}}
# # Nightly builds are allowed to fail
# - env: ARGS="--resolver nightly"
# compiler: ": #stack nightly"
# addons: {apt: {packages: [libgmp,libgmp-dev]}}
# allow_failures:
# - env: ARGS="--resolver nightly"
before_install:
# Using compiler above sets CC to an invalid value, so unset it
- sudo apt-get -qq update
- sudo apt-get install -y libblas-dev liblapack-dev
- unset CC
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.local/bin:/opt/alex/$ALEXVER/bin:/opt/happy/$HAPPYVER/bin:$HOME/.cabal/bin:$PATH
- mkdir -p ~/.local/bin
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar -xzO --wildcards '*/stack' > ~/.local/bin/stack
- chmod a+x ~/.local/bin/stack
- stack setup
- cd ..
- stack install weeder
- stack install hlint
- cd -
install:
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- if [ -f configure.ac ]; then autoreconf -i; fi
- |
set -ex
stack --no-terminal --install-ghc $ARGS test --bench --only-dependencies
set +ex
script:
- |
set -ex
stack --no-terminal $ARGS test \
--bench --no-run-benchmarks \
--haddock --no-haddock-deps
# build all libraries
stack --no-terminal $ARGS build \
reinforce \
reinforce-algorithms \
reinforce-environments \
reinforce-environments-gym \
# build all zoo examples and executables
stack --no-terminal $ARGS build reinforce-zoo
hlint .
weeder
set +ex