Merge pull request #121 from angerman/feature/fix-osx-ci
[ghc.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               - cabal update
22
23         - os: osx
24           before_install:
25               - brew update
26               - brew install ghc cabal-install
27               - cabal update
28               - cabal install alex happy
29               - PATH="$HOME/.cabal/bin:$PATH"
30               - export PATH
31
32
33 install:
34
35     - env
36     - ghc --version
37     - cabal --version
38     - alex --version
39     - happy --version
40
41     - travis_retry git clone git://git.haskell.org/ghc --recurse-submodules
42
43     # Travis clones the project into ".", but we need it as a child directory
44     # of "ghc/". For this reason, we - rather hackily - move the GHC-Shake
45     # ".git"  directory into the appropriate location, and perform a hard reset
46     # in order to regenerate the GHC-Shake files.
47     - mkdir ghc/shake-build
48     - mv .git ghc/shake-build
49     - ( cd ghc/shake-build && git reset --hard HEAD )
50
51     - ( cd ghc/shake-build && cabal install --only-dependencies )
52
53     - ( cd ghc && ./boot )
54     - if [ $TRAVIS_OS_NAME == osx ]; then ( cd ghc && ./configure --with-gcc="$(which clang)"); fi
55     - if [ $TRAVIS_OS_NAME == linux ]; then ( cd ghc && ./configure ); fi
56
57 script:
58     - ./ghc/shake-build/build.sh -j --no-progress
59
60 cache:
61     directories:
62         - $HOME/.cabal
63         - $HOME/.ghc
64
65 notifications:
66     irc:
67         on_success: always # always/never/change
68         on_failure: always
69         channels:
70             - "chat.freenode.net#shaking-up-ghc"
71         template:
72             - "#%{build_number} finished in %{duration}. %{message}"
73             - "Repo: %{repository_slug}, branch: %{branch}"
74             - "%{author}: %{commit_subject}"
75             - "Build details: %{build_url}"