-sudo: true
-matrix:
- include:
- - os: linux
- env: MODE="--flavour=quickest inplace/bin/ghc-stage1"
- 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.cabal.sh selftest
-
- # Build GHC
- - ./build.cabal.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 --integer-simple"
- compiler: "GHC 8.2.1"
- addons:
- apt:
- packages:
- - ghc-8.2.1
- - cabal-install-1.22
- - zlib1g-dev
- sources: hvr-ghc
-
- before_install:
- - PATH="/opt/ghc/8.2.1/bin:$PATH"
- - PATH="/opt/cabal/1.22/bin:$PATH"
-
- script:
- # Run internal Hadrian tests
- - ./build.cabal.sh selftest
-
- # Build GHC
- - ./build.cabal.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: osx
- osx_image: xcode8
- env: MODE="--flavour=quickest --integer-simple inplace/bin/ghc-stage1"
- before_install:
- - brew update
- - brew install ghc cabal-install
-
- script:
- # Due to timeout limit of OS X build on Travis CI,
- # we will ignore selftest and build only stage1
- - ./build.cabal.sh -j $MODE --verbose --no-progress --progress-colour=never --progress-info=brief --profile=-
-
-install:
- # Add Cabal to PATH
- - PATH="$HOME/.cabal/bin:$PATH"
- - export PATH
- - env
-
- # 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.
-
- # Install all Hadrian and GHC build dependencies
- - cabal update
- - cabal install alex happy ansi-terminal mtl shake quickcheck
-
-
- # 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
- - mkdir ghc/hadrian
- - mv .git ghc/hadrian
- - cd ghc/hadrian
- - git reset --hard HEAD
-
-cache:
- directories:
- - $HOME/.cabal
- - $HOME/.ghc
+# The following enables container-based travis instances
+sudo: false
+
+git:
+ submodules: false
+
+env:
+ - DEBUG_STAGE2=YES
+ - DEBUG_STAGE2=NO
+
+# TODO. Install llvm once llvm's APT repository is working again.
+# See http://lists.llvm.org/pipermail/llvm-dev/2016-May/100303.html.
+addons:
+ apt:
+ sources:
+ - hvr-ghc
+ #- llvm-toolchain-precise-3.7
+ - ubuntu-toolchain-r-test
+ packages:
+ - cabal-install-2.2
+ - ghc-8.4.3
+ - alex-3.1.7
+ - happy-1.19.5
+ - python3
+ #- llvm-3.7
+
+before_install:
+ - export PATH=/opt/ghc/8.4.3/bin:/opt/cabal/2.2/bin:/opt/alex/3.1.7/bin:/opt/happy/1.19.5/bin:/usr/lib/llvm-3.7/bin:$PATH
+
+# Be explicit about which protocol to use, such that we don't have to repeat the rewrite command for each.
+ - git config remote.origin.url git://github.com/${TRAVIS_REPO_SLUG}.git
+ - git config --global url."git://github.com/${TRAVIS_REPO_SLUG%/*}/packages-".insteadOf "git://github.com/${TRAVIS_REPO_SLUG%/*}/packages/"
+ - git submodule --quiet init # Be quiet about these urls, as we may override them later.
+
+# Check if submodule repositories exist.
+ - git config --get-regexp submodule.*.url | while read entry url; do git ls-remote "$url" dummyref 2>/dev/null && echo "$entry = $url" || git config --unset-all "$entry" ; done
+
+# Use github.com/ghc for those submodule repositories we couldn't connect to.
+ - git config remote.origin.url git://github.com/ghc/ghc.git
+ - git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
+ - git submodule init # Don't be quiet, we want to show these urls.
+ - git submodule --quiet update --recursive # Now we can be quiet again.
+
+script:
+ # do not build docs
+ - echo 'HADDOCK_DOCS = NO' >> mk/validate.mk
+ - echo 'BUILD_SPHINX_HTML = NO' >> mk/validate.mk
+ - echo 'BUILD_SPHINX_PDF = NO' >> mk/validate.mk
+ # do not build dynamic libraries
+ - echo 'DYNAMIC_GHC_PROGRAMS = NO' >> mk/validate.mk
+ - echo 'GhcLibWays = v' >> mk/validate.mk
+ - if [ "$DEBUG_STAGE2" = "YES" ]; then echo 'GhcStage2HcOpts += -DDEBUG' >> mk/validate.mk; fi
+ # * Use --quiet, otherwise the build log might exceed the limit of 4
+ # megabytes, causing Travis to kill our job.
+ # * But use VERBOSE=2 (the default, but not when using --quiet) otherwise
+ # the testsuite might not print output for over 10 minutes (more likely so
+ # when DEBUG_STAGE2=NO), causing Travis to again kill our job.
+ # * Use --fast, to stay within the time limits set by Travis.
+ # See Note [validate and testsuite speed] in toplevel Makefile.
+ # Actually, do not run test suite. Takes too long.
+ - THREADS=3 SKIP_PERF_TESTS=YES VERBOSE=2 ./validate --fast --quiet --build-only