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