mirror of
https://github.com/commercialhaskell/stackage-server.git
synced 2026-02-23 16:07:52 +01:00
Travis: build with Stack
This commit is contained in:
parent
702afdca6a
commit
5e7424c77e
62
.travis.yml
62
.travis.yml
@ -1,38 +1,36 @@
|
|||||||
deploy:
|
# Use new container infrastructure to enable caching
|
||||||
provider: s3
|
sudo: false
|
||||||
access_key_id: AKIAI5DCW74VHQYKQPAA
|
|
||||||
secret_access_key:
|
|
||||||
secure: OHa5APTj1t/1Z9oMckolt1uEdd4UlBV/GOs4iuy3egMZQv6W2Y5vshMJAjxF3cuaNBE5HSLDMjckXWUhIAbh67dTAv8dn1VvWkMf8S2qRQOY+Z0YEsBjZVitRpdNpNWus/0+utX5hRMrsYmbniubQyJgUFowZmMDa0BJ4Yb+0U0=
|
|
||||||
bucket: stackage-travis
|
|
||||||
acl: public_read
|
|
||||||
skip_cleanup: true
|
|
||||||
local_dir: to-travis
|
|
||||||
upload-dir: stackage-server
|
|
||||||
|
|
||||||
|
# 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:
|
env:
|
||||||
- CABALVER=1.20 GHCVER=7.8.4
|
- 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:
|
before_install:
|
||||||
- travis_retry sudo add-apt-repository -y ppa:hvr/ghc
|
# Download and unpack the stack executable
|
||||||
- travis_retry sudo apt-get update
|
- mkdir -p ~/.local/bin
|
||||||
- travis_retry sudo apt-get install cabal-install-$CABALVER ghc-$GHCVER # see note about happy/alex
|
- export PATH=$HOME/.local/bin:$PATH
|
||||||
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$HOME/.cabal/bin:$PATH
|
- travis_retry curl -L https://github.com/commercialhaskell/stack/releases/download/v0.1.4.0/stack-0.1.4.0-x86_64-linux.tar.gz | tar xz -C ~/.local/bin
|
||||||
|
|
||||||
install:
|
# This line does all of the work: installs GHC if necessary, build the library,
|
||||||
- cabal --version
|
# executables, and test suites, and runs the test suites. --no-terminal works
|
||||||
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
|
# around some quirks in Travis's terminal implementation.
|
||||||
- travis_retry cabal update
|
script: stack $ARGS --no-terminal --install-ghc test --haddock --pedantic
|
||||||
- cabal install alex happy
|
|
||||||
- cabal install yesod-bin
|
|
||||||
- cabal install --only-dependencies || cabal install --only-dependencies -j1
|
|
||||||
|
|
||||||
# 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.
|
# Caching so the next build will be fast too.
|
||||||
script:
|
cache:
|
||||||
- yesod keter
|
directories:
|
||||||
- mkdir -p to-travis
|
- $HOME/.stack
|
||||||
- mv stackage-server.keter to-travis
|
|
||||||
- mv dist/build/stackage-server-cron/stackage-server-cron .
|
|
||||||
- strip stackage-server-cron
|
|
||||||
- bzip2 stackage-server-cron
|
|
||||||
- mv stackage-server-cron.bz2 to-travis
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user