+# The following enables container-based travis instances
sudo: false
-matrix:
- include:
- - os: linux
- env: CABALVER=1.22 GHCVER=7.10.3 TARGET=
- addons:
- apt:
- packages:
- - ghc-7.10.3
- - alex-3.1.4
- - happy-1.19.5
- - cabal-install-1.22
- - zlib1g-dev
- sources: hvr-ghc
- before_install:
- - PATH="/opt/ghc/$GHCVER/bin:$PATH"
- - PATH="/opt/cabal/$CABALVER/bin:$PATH"
- - PATH="$HOME/.cabal/bin:$PATH"
- - export PATH
- - cabal update
-
- - os: osx
- env: TARGET=utils/ghc-pkg/stage1/build/tmp/ghc-pkg
- before_install:
- - brew update
- - brew install ghc cabal-install
- - cabal update
- - cabal install alex happy
- - PATH="$HOME/.cabal/bin:$PATH"
- - export PATH
-
-install:
- - env
- - ghc --version
- - cabal --version
- - alex --version
- - happy --version
-
- - git config --global url."git://github.com/ghc/packages-".insteadOf git://github.com/ghc/packages/
- - git config --global url."http://github.com/ghc/packages-".insteadOf http://github.com/ghc/packages/
- - git config --global url."https://github.com/ghc/packages-".insteadOf https://github.com/ghc/packages/
- - git config --global url."ssh://git@github.com/ghc/packages-".insteadOf ssh://git@github.com/ghc/packages/
- - git config --global url."git@github.com:/ghc/packages-".insteadOf git@github.com:/ghc/packages/
- - travis_retry git clone https://github.com/ghc/ghc --recurse-submodules --depth 1
-
- # Travis clones the project into ".", but we need it as a child directory
- # of "ghc/". For this reason, we - rather hackily - move the GHC-Shake
- # ".git" directory into the appropriate location, and perform a hard reset
- # in order to regenerate the GHC-Shake files.
- - mkdir ghc/shake-build
- - mv .git ghc/shake-build
- - ( cd ghc/shake-build && git reset --hard HEAD )
-
- - ( cd ghc/shake-build && cabal install --only-dependencies )
- - ( cd ghc/shake-build && cabal configure )
-
- - ( cd ghc && ./boot )
- - ( cd ghc && ./configure )
- - cat ghc/shake-build/cfg/system.config
+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:
- - ( cd ghc/shake-build && cabal haddock --internal )
- - ./ghc/shake-build/build.sh selftest
- - ./ghc/shake-build/build.sh -j --no-progress --profile=- --flavour=quick $TARGET
-
-cache:
- directories:
- - $HOME/.cabal
- - $HOME/.ghc
-
-notifications:
- irc:
- on_success: change # always/never/change
- on_failure: always
- channels:
- - "chat.freenode.net#shaking-up-ghc"
- template:
- - "#%{build_number} finished in %{duration}. %{message}"
- - "Repo: %{repository_slug}, branch: %{branch}"
- - "%{author}: %{commit_subject}"
- - "Build details: %{build_url}"
+ # 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