-
Notifications
You must be signed in to change notification settings - Fork 2
/
.travis.yml
90 lines (79 loc) · 2.76 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
85
86
87
88
89
90
# This is the simple Travis configuration, which is intended for use
# on applications which do not require cross-platform and
# multiple-GHC-version support. For more information and other
# options, see:
#
# https://docs.haskellstack.org/en/stable/travis_ci/
#
# 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: false
dist: bionic
# Do not choose a language; we provide our own build tools.
language: generic
addons:
apt:
packages:
- libgmp-dev
- coinor-cbc
- glpk-utils
- libglpk-dev
- lp-solve
- c2hs
homebrew:
update: true
packages:
- cbc
- glpk
matrix:
include:
- env: STACK_YAML=stack-ghc-8.10.yaml HADDOCK=1 SHC_GHCVER=8.0.1
compiler: ": #GHC 8.10.4"
- env: STACK_YAML=stack-ghc-8.10.yaml NOZLIB=1
compiler: ": #GHC 8.10.4"
- env: STACK_YAML=stack-ghc-8.8.yaml
compiler: ": #GHC 8.8.4"
- env: STACK_YAML=stack-ghc-8.8.yaml
compiler: ": #GHC 8.8.4"
os: osx
osx_image: xcode10.2
- env: STACK_YAML=stack-ghc-8.6.yaml
compiler: ": #GHC 8.6.5"
- env: STACK_YAML=stack-ghc-8.4.yaml
compiler: ": #GHC 8.4.4"
- env: STACK_YAML=stack-ghc-8.2.yaml
compiler: ": #GHC 8.2.2"
- env: STACK_YAML=stack-ghc-8.0.yaml
compiler: ": #GHC 8.0.2"
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
travis_retry curl -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 -C ~/.local/bin '*/stack'
travis_retry curl -L https://jaist.dl.sourceforge.net/project/lpsolve/lpsolve/5.5.2.5/lp_solve_5.5.2.5_exe_osx32.tar.gz | tar xz -C ~/.local/bin
else
travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
fi
install:
- if [ -n "$COVERAGE" ]; then FLAGS="$FLAGS --coverage"; fi
- if [ -n "$HADDOCK" ]; then FLAGS="$FLAGS --haddock --no-haddock-deps"; fi
- if [ -n "$NOZLIB" ]; then FLAGS="$FLAGS --flag MIP:-WithZLIB"; fi
- FLAGS="$FLAGS --flag MIP:TestCBC --flag MIP:TestGlpsol --flag MIP:TestLPSolve"
# Build dependencies
- stack --jobs 2 --no-terminal --install-ghc build --test --bench --only-dependencies $FLAGS
script:
# Build the package, its tests, and its docs and run the tests
- stack --jobs 2 --no-terminal test --bench --no-run-benchmarks $FLAGS
after_script:
- |
if [ -n "$COVERAGE" ]; then
travis_retry curl -L https://github.com/rubik/stack-hpc-coveralls/releases/download/v0.0.4.0/shc-linux-x64-$SHC_GHCVER.tar.bz2 | tar -xj
./shc combined all
fi