Make dependencies easier to copy
[hadrian.git] / .travis.yml
1 sudo: true
2
3 matrix:
4     include:
5         - os: linux
6           env: CABALVER=1.22 GHCVER=7.10.3 FLAVOUR=quickest TARGET=
7           addons:
8               apt:
9                   packages:
10                       - ghc-7.10.3
11                       - cabal-install-1.22
12                       - zlib1g-dev
13                   sources: hvr-ghc
14           before_install:
15               - PATH="/opt/ghc/$GHCVER/bin:$PATH"
16               - PATH="/opt/cabal/$CABALVER/bin:$PATH"
17               - PATH="$HOME/.cabal/bin:$PATH"
18               - export PATH
19               - cabal update
20               - cabal install alex happy
21
22         - os: osx
23           env: FLAVOUR=quickest TARGET=
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 install:
33     - env
34     - ghc --version
35     - cabal --version
36     - alex --version
37     - happy --version
38
39     - git config --global url."git://github.com/ghc/packages-".insteadOf     git://github.com/ghc/packages/
40     - git config --global url."http://github.com/ghc/packages-".insteadOf    http://github.com/ghc/packages/
41     - git config --global url."https://github.com/ghc/packages-".insteadOf   https://github.com/ghc/packages/
42     - git config --global url."ssh://git@github.com/ghc/packages-".insteadOf ssh://git@github.com/ghc/packages/
43     - git config --global url."git@github.com:/ghc/packages-".insteadOf      git@github.com:/ghc/packages/
44     - travis_retry git clone https://github.com/ghc/ghc --recurse-submodules --depth 1
45
46     # Travis clones the project into ".", but we need it as a child directory
47     # of "ghc/". For this reason, we - rather hackily - move the GHC-Shake
48     # ".git"  directory into the appropriate location, and perform a hard reset
49     # in order to regenerate the GHC-Shake files.
50     - mkdir ghc/hadrian
51     - mv .git ghc/hadrian
52     - ( cd ghc/hadrian && git reset --hard HEAD )
53
54     - ( cd ghc/hadrian && cabal install --only-dependencies )
55     - ( cd ghc/hadrian && cabal configure )
56
57     - ghc-pkg list
58
59 script:
60     - ( cd ghc/hadrian && cabal haddock --internal )
61     - ./ghc/hadrian/build.sh selftest
62     - ./ghc/hadrian/build.sh -j --verbose --no-progress --progress-colour=never --profile=- --flavour=$FLAVOUR $TARGET
63     - ./ghc/inplace/bin/ghc-stage2 -e 1+2
64
65 cache:
66     directories:
67         - $HOME/.cabal
68         - $HOME/.ghc
69
70 notifications:
71     irc:
72         on_success: change # always/never/change
73         on_failure: always
74         channels:
75             - "chat.freenode.net#shaking-up-ghc"
76         template:
77             - "#%{build_number} finished in %{duration}. %{message}"
78             - "Repo: %{repository_slug}, branch: %{branch}"
79             - "%{author}: %{commit_subject}"
80             - "Build details: %{build_url}"