-
Notifications
You must be signed in to change notification settings - Fork 131
/
.travis.yml
54 lines (49 loc) · 2.29 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
# NB: don't set `language: haskell` here
# The following enables several GHC versions to be tested; often it's enough to test only against
# the last release in a major GHC version. Feel free to omit lines listings versions you don't
# need/want testing for.
env:
- CABALVER=1.18 GHCVER=7.8.4 LLVMVER=4.0
- CABALVER=1.22 GHCVER=7.10.1 LLVMVER=4.0
- CABALVER=1.22 GHCVER=7.10.2 LLVMVER=4.0
- CABALVER=1.24 GHCVER=8.0.2 LLVMVER=4.0
# - CABALVER=head GHCVER=head # see section about GHC HEAD snapshots
# Note: the distinction between `before_install` and `install` is not important.
before_install:
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
- travis_retry sudo apt-get update
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH:$HOME/.cabal/bin:$PATH
- travis_retry sudo apt-get install happy-1.19.5 alex-3.1.3
- export PATH=/opt/alex/3.1.3/bin:/opt/happy/1.19.4/bin:$PATH
# update gcc and g++
- gcc --version
- g++ --version
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo apt-get update -qq
- sudo apt-get install -qq g++-5 gcc-5
- gcc --version
- g++ --version
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 90
- sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-5 90
- gcc --version
- g++ --version
# update llvm
- wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key|sudo apt-key add -
- travis_retry sudo add-apt-repository "deb http://apt.llvm.org/precise/ llvm-toolchain-precise main"
- travis_retry sudo add-apt-repository "deb http://apt.llvm.org/precise/ llvm-toolchain-precise-$LLVMVER main"
- travis_retry sudo apt-get update
- sudo apt-get install libedit-dev -y
- sudo apt-get install -y llvm-$LLVMVER llvm-$LLVMVER-dev
- alias llvm-config="llvm-config-4.0"
#- sudo ln -s /usr/bin/opt-$LLVMVER /usr/bin/opt
- export PATH="/usr/bin:$PATH"
install:
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- travis_retry cabal update
- travis_retry cabal install -j4 --only-dependencies
# Here starts the actual work to be performed for the package under test; any command which exits
# with a non-zero exit code causes the build to fail.
script:
- cabal install