Merge remote-tracking branch 'snowleopard/master' into angerman/feature/advanced...
[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=inplace/bin/ghc-stage1
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     - git config --global url."git://github.com/ghc/packages-".insteadOf     git://github.com/ghc/packages/
43     - git config --global url."http://github.com/ghc/packages-".insteadOf    http://github.com/ghc/packages/
44     - git config --global url."https://github.com/ghc/packages-".insteadOf   https://github.com/ghc/packages/
45     - git config --global url."ssh://git@github.com/ghc/packages-".insteadOf ssh://git@github.com/ghc/packages/
46     - git config --global url."git@github.com:/ghc/packages-".insteadOf      git@github.com:/ghc/packages/
47     - travis_retry git clone https://github.com/ghc/ghc --recurse-submodules --depth 1
48
49     # Travis clones the project into ".", but we need it as a child directory
50     # of "ghc/". For this reason, we - rather hackily - move the GHC-Shake
51     # ".git"  directory into the appropriate location, and perform a hard reset
52     # in order to regenerate the GHC-Shake files.
53     - mkdir ghc/shake-build
54     - mv .git ghc/shake-build
55     - ( cd ghc/shake-build && git reset --hard HEAD )
56
57     - ( cd ghc/shake-build && cabal install --only-dependencies )
58     - ( cd ghc/shake-build && cabal configure )
59
60     - ( cd ghc && ./boot )
61     - ( cd ghc && ./configure )
62     - cat ghc/shake-build/cfg/system.config
63
64 script:
65     - ( cd ghc/shake-build && cabal haddock --internal )
66     - ./ghc/shake-build/build.sh selftest
67     - ./ghc/shake-build/build.sh -j --no-progress $TARGET
68
69 cache:
70     directories:
71         - $HOME/.cabal
72         - $HOME/.ghc
73
74 notifications:
75     irc:
76         on_success: change # always/never/change
77         on_failure: always
78         channels:
79             - "chat.freenode.net#shaking-up-ghc"
80         template:
81             - "#%{build_number} finished in %{duration}. %{message}"
82             - "Repo: %{repository_slug}, branch: %{branch}"
83             - "%{author}: %{commit_subject}"
84             - "Build details: %{build_url}"