Add cabal configure to CI
[hadrian.git] / .travis.yml
1 sudo: false
2
3 matrix:
4     include:
5         - os: linux
6           env: CABALVER=1.22 GHCVER=7.10.3 TARGET=
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               - cabal update
22
23         - os: osx
24           env: TARGET=libraries/base/stage1/build/libHSbase-4.9.0.0.a
25           before_install:
26               - brew update
27               - brew install ghc cabal-install
28               - cabal update
29               - cabal install alex happy
30               - PATH="$HOME/.cabal/bin:$PATH"
31               - export PATH
32
33
34 install:
35
36     - env
37     - ghc --version
38     - cabal --version
39     - alex --version
40     - happy --version
41
42     - travis_retry git clone git://git.haskell.org/ghc --recurse-submodules
43
44     # Travis clones the project into ".", but we need it as a child directory
45     # of "ghc/". For this reason, we - rather hackily - move the GHC-Shake
46     # ".git"  directory into the appropriate location, and perform a hard reset
47     # in order to regenerate the GHC-Shake files.
48     - mkdir ghc/shake-build
49     - mv .git ghc/shake-build
50     - ( cd ghc/shake-build && git reset --hard HEAD )
51
52     - ( cd ghc/shake-build && cabal install --only-dependencies )
53     - ( cd ghc/shake-build && cabal configure )
54
55     - ( cd ghc && ./boot )
56     - ( cd ghc && ./configure )
57
58 script:
59     - ( cd ghc/shake-build && cabal haddock --internal )
60     - ./ghc/shake-build/build.sh -j --no-progress $TARGET
61
62 cache:
63     directories:
64         - $HOME/.cabal
65         - $HOME/.ghc
66
67 notifications:
68     irc:
69         on_success: always # always/never/change
70         on_failure: always
71         channels:
72             - "chat.freenode.net#shaking-up-ghc"
73         template:
74             - "#%{build_number} finished in %{duration}. %{message}"
75             - "Repo: %{repository_slug}, branch: %{branch}"
76             - "%{author}: %{commit_subject}"
77             - "Build details: %{build_url}"