Travis: switch to Stack (to avoid the file not found errors from cabal)
This commit is contained in:
parent
8f19c63dec
commit
bd5943135e
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -eux
|
||||
|
||||
mkdir -p $HOME/.cabal
|
||||
cat > $HOME/.cabal/config <<EOF
|
||||
remote-repo: hackage.haskell.org:http://hackage.fpcomplete.com/
|
||||
remote-repo-cache: $HOME/.cabal/packages
|
||||
jobs: \$ncpus
|
||||
EOF
|
||||
57
.travis.yml
57
.travis.yml
@ -1,33 +1,36 @@
|
||||
# NB: don't set `language: haskell` here
|
||||
# Use new container infrastructure to enable caching
|
||||
sudo: false
|
||||
|
||||
# The following enables several GHC versions to be tested; often it's enough to test only against the last release in a major GHC version. Feel free to omit lines listings versions you don't need/want testing for.
|
||||
# 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.
|
||||
env:
|
||||
#- CABALVER=1.20 GHCVER=7.6.3
|
||||
- CABALVER=1.20 GHCVER=7.8.4
|
||||
- CABALVER=1.22 GHCVER=7.10.1
|
||||
- CABALVER=1.22 GHCVER=7.10.2
|
||||
#- CABALVER=head GHCVER=head # see section about GHC HEAD snapshots
|
||||
- ARGS=""
|
||||
- ARGS="--resolver lts-2"
|
||||
- ARGS="--resolver lts-3"
|
||||
- ARGS="--resolver lts"
|
||||
- ARGS="--resolver nightly"
|
||||
|
||||
# Note: the distinction between `before_install` and `install` is not important.
|
||||
before_install:
|
||||
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
|
||||
- travis_retry sudo apt-get update
|
||||
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex
|
||||
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$PATH
|
||||
- export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
|
||||
- ./.travis-setup.sh
|
||||
# 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'
|
||||
|
||||
# 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
|
||||
|
||||
install:
|
||||
- cabal --version
|
||||
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
||||
- travis_retry cabal update
|
||||
- travis_retry curl -L http://download.fpcomplete.com/michael/cabal-meta.tar.gz > cabal-meta.tar.gz
|
||||
- mkdir -p $HOME/.cabal/bin
|
||||
- tar zxfv cabal-meta.tar.gz -C $HOME/.cabal/bin
|
||||
- cabal install alex happy
|
||||
|
||||
# Here starts the actual work to be performed for the package under test; any command which exits with a non-zero exit code causes the build to fail.
|
||||
script:
|
||||
- cabal-meta install --only-dependencies --enable-tests --enable-benchmarks --force-reinstalls
|
||||
- cabal-meta install --run-tests
|
||||
# Caching so the next build will be fast too.
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.stack
|
||||
|
||||
Loading…
Reference in New Issue
Block a user