.travis.yml 3.07 KB
Newer Older
Andrey Mokhov's avatar
Andrey Mokhov committed
1
sudo: true
2
language: haskell
Moritz Angermann's avatar
Moritz Angermann committed
3
4
5
matrix:
    include:
        - os: linux
6
          env: MODE="--flavour=quickest"
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
          compiler: "GHC 8.0.2"
          addons:
              apt:
                  packages:
                      - ghc-8.0.2
                      - cabal-install-2.0
                      - zlib1g-dev
                  sources: hvr-ghc

          before_install:
              - PATH="/opt/ghc/8.0.2/bin:$PATH"
              - PATH="/opt/cabal/2.0/bin:$PATH"

          script:
              # Run internal Hadrian tests
              - ./build.sh selftest

              # Build GHC
              - ./build.sh -j $MODE --verbose --no-progress --progress-colour=never --progress-info=brief --profile=-

              # Test GHC binary
              - cd ..
              - inplace/bin/ghc-stage2 -e 1+2

        - os: linux
          env: MODE="--flavour=quickest"
          compiler: "GHC 7.10.3"
34
35
36
37
38
39
40
          addons:
              apt:
                  packages:
                      - ghc-7.10.3
                      - cabal-install-1.22
                      - zlib1g-dev
                  sources: hvr-ghc
41

42
          before_install:
Andrey Mokhov's avatar
Andrey Mokhov committed
43
44
              - PATH="/opt/ghc/7.10.3/bin:$PATH"
              - PATH="/opt/cabal/1.22/bin:$PATH"
45

46
47
48
49
50
51
52
53
54
55
56
          script:
              # Run internal Hadrian tests
              - ./build.sh selftest

              # Build GHC
              - ./build.sh -j $MODE --verbose --no-progress --progress-colour=never --progress-info=brief --profile=-

              # Test GHC binary
              - cd ..
              - inplace/bin/ghc-stage2 -e 1+2

Moritz Angermann's avatar
Moritz Angermann committed
57
        - os: osx
Andrey Mokhov's avatar
Andrey Mokhov committed
58
          osx_image: xcode8
59
          env: MODE="--flavour=quickest --integer-simple"
60
61
62
          before_install:
              - brew update
              - brew install ghc cabal-install
63
64
65
66
67

          script:
              # Due to timeout limit of OS X build on Travis CI,
              # we will ignore selftest and build only stage1
              - ./build.sh -j $MODE --verbose --no-progress --progress-colour=never --progress-info=brief --profile=- inplace/bin/ghc-stage1
quchen's avatar
quchen committed
68

69
install:
Andrey Mokhov's avatar
Andrey Mokhov committed
70
71
72
    # Add Cabal to PATH
    - PATH="$HOME/.cabal/bin:$PATH"
    - export PATH
quchen's avatar
quchen committed
73
74
    - env

gracjan's avatar
gracjan committed
75
76
77
78
79
80
81
82
    # Fetch GHC sources into ./ghc
    - git --version
    - git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
    - git clone --depth 1 --recursive git://github.com/ghc/ghc
    # --shallow-submodules is not supported on travis standard git 1.8 (linux), but it is supported
    # on Travis Mac OS X machines. But it does not work with github mirrors because it cannot
    # find commits.

Andrey Mokhov's avatar
Andrey Mokhov committed
83
84
85
    # Install all Hadrian and GHC build dependencies
    - cabal update
    - cabal install alex happy ansi-terminal mtl shake quickcheck
quchen's avatar
quchen committed
86

Andrey Mokhov's avatar
Andrey Mokhov committed
87
88
89
90

    # Travis has already cloned Hadrian into ./ and we need to move it
    # to ./ghc/hadrian -- one way to do it is to move the .git directory
    # and perform a hard reset in order to regenerate Hadrian files
Andrey Mokhov's avatar
Andrey Mokhov committed
91
92
    - mkdir ghc/hadrian
    - mv .git ghc/hadrian
Andrey Mokhov's avatar
Andrey Mokhov committed
93
94
    - cd ghc/hadrian
    - git reset --hard HEAD
quchen's avatar
quchen committed
95
96
97
98

cache:
    directories:
        - $HOME/.cabal
quchen's avatar
quchen committed
99
        - $HOME/.ghc