Skip to content

Commit

Permalink
Dry build with stack, to test that yaml files are valid
Browse files Browse the repository at this point in the history
  • Loading branch information
phadej committed May 13, 2016
1 parent 461d436 commit 8e5f501
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
9 changes: 6 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ sudo: false
language: c

env:
- GHCVER=7.8.4 CABALVER=1.22
- GHCVER=7.10.3 CABALVER=1.22
- GHCVER=7.8.4 CABALVER=1.22 STACK_YAML=stack-ghc-7.8.4.yaml
- GHCVER=7.10.3 CABALVER=1.22 STACK_YAML=stack.yaml
- GHCVER=8.0.1 CABALVER=1.24

addons:
Expand All @@ -20,10 +20,13 @@ addons:
- libgmp-dev

install:
- (mkdir -p $HOME/.local/bin && cd $HOME/.local/bin && wget https://zalora-public.s3.amazonaws.com/tinc && chmod +x tinc)
- mkdir -p $HOME/.local/bin
- (cd $HOME/.local/bin && wget https://zalora-public.s3.amazonaws.com/tinc && chmod +x tinc)
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
- ghc --version
- cabal --version
- stack --version
- travis_retry cabal update
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config

Expand Down
2 changes: 1 addition & 1 deletion stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ extra-deps:
- base-compat-0.9.0
- engine-io-wai-1.0.2
- control-monad-omega-0.3.1
- should-not-typecheck-2.0.1
- should-not-typecheck-2.1.0
- markdown-unlit-0.4.0
- aeson-0.11.0.0
- fail-4.9.0.0
Expand Down
4 changes: 4 additions & 0 deletions travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

set -o errexit

if [ -n "$STACK_YAML" ]; then
stack test --dry-run
fi

for package in $(cat sources.txt) doc/tutorial ; do
echo testing $package
pushd $package
Expand Down

0 comments on commit 8e5f501

Please sign in to comment.