Skip to content

Commit adc6a06

Browse files
committed
Update .travis.yml script
1 parent 365f14b commit adc6a06

File tree

1 file changed

+15
-12
lines changed

1 file changed

+15
-12
lines changed

.travis.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This Travis job script has been generated by a script via
22
#
3-
# make_travis_yml_2.hs 'zlib.cabal' 'zlib1g-dev'
3+
# make_travis_yml_2.hs '--irc-channel=irc.freenode.org#hackage' 'zlib.cabal' 'zlib1g-dev'
44
#
55
# For more information, see https://github.com/hvr/multi-ghc-travis
66
#
@@ -10,6 +10,14 @@ sudo: false
1010
git:
1111
submodules: false # whether to recursively clone submodules
1212

13+
notifications:
14+
irc:
15+
channels:
16+
- "irc.freenode.org#hackage"
17+
skip_join: true
18+
template:
19+
- "\x0313zlib\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}"
20+
1321
cache:
1422
directories:
1523
- $HOME/.cabal/packages
@@ -73,8 +81,8 @@ install:
7381
- rm -fv cabal.project.local
7482
- "echo 'packages: .' > cabal.project"
7583
- rm -f cabal.project.freeze
76-
- cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2
77-
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2
84+
- cabal new-build -w ${HC} ${TEST} ${BENCH} --dep -j2 all
85+
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks --dep -j2 all
7886

7987
# Here starts the actual work to be performed for the package under test;
8088
# any command which exits with a non-zero exit code causes the build to fail.
@@ -92,17 +100,12 @@ script:
92100
- "echo 'packages: .' > cabal.project"
93101
# this builds all libraries and executables (without tests/benchmarks)
94102
- rm -f cabal.project.freeze
95-
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks
103+
- cabal new-build -w ${HC} --disable-tests --disable-benchmarks all
96104
# this builds all libraries and executables (including tests/benchmarks)
97105
# - rm -rf ./dist-newstyle
98-
- cabal new-build -w ${HC} ${TEST} ${BENCH}
99106

100-
# there's no 'cabal new-test' yet, so let's emulate for now
101-
- TESTS=( $(awk 'tolower($0) ~ /^test-suite / { print $2 }' *.cabal) )
102-
- if [ "$TEST" != "--enable-tests" ]; then TESTS=(); fi
103-
- shopt -s globstar;
104-
RC=true; for T in ${TESTS[@]}; do echo "== $T ==";
105-
if dist-newstyle/build/**/$SRC_BASENAME/**/build/$T/$T; then echo "= $T OK =";
106-
else echo "= $T FAILED ="; RC=false; fi; done; $RC
107+
# build & run tests
108+
- cabal new-build -w ${HC} ${TEST} ${BENCH} all
109+
- if [ "x$TEST" = "x--enable-tests" ]; then cabal new-test -w ${HC} all; fi
107110

108111
# EOF

0 commit comments

Comments
 (0)