forked from AccelerateHS/accelerate-llvm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
125 lines (107 loc) · 3.74 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
# 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: generic
dist: trusty
sudo: required
cache:
timeout: 600
directories:
- $HOME/.stack
- $HOME/llvm
- .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
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main'
key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key'
- sourceline: 'deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-5.0 main'
key_url: 'http://apt.llvm.org/llvm-snapshot.gpg.key'
packages: &apt_packages
- g++-4.8
- libgmp-dev
- happy-1.19.5
- alex-3.1.7
matrix:
include:
- env: GHC=7.10.3 CABAL=1.22 LLVM=4.0.0 CUDA=8.0.61-1
compiler: "GHC 7.10"
addons:
apt:
sources: *apt_sources
packages:
- *apt_packages
- cabal-install-1.22
- llvm-4.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=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=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=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
- source .travis/install-cuda-trusty.sh
- source .travis/install-stack.sh
- source .travis/update-ghc-settings.sh
- travis_retry stack install c2hs --fast --no-terminal
install:
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- cabal --version
- stack --version
- c2hs --version
- llc --version; true
- opt --version; true
# build accelerate with optimisations (required for nofib#286)
- travis_retry stack build accelerate --fast --test --no-terminal --only-dependencies --no-copy-bins
- travis_retry travis_wait stack build accelerate --no-terminal
# build other dependencies
- travis_retry stack build --fast --test --no-terminal --only-dependencies --no-copy-bins
script:
- travis_retry stack build accelerate-llvm --test --haddock --no-terminal --no-haddock-deps --no-run-tests
- travis_retry stack build accelerate-llvm-native --test --haddock --no-terminal --no-haddock-deps --no-run-tests
- travis_retry stack build accelerate-llvm-ptx --test --haddock --no-terminal --no-haddock-deps --no-run-tests
# Run test suite(s)
# Skip 7.10 due to 'RTLD_NEXT not available' (dlsym) error
- |
case ${GHC%.*} in
7.*) ;;
* ) stack test accelerate-llvm-native --test-arguments='--hedgehog-tests 50' ;;
esac
after_success:
- source .travis/update-accelerate-buildbot.sh