/
.travis.yml
49 lines (39 loc) · 1.25 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
language: c
sudo: false
git:
submodules: false
addons:
apt:
sources:
- hvr-ghc
packages:
- libgmp-dev
- cabal-install-1.22
- alex-3.1.4
- happy-1.19.5
before_install:
- unset CC
- export PATH=$HOME/ghc/bin:/opt/cabal/1.22/bin:$PATH
install:
# install ghc
- if [ ! -d "$HOME/ghc/bin" ]; then travis_retry wget https://www.haskell.org/ghc/dist/7.8.4/ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz; fi
- if [ ! -d "$HOME/ghc/bin" ]; then tar xf ghc-7.8.4-x86_64-unknown-linux-deb7.tar.xz; fi
- if [ ! -d "$HOME/ghc/bin" ]; then (cd ghc-7.8.4 && ./configure --prefix $HOME/ghc && make install); fi
# Fetch the latest package list from hackage
- travis_retry cabal update
# Install the Cabal library which matches what cabal-install was built against
- export CABAL_VERSION=$(cabal --version | sed -n '/using version /s/^[^0-9]*\([0-9\.]*\).*$/\1/p')
- cabal install Cabal-$CABAL_VERSION
# Check the versions of everything installed
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- ghc-pkg list
script:
- ./bin/ci
# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.cabal
- $HOME/.ghc
- $HOME/.ambiata
- $HOME/ghc