Skip to content

Commit

Permalink
Experiment with Travis's build stages.
Browse files Browse the repository at this point in the history
  • Loading branch information
23Skidoo committed Jun 10, 2017
1 parent a1f9b33 commit 72d03e2
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 2 deletions.
77 changes: 75 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,61 +24,134 @@ branches:
# NB: If you test the same GHC version/OS combo multiple times with
# SCRIPT=script (e.g., see PARSEC=YES below), you MUST supply a
# TAGSUFFIX to help travis/upload.sh disambiguate the matrix entry.
matrix:
# All jobs except 'meta' have two stages; the first stage is used to
# warm up the cache. This is mostly useful when a new compiler gets
# added to the build matrix: work done installing dependencies is not
# wasted when we exceed the time limit for jobs.
jobs:
include:
- env: GHCVER=8.0.2 SCRIPT=meta BUILDER=none
os: linux
sudo: required
# These don't have -dyn/-prof whitelisted yet, so we have to
# do the old-style installation
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=7.4.2 SCRIPT=script CABAL_LIB_ONLY=YES TEST_OTHER_VERSIONS=YES
os: linux
sudo: required
- env: GHCVER=7.4.2 SCRIPT=script CABAL_LIB_ONLY=YES TEST_OTHER_VERSIONS=YES
os: linux
sudo: required
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=7.6.3 SCRIPT=script
os: linux
sudo: required
- env: GHCVER=7.6.3 SCRIPT=script
os: linux
sudo: required
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=7.8.4 SCRIPT=script
os: linux
sudo: required
- env: GHCVER=7.8.4 SCRIPT=script
os: linux
sudo: required
# Ugh, we'd like to drop 'sudo: required' and use the
# apt plugin for the next two
# but the GCE instance we get has more memory, which makes
# a big difference
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=7.10.3 SCRIPT=script
os: linux
sudo: required
- env: GHCVER=7.10.3 SCRIPT=script
os: linux
sudo: required
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=8.0.2 SCRIPT=script DEPLOY_DOCS=YES
os: linux
sudo: required
- env: GHCVER=8.0.2 SCRIPT=script DEPLOY_DOCS=YES
os: linux
sudo: required
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=8.0.2 SCRIPT=solver-debug-flags
os: linux

sudo: required
- env: GHCVER=8.0.2 SCRIPT=solver-debug-flags
os: linux
sudo: required
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=8.0.2 SCRIPT=script PARSEC=YES TAGSUFFIX="-parsec"
os: linux
sudo: required
- env: GHCVER=8.0.2 SCRIPT=script PARSEC=YES TAGSUFFIX="-parsec"
os: linux
sudo: required
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=8.0.2 SCRIPT=script DEBUG_EXPENSIVE_ASSERTIONS=YES TAGSUFFIX="-fdebug-expensive-assertions"
os: linux
sudo: required
- env: GHCVER=8.0.2 SCRIPT=script DEBUG_EXPENSIVE_ASSERTIONS=YES TAGSUFFIX="-fdebug-expensive-assertions"
os: linux
sudo: required
- env: GHCVER=8.0.2 SCRIPT=bootstrap
os: linux
sudo: required
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=8.2.1 SCRIPT=script
os: linux
sudo: required
- env: GHCVER=8.2.1 SCRIPT=script
os: linux
sudo: required

# We axed GHC 7.6 and earlier because it's not worth the trouble to
# make older GHC work with clang's cpp. See
# https://ghc.haskell.org/trac/ghc/ticket/8493
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=7.8.4 SCRIPT=script
os: osx
osx_image: xcode6.4
- env: GHCVER=7.8.4 SCRIPT=script
os: osx
# Keep this synced with travis/upload.sh
osx_image: xcode6.4 # We need 10.10

# TODO: We might want to specify OSX version
# https://docs.travis-ci.com/user/osx-ci-environment/#OS-X-Version
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=7.10.3 SCRIPT=script
os: osx
- env: GHCVER=7.10.3 SCRIPT=script
os: osx
- stage: prepare cache
script: ./travis-precache.sh
after_success: skip
env: GHCVER=8.0.2 SCRIPT=script
os: osx
- env: GHCVER=8.0.2 SCRIPT=script
os: osx
- env: GHCVER=8.0.2 SCRIPT=bootstrap
Expand Down
31 changes: 31 additions & 0 deletions travis-precache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

. ./travis-common.sh

# ---------------------------------------------------------------------
# Update the Cabal index
# ---------------------------------------------------------------------

timed cabal update

# ---------------------------------------------------------------------
# Setup our local project
# ---------------------------------------------------------------------

cp cabal.project.travis cabal.project.local

# ---------------------------------------------------------------------
# Install executables if necessary
# ---------------------------------------------------------------------

if ! command -v happy; then
timed cabal install $jobs happy
fi

# ---------------------------------------------------------------------
# Warm up the cache
# ---------------------------------------------------------------------

# TODO: Don't build Cabal and hackage-security here, they'll be
# rebuilt anyway.
timed cabal new-build --only-dependencies cabal-install cabal-tests

0 comments on commit 72d03e2

Please sign in to comment.