Skip to content

Commit

Permalink
travis: Factor out script section to a shell script
Browse files Browse the repository at this point in the history
  • Loading branch information
Mitsutoshi Aoe committed Mar 7, 2015
1 parent 421199e commit b7d2b5f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
11 changes: 1 addition & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,16 +38,7 @@ before_install:
install:
- cabal install -j --only-dependencies --enable-tests --enable-benchmarks $FLAGS
script:
- cabal configure -fexamples --enable-tests --enable-benchmarks --enable-coverage
--ghc-options="-Wall -Werror"
- cabal build -j
- run-cabal-test --cabal-name=cabal --show-details=always
- cabal run influx-random-points -- 10 10
- cabal check
- cabal sdist
- export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}') ; (cd dist/; if
[ -f "$SRC_TGZ" ]; then cabal install "$SRC_TGZ"; else echo "expected '$SRC_TGZ'
not found"; exit 1; fi)
- ./scripts/travis.sh
after_script:
- hpc-coveralls test-suite
notifications:
Expand Down
17 changes: 17 additions & 0 deletions scripts/travis.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

cabal configure -fexamples --enable-tests --enable-benchmarks --enable-coverage --ghc-options="-Wall -Werror"
cabal build -j
run-cabal-test --cabal-name=cabal --show-details=always
cabal run influx-random-points -- 10 10
cabal check
cabal sdist
export SRC_TGZ=$(cabal info . | awk '{print $2 ".tar.gz";exit}')
pushd dist/
if [ -f "$SRC_TGZ" ]; then
cabal install "$SRC_TGZ"
else
echo "expected '$SRC_TGZ' not found"
exit 1
fi
popd

0 comments on commit b7d2b5f

Please sign in to comment.