2015-12-30 00:19:57 +05:30
|
|
|
# Use new container infrastructure to enable caching
|
|
|
|
sudo: false
|
|
|
|
|
|
|
|
# Choose a lightweight base image; we provide our own build tools.
|
|
|
|
language: c
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
env:
|
|
|
|
- ARGS="--resolver lts-2"
|
|
|
|
- ARGS="--resolver lts-3"
|
2016-01-07 03:08:37 +05:30
|
|
|
- ARGS="--resolver lts-4"
|
2016-01-27 01:09:07 +05:30
|
|
|
- ARGS="--resolver lts-5"
|
2016-05-26 19:05:10 +05:30
|
|
|
- ARGS="--resolver lts-6"
|
2016-09-16 01:45:17 +05:30
|
|
|
- ARGS="--resolver lts-7"
|
2017-05-19 23:46:52 +05:30
|
|
|
- ARGS="--resolver lts-8"
|
2017-11-16 19:38:56 +05:30
|
|
|
- ARGS="--resolver lts-9"
|
2015-12-30 00:19:57 +05:30
|
|
|
- ARGS="--resolver lts"
|
|
|
|
- ARGS="--resolver nightly"
|
|
|
|
|
|
|
|
before_install:
|
|
|
|
# Download and unpack the stack executable
|
|
|
|
- mkdir -p ~/.local/bin
|
|
|
|
- export PATH=$HOME/.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'
|
2016-10-10 22:23:08 +05:30
|
|
|
- stack $ARGS --no-terminal --install-ghc install cabal-install happy
|
|
|
|
- cabal update
|
2015-12-30 00:19:57 +05:30
|
|
|
|
|
|
|
# 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.
|
2016-10-10 02:09:15 +05:30
|
|
|
script:
|
2016-10-10 02:26:30 +05:30
|
|
|
- export PATH=$(stack $ARGS path | grep compiler-bin | awk '{print $2}'):$PATH
|
2017-11-17 11:01:44 +05:30
|
|
|
- export DIST_DIR=$(stack $ARGS path | grep dist-dir | awk '{print $2}')
|
|
|
|
- export ARCH=$(echo $DIST_DIR | cut -d '/' -f 3)
|
|
|
|
- export GHC_VER=$(ghc --version | awk '{print $8}')
|
|
|
|
- stack $ARGS --no-terminal install --test --fast
|
2016-10-10 22:23:08 +05:30
|
|
|
- stack $ARGS sdist ringo-core && cd ringo-core && ../test_sdist
|
2017-11-17 11:01:44 +05:30
|
|
|
- cd $TRAVIS_BUILD_DIR
|
2016-10-10 22:23:08 +05:30
|
|
|
- stack $ARGS sdist ringo && cd ringo && ../test_sdist
|
2015-12-30 00:19:57 +05:30
|
|
|
|
2017-11-17 11:01:44 +05:30
|
|
|
before_cache:
|
|
|
|
- cd $TRAVIS_BUILD_DIR
|
|
|
|
- rm -rf .stack-work/logs;
|
|
|
|
- rm -rf $HOME/.cabal/logs;
|
|
|
|
- rm -rf $HOME/.cabal/lib/$ARCH-ghc-$GHC_VER/ringo*
|
|
|
|
|
2015-12-30 00:19:57 +05:30
|
|
|
# Caching so the next build will be fast too.
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- $HOME/.stack
|
2016-10-10 02:26:30 +05:30
|
|
|
- $HOME/.cabal
|
2017-11-17 09:41:24 +05:30
|
|
|
- $HOME/.ghc
|
|
|
|
- .stack-work
|
|
|
|
- ringo/.stack-work
|
|
|
|
- ringo-core/.stack-work
|