forked from AccelerateHS/accelerate-llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
135 lines (115 loc) · 4.17 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# vim: nospell
#
# Basic template to test with GHC=[7.8, 7.10, 8.0], but also installs the
# relevant version of LLVM as (a very old version of) the CUDA toolkit (4.0).
# Caches the 'stack' build directory to speed subsequent compilations.
#
language: minimal
dist: trusty
sudo: required
cache:
timeout: 600
directories:
- $HOME/.stack/snapshots
- .stack-work/install
before_cache:
- rm -rf $(stack path --local-install-root)/bin
- rm -rf $(stack path --local-install-root)/doc
addons:
apt:
sources: &apt_sources
- hvr-ghc
- ubuntu-toolchain-r-test
- llvm-toolchain-trusty
- llvm-toolchain-trusty-4.0
- llvm-toolchain-trusty-5.0
- llvm-toolchain-trusty-6.0
packages: &apt_packages
- g++-4.8
- libgmp-dev
- happy-1.19.5
- alex-3.1.7
matrix:
include:
- env: GHC=8.6.1 CABAL=2.2 LLVM=6.0.0 CUDA=8.0.61-1
compiler: "GHC 8.6"
addons:
apt:
sources: *apt_sources
packages:
- *apt_packages
- cabal-install-2.2
- llvm-6.0-dev
- env: GHC=8.4.3 CABAL=2.0 LLVM=6.0.0 CUDA=8.0.61-1
compiler: "GHC 8.4"
addons:
apt:
sources: *apt_sources
packages:
- *apt_packages
- cabal-install-2.0
- llvm-6.0-dev
- env: GHC=8.2.2 CABAL=2.0 LLVM=5.0.0 CUDA=8.0.61-1
compiler: "GHC 8.2"
addons:
apt:
sources: *apt_sources
packages:
- *apt_packages
- cabal-install-2.0
- llvm-5.0-dev
- env: GHC=8.0.2 CABAL=1.24 LLVM=4.0.0 CUDA=8.0.61-1
compiler: "GHC 8.0"
addons:
apt:
sources: *apt_sources
packages:
- *apt_packages
- cabal-install-1.24
- llvm-4.0-dev
# - env: GHC=head CABAL=head LLVM=3.9.1
# compiler: "GHC HEAD"
# addons: { apt: { sources: [ hvr-ghc, ubuntu-toolchain-r-test ], packages: [ nvidia-cuda-toolkit, g++-4.8, ghc-head, cabal-install-head, happy-1.19.5, alex-3.1.7 ] }}
allow_failures:
- env: GHC=8.6.1 CABAL=2.2 LLVM=6.0.0 CUDA=8.0.61-1
# - env: GHC=head CABAL=head LLVM=3.9.1
fast_finish: true
before_install:
- export PATH=/opt/cabal/$CABAL/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:$HOME/.cabal/bin:$PATH
# - |
# case ${GHC} in
# 7.8.*) export UPGRADE_CABAL=1 ;;
# esac
# - |
# case ${LLVM} in
# 3.5.*) source .travis/install-llvm-trusty.sh ;;
# esac
- export CUDA_INSTALL_EXTRA_LIBS=0 # cublas, cufft, etc.
- source .travis/install-cuda-trusty.sh
- source .travis/install-stack.sh
- source .travis/update-ghc-settings.sh
# ghc bug? error while loading shared libraries: libffi.so.7
# (only required for ghc-8.4+)
- export LD_LIBRARY_PATH=$(ls -d $(dirname $(stack path --compiler-bin))/lib/ghc-*/rts):$LD_LIBRARY_PATH
# build environment
- echo "$(stack exec ghc -- --version) [$(stack exec ghc -- --print-project-git-commit-id 2> /dev/null || echo '?')]"
- cabal --version
- stack --version
- llc-${LLVM:0:3} --version; true
- opt-${LLVM:0:3} --version; true
install:
# how much do we have to do?
- stack build --only-dependencies --no-terminal --dry-run
# build dependencies
- travis_retry stack build accelerate --fast --no-terminal --no-copy-bins --only-dependencies
- travis_retry travis_wait 60 stack build accelerate --fast --no-terminal --no-copy-bins
- travis_retry stack build --fast --no-terminal --no-copy-bins --only-dependencies --test
script:
- travis_retry stack build accelerate-llvm --no-terminal --test --no-run-tests --haddock --no-haddock-deps
- travis_retry stack build accelerate-llvm-native --no-terminal --test --no-run-tests --haddock --no-haddock-deps
- travis_retry stack build accelerate-llvm-ptx --no-terminal --test --no-run-tests --haddock --no-haddock-deps
# Run test suite(s)
# only use a single test thread due to limited memory on the travis boxes
- stack test accelerate-llvm-native --test-arguments='--hedgehog-tests=50 --hedgehog-shrinks=0 --timeout=30s --num-threads=1'
after_success:
- source .travis/update-accelerate-buildbot.sh