Skip to content

Commit

Permalink
Merge pull request #8 from ajnsit/ajnsit-new-travis
Browse files Browse the repository at this point in the history
Trying a simpler travis configuration
  • Loading branch information
ajnsit committed Apr 23, 2016
2 parents f1653ca + a0f901f commit 7281068
Showing 1 changed file with 49 additions and 42 deletions.
91 changes: 49 additions & 42 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,60 @@
# From https://github.com/hvr/multi-ghc-travis

# NB: don't set `language: haskell` here
# language: haskell

# Use Travis CI's docker based install
# We can't use sudo in the docker environment
# See - http://docs.travis-ci.com/user/migrating-from-legacy/
# Use new container infrastructure to enable caching
sudo: false

cache:
directories:
- $HOME/.stack
# Choose a lightweight base image; we provide our own build tools.
language: c

# GHC depends on GMP. You can add other dependencies here as well.
addons:
apt:
packages:
- libgmp-dev

# The different configurations we want to test. You could also do things like
# change flags or use --stack-yaml to point to a different file.
matrix:
include:
- env: GHCVER=7.8.3 STACK_YAML=stack-7.8.yaml
addons: {apt: {sources: [hvr-ghc], packages: [ghc-7.8.3]}}
- env: GHCVER=7.8.4 STACK_YAML=stack-7.8.yaml
addons: {apt: {sources: [hvr-ghc], packages: [ghc-7.8.4]}}
- env: GHCVER=7.10.1 STACK_YAML=stack-7.10.yaml
addons: {apt: {sources: [hvr-ghc], packages: [ghc-7.10.1]}}
- env: GHCVER=7.10.2 STACK_YAML=stack-7.10.yaml
addons: {apt: {sources: [hvr-ghc], packages: [ghc-7.10.2, libgmp-dev]}}
- env: GHCVER=7.10.3 STACK_YAML=stack-7.10.yaml
addons: {apt: {sources: [hvr-ghc], packages: [ghc-7.10.3, libgmp-dev]}}
- env: GHCVER=head STACK_YAML=stack-head.yaml
addons: {apt: {sources: [hvr-ghc], packages: [ghc-head, libgmp-dev]}}
allow_failures:
- env: GHCVER=head STACK_YAML=stack-head.yaml

# Note: the distinction between `before_install` and `install` is not important.
- env: ARGS=""
compiler: ": # Default"
- env: ARGS="--resolver lts-2"
compiler: ": # lts-2"
- env: ARGS="--resolver lts-3"
compiler: ": # lts-3"
- env: ARGS="--resolver lts-4"
compiler: ": # lts-4"
- env: ARGS="--resolver lts"
compiler: ": # lts"
- env: ARGS="--resolver nightly"
compiler: ": # nightly"
- env: ARGS=""
compiler: ": # Default osx"
os: osx

before_install:
- export PATH=/opt/ghc/$GHCVER/bin:$PATH
- mkdir -p ~/.local/bin
- export PATH=~/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# Removed coveralls for now as it was killing CI build times. Need to figure out how to cache this.
# - if ! [ -x ~/.local/bin/hpc-coveralls ]; then stack install hpc-coveralls; fi
- uname -a
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- ghc --info
- stack +RTS -N1 -RTS --version

install:
- stack --no-terminal --skip-ghc-check setup
- stack --no-terminal --skip-ghc-check build

script:
- stack --no-terminal --skip-ghc-check test
# Undo the side-effect of using compiler above
- unset CC

# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- if [ `uname` = "Darwin" ];
then
curl --insecure -L https://www.stackage.org/stack/osx-x86_64 | tar xz --strip-components=1 --include '*/stack' -C ~/.local/bin;
else
curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack';
fi

# This line does all of the work: installs GHC if necessary, build the library,
# executables, and test suites, and runs the test suites. --no-terminal works
# around some quirks in Travis's terminal implementation.
script: stack $ARGS --no-terminal --install-ghc test --haddock

# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack

after_script:
- cat dist/test/*.log
Expand Down

0 comments on commit 7281068

Please sign in to comment.