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