IHaskell/.travis.yml
Andrew Gibiansky 4f4b7be662 travis latest
2016-06-08 23:47:59 -07:00

74 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Test against different stack LTS versions.
env:
- DISPLAY=true FORMATTING=true RESOLVER=lts-6.2 # Most recent GHC 7.10 LTS
- DISPLAY=false FORMATTING=false RESOLVER=lts-2.22 # Last GHC 7.8 LTS
# Choose a lightweight base image; we provide our own build tools.
language: c
# Enable caching.
sudo: false
# Caching so the next build will be fast too.
# These caches are the same between resolvers, but this is fine,
# as Stack differentiates between its resolvers.
cache:
directories:
- $HOME/.ghc
- $HOME/.cabal
- $HOME/.stack
- $HOME/zeromq
# Enable packages we need.
# Not all packages are available see before_install for from-source builds.
addons:
apt:
packages:
- libmagic-dev
- libgmp-dev
- python3
before_install:
# Download and unpack the stack executable
- export PATH=$HOME/.local/bin:$PATH
- mkdir -p ~/.local/bin
- curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# Install zeromq3 -- the package is not supported yet on Travis whitelist... (06/06/2016)
- |
if [ ! -d "$HOME/zeromq/lib" ]; then
export OLDPWD=$(pwd)
travis_retry git clone http://www.github.com/zeromq/zeromq4-x.git libzmq
mkdir $HOME/zeromq
cd libzmq
travis_retry ./autogen.sh
travis_retry ./configure --prefix=$HOME/zeromq
make
travis_retry make install
cd $OLDPWD
fi
# This step takes the longest, and is what generates the Stack cache.
install:
# Set path for pkg-config to find zeromq, otherwise install of zeromq4-haskell fails.
- export PKG_CONFIG_PATH=$HOME/zeromq/lib/pkgconfig/
- stack setup --resolver=$RESOLVER
- stack build --dependencies-only --resolver=$RESOLVER
# For verify_formatting.py
- if $FORMATTING; then stack install hindent; fi
script:
- export LD_LIBRARY_PATH=$HOME/zeromq/lib
- stack test --resolver=$RESOLVER
- if $FORMATTING; then ./verify_formatting.py; fi
- |
if $DISPLAY; then
TOP=$(pwd)
for PACKAGE in ihaskell-display/*; do
cd "$TOP/$PACKAGE";
stack build --resolver=$RESOLVER;
cd "$TOP";
done
fi