Skip to content

Commit 5b7c296

Browse files
committed
Add travis file
1 parent 10aa316 commit 5b7c296

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

.travis.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# This file has been generated by `make_travis_yml_2.hs`
2+
# see https://github.com/hvr/multi-ghc-travis for more information
3+
language: c
4+
sudo: false
5+
6+
cache:
7+
directories:
8+
- $HOME/.cabal/packages
9+
- $HOME/.cabal/store
10+
11+
before_cache:
12+
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
13+
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
14+
15+
matrix:
16+
include:
17+
- env: CABALVER=1.24 GHCVER=7.4.2
18+
compiler: ": #GHC 7.4.2"
19+
addons: {apt: {packages: [cabal-install-1.24,ghc-7.4.2], sources: [hvr-ghc]}}
20+
- env: CABALVER=1.24 GHCVER=7.6.3
21+
compiler: ": #GHC 7.6.3"
22+
addons: {apt: {packages: [cabal-install-1.24,ghc-7.6.3], sources: [hvr-ghc]}}
23+
- env: CABALVER=1.24 GHCVER=7.8.4
24+
compiler: ": #GHC 7.8.4"
25+
addons: {apt: {packages: [cabal-install-1.24,ghc-7.8.4], sources: [hvr-ghc]}}
26+
- env: CABALVER=1.24 GHCVER=7.10.3
27+
compiler: ": #GHC 7.10.3"
28+
addons: {apt: {packages: [cabal-install-1.24,ghc-7.10.3], sources: [hvr-ghc]}}
29+
- env: CABALVER=1.24 GHCVER=8.0.1
30+
compiler: ": #GHC 8.0.1"
31+
addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}}
32+
33+
before_install:
34+
- unset CC
35+
- export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
36+
37+
install:
38+
- cabal --version
39+
- BENCH=${BENCH---enable-benchmarks}
40+
- TEST=${TEST---enable-tests}
41+
- echo "$(ghc --version) [$(ghc --print-project-git-commit-id 2> /dev/null || echo '?')]"
42+
- if [ -f $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz ];
43+
then
44+
zcat $HOME/.cabal/packages/hackage.haskell.org/00-index.tar.gz >
45+
$HOME/.cabal/packages/hackage.haskell.org/00-index.tar;
46+
fi
47+
- travis_retry cabal update -v
48+
- sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
49+
- cabal new-build ${TEST} ${BENCH} --dep
50+
51+
# Here starts the actual work to be performed for the package under test;
52+
# any command which exits with a non-zero exit code causes the build to fail.
53+
script:
54+
- if [ -f configure.ac ]; then autoreconf -i; fi
55+
# this builds all libraries and executables (including tests/benchmarks)
56+
- cabal new-build ${TEST} ${BENCH} -v2 # -v2 provides useful information for debugging
57+
58+
# there's no 'cabal new-test' yet, so let's emulate for now
59+
- TESTS=( $(awk 'tolower($0) ~ /^test-suite / { print $2 }' *.cabal) );
60+
RC=true; for T in ${TESTS[@]}; do echo "== $T ==";
61+
if dist-newstyle/build/*/build/$T/$T; then echo "= $T OK =";
62+
else echo "= $T FAILED ="; RC=false; fi; done; $RC
63+
- cabal sdist # test that a source-distribution can be generated
64+
65+
# Check that the resulting source distribution can be built w/o and w tests
66+
- SRC_BASENAME=$(cabal info . | awk '{print $2;exit}')
67+
- tar -C dist/ -xf dist/$SRC_BASENAME.tar.gz
68+
- "echo 'packages: *.cabal' > dist/$SRC_BASENAME/cabal.project"
69+
- cd dist/$SRC_BASENAME/
70+
- cabal new-build --disable-tests --disable-benchmarks
71+
- rm -rf ./dist-newstyle
72+
- cabal new-build ${TEST} ${BENCH}
73+
74+
# EOF

io-streams-haproxy.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ extra-source-files:
2222

2323
cabal-version: >=1.10
2424
Bug-Reports: https://github.com/snapframework/io-streams-haproxy/issues
25+
Tested-With: GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1
2526

2627
library
2728
hs-source-dirs: src

0 commit comments

Comments
 (0)