Can we put addons and before_install into the include?
[hadrian.git] / .travis.yml
1 sudo: false
2
3 matrix:
4     include:
5         - os: linux
6           env: CABALVER=1.22 GHCVER=7.10.3
7           addons:
8               apt:
9                   packages:
10                       - ghc-7.10.3
11                       - alex-3.1.4
12                       - happy-1.19.5
13                       - cabal-install-1.22
14                       - zlib1g-dev
15                   sources: hvr-ghc
16           before_install:
17               - PATH="/opt/ghc/$GHCVER/bin:$PATH"
18               - PATH="/opt/cabal/$CABALVER/bin:$PATH"
19               - PATH="$HOME/.cabal/bin:$PATH"
20               - export PATH
21         - os: osx
22           before_install:
23               - brew update
24               - brew install ghc cabal-install
25               - cabal update
26               - cabal install alex happy
27               - PATH="$HOME/.cabal/bin:$PATH"
28               - export PATH
29
30 before_install:
31     - env
32     - ghc --version
33     - cabal --version
34     - alex --version
35     - happy --version
36     - cabal update
37
38 install:
39
40     - travis_retry git clone git://git.haskell.org/ghc --recurse-submodules
41
42     # Travis clones the project into ".", but we need it as a child directory
43     # of "ghc/". For this reason, we - rather hackily - move the GHC-Shake
44     # ".git"  directory into the appropriate location, and perform a hard reset
45     # in order to regenerate the GHC-Shake files.
46     - mkdir ghc/shake-build
47     - mv .git ghc/shake-build
48     - ( cd ghc/shake-build && git reset --hard HEAD )
49
50     - ( cd ghc/shake-build && cabal install --only-dependencies )
51
52     - ( cd ghc && ./boot )
53     - ( cd ghc && ./configure )
54
55 script:
56     - ./ghc/shake-build/build.sh -j --no-progress
57
58 cache:
59     directories:
60         - $HOME/.cabal