Skip to content

Commit

Permalink
do ci with travis
Browse files Browse the repository at this point in the history
  • Loading branch information
skogsbaer committed Nov 11, 2015
1 parent 4c0a89b commit 29a917b
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions .travis.yml
@@ -0,0 +1,36 @@
# Use new container infrastructure to enable caching
sudo: false

# 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:
- ARGS=""
- ARGS="--resolver lts-2"
- ARGS="--resolver lts-3"
- 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'

# 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

# Caching so the next build will be fast too.
cache:
directories:
- $HOME/.stack
2 changes: 1 addition & 1 deletion stack.yaml
Expand Up @@ -3,4 +3,4 @@ packages:
- '.'
- sample/
extra-deps: []
resolver: lts-3.1
resolver: lts-3.13
2 changes: 1 addition & 1 deletion tests/compile-errors/run-tests.sh
Expand Up @@ -6,7 +6,7 @@ lineno=7
function check()
{
test="$1"
stack exec ghc -- "$test" 2>&1 | grep "$test":$lineno
stack exec ghc -- -hide-package test-framework "$test" 2>&1 | grep "$test":$lineno
grep_ecode=${PIPESTATUS[1]}
if [ "$grep_ecode" != "0" ]
then
Expand Down

0 comments on commit 29a917b

Please sign in to comment.