macaw/.travis.yml

59 lines
2.2 KiB
YAML
Raw Normal View History

2017-11-08 23:05:28 +03:00
# This file has been generated -- see https://github.com/hvr/multi-ghc-travis
language: c
sudo: false
cache:
directories:
- $HOME/.cabsnap
- $HOME/.cabal/packages
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
matrix:
include:
- env: CABALVER=1.24 GHCVER=8.0.2
compiler: ": #GHC 8.0.2"
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
before_install:
- unset CC
2017-11-10 00:23:02 +03:00
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
2017-11-08 23:05:28 +03:00
install:
- cabal --version
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
then
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
fi
- travis_retry cabal update -v
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
2017-11-09 21:59:47 +03:00
# - cabal install --only-dependencies --enable-tests --enable-benchmarks --dry -v > installplan.txt
2017-11-09 23:19:23 +03:00
# - stack install macaw-x86 --only-dependencies --test --dry-run -v 2> installplan.txt
2017-11-09 23:35:46 +03:00
# - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
2017-11-08 23:05:28 +03:00
# 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:
2017-11-10 00:38:53 +03:00
- travis_wait stack --no-terminal --skip-ghc-check setup
2017-11-09 23:59:59 +03:00
- cd x86/tests
2017-11-09 21:59:47 +03:00
- stack build macaw-x86
- stack test macaw-x86
2017-11-10 04:19:58 +03:00
- cd ../..
# - cabal check
# - cabal haddock # tests that documentation can be generated
# - cabal sdist # tests that a source-distribution can be generated
2017-11-08 23:05:28 +03:00
# Check that the resulting source distribution can be built & installed.
# If there are no other `.tar.gz` files in `dist`, this can be even simpler:
# `cabal install --force-reinstalls dist/*-*.tar.gz`
2017-11-10 04:19:58 +03:00
# - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
# (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
2017-11-08 23:05:28 +03:00
# EOF