Build only stage1 base library to fit into Travis 50 min limit for OSX.
[ghc.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
54     - ( cd ghc && ./boot )
55     - ( cd ghc && ./configure )
56
57 script:
58     - ./ghc/shake-build/build.sh -j --no-progress $TARGET
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}"