Add an acknowledgement to Zhen Zhang
[hadrian.git] / .travis.yml
1 sudo: true
2 language: haskell
3 matrix:
4     include:
5         - os: linux
6           env: MODE="--flavour=quickest"
7           compiler: "GHC 8.0.2"
8           addons:
9               apt:
10                   packages:
11                       - ghc-8.0.2
12                       - cabal-install-2.0
13                       - zlib1g-dev
14                   sources: hvr-ghc
15
16           before_install:
17               - PATH="/opt/ghc/8.0.2/bin:$PATH"
18               - PATH="/opt/cabal/2.0/bin:$PATH"
19
20           script:
21               # Run internal Hadrian tests
22               - ./build.sh selftest
23
24               # Build GHC
25               - ./build.sh -j $MODE --verbose --no-progress --progress-colour=never --progress-info=brief --profile=-
26
27               # Test GHC binary
28               - cd ..
29               - inplace/bin/ghc-stage2 -e 1+2
30
31         - os: linux
32           env: MODE="--flavour=quickest"
33           compiler: "GHC 7.10.3"
34           addons:
35               apt:
36                   packages:
37                       - ghc-7.10.3
38                       - cabal-install-1.22
39                       - zlib1g-dev
40                   sources: hvr-ghc
41
42           before_install:
43               - PATH="/opt/ghc/7.10.3/bin:$PATH"
44               - PATH="/opt/cabal/1.22/bin:$PATH"
45
46           script:
47               # Run internal Hadrian tests
48               - ./build.sh selftest
49
50               # Build GHC
51               - ./build.sh -j $MODE --verbose --no-progress --progress-colour=never --progress-info=brief --profile=-
52
53               # Test GHC binary
54               - cd ..
55               - inplace/bin/ghc-stage2 -e 1+2
56
57         - os: osx
58           osx_image: xcode8
59           env: MODE="--flavour=quickest --integer-simple"
60           before_install:
61               - brew update
62               - brew install ghc cabal-install
63
64           script:
65               # Due to timeout limit of OS X build on Travis CI,
66               # we will ignore selftest and build only stage1
67               - ./build.sh -j $MODE --verbose --no-progress --progress-colour=never --progress-info=brief --profile=- inplace/bin/ghc-stage1
68
69 install:
70     # Add Cabal to PATH
71     - PATH="$HOME/.cabal/bin:$PATH"
72     - export PATH
73     - env
74
75     # Fetch GHC sources into ./ghc
76     - git --version
77     - git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
78     - git clone --depth 1 --recursive git://github.com/ghc/ghc
79     # --shallow-submodules is not supported on travis standard git 1.8 (linux), but it is supported
80     # on Travis Mac OS X machines. But it does not work with github mirrors because it cannot
81     # find commits.
82
83     # Install all Hadrian and GHC build dependencies
84     - cabal update
85     - cabal install alex happy ansi-terminal mtl shake quickcheck
86
87
88     # Travis has already cloned Hadrian into ./ and we need to move it
89     # to ./ghc/hadrian -- one way to do it is to move the .git directory
90     # and perform a hard reset in order to regenerate Hadrian files
91     - mkdir ghc/hadrian
92     - mv .git ghc/hadrian
93     - cd ghc/hadrian
94     - git reset --hard HEAD
95
96 cache:
97     directories:
98         - $HOME/.cabal
99         - $HOME/.ghc