@@ -1,26 +1,23 @@
11notifications:
22 email: false
33
4+env:
5+ global:
6+ - GHC_OPTIONS="-O0 -Werror"
7+ - PACKCHECK="./packcheck.sh"
8+ # The commit id of packcheck.sh to use from harendra-kumar/packcheck on github
9+ - PACKCHECK_COMMIT="c028c2425a372487e74157569d0a6cd4d745575d"
10+
411matrix:
512 include:
613
714 # --------------------------------------------------------------------------
8− # Linux/cabal builds
9− # cabal builds require pre-installed cabal-install and ghc
10− # --------------------------------------------------------------------------
11−
12− # Note COVERALLS (hpc-coveralls) requires cabal build. Sends the coverage
13− # info for the test suite named "test" to coveralls.io using hpc-coveralls.
14− - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test"
15− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
16−
17− # --------------------------------------------------------------------------
18− # Linux/stack builds
15+ # (Linux) stack builds
1916 # --------------------------------------------------------------------------
2017
2118 # GHC 7.10.3
2219 - env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
23− addons: {apt: {packages: [libgmp-dev,libsdl1.2-dev]}}
20+ addons: {apt: {packages: [libsdl1.2-dev]}}
2421
2522 # GHC 8.0.2
2623 - env: BUILD=stack RESOLVER=lts-9.20 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
@@ -33,11 +30,24 @@ matrix:
3330 # Nightly
3431 - env: BUILD=stack RESOLVER=nightly
3532
33+ # --------------------------------------------------------------------------
34+ # (Linux) cabal builds require pre-installed cabal-install and ghc
35+ # --------------------------------------------------------------------------
36+
37+ - env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
38+ addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
39+
40+ - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24
41+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
42+
43+ - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0
44+ addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
45+
3646 # --------------------------------------------------------------------------
3747 # OS X builds
3848 # --------------------------------------------------------------------------
3949
40− # GHC 8.2.2/cabal
50+ # GHC 8.2.2/cabal build via stack
4151 - env: BUILD=cabal RESOLVER=lts-10.0
4252 os: osx
4353
@@ -51,6 +61,15 @@ matrix:
5161
5262 - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
5363
64+ # --------------------------------------------------------------------------
65+ # Build and send coverage report to coveralls.io using hpc-coveralls
66+ # --------------------------------------------------------------------------
67+
68+ # Note COVERALLS (hpc-coveralls) works only with cabal build.
69+ # For this to succeed you have to add your porject to coveralls.io first
70+ - env: BUILD=cabal GHCVER=8.2.2 CABALVER=2.0 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test"
71+ addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
72+
5473 # --------------------------------------------------------------------------
5574 # Builds that are allowed to fail
5675 # --------------------------------------------------------------------------
@@ -59,22 +78,22 @@ matrix:
5978 - env: BUILD=stack RESOLVER=nightly
6079 - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
6180
62−script:
63− - |
64− # ------------------------------------------------------------------------
65− # You can customize these to desired values
66− # ------------------------------------------------------------------------
67−
68− # The commit id of the package-test script to use
69− PACKAGE_TEST_VER="1a4de26422ee296f0811e032bec922123f019963"
70− GHC_OPTIONS="-O0 -Werror"
81+# ------------------------------------------------------------------------
82+# Settings beyond this point are advanced and normally not tweaked
83+# ------------------------------------------------------------------------
7184
72− # ------------------------------------------------------------------------
73− # Normally no customizations should be needed this point onwards
74− # ------------------------------------------------------------------------
85+sudo: false
86+cache:
87+ directories:
88+ - $HOME/.cabal
89+ - $HOME/.ghc
90+ - $HOME/.local
91+ - $HOME/.stack
7592
76− # Where to find the package-test.sh script
77− pkg_test() { echo https://raw.githubusercontent.com/harendra-kumar/package-test/$1/package-test.sh; }
93+script:
94+ - |
95+ # Where to find the packcheck.sh script
96+ PACKCHECK_URL=https://raw.githubusercontent.com/harendra-kumar/packcheck/${PACKCHECK_COMMIT}/packcheck.sh
7897
7998 # When GHCVER or CABALVER env variables are specified, modify the path to
8099 # find the binaries installed from hvr-ghc repo
@@ -88,6 +107,11 @@ script:
88107 add_path GHCVER ghc
89108 add_path CABALVER cabal
90109
110+ # If a custom stack-yaml is specified, replace the default with that
111+ if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
112+ if test ! -e "$PACKCHECK"; then $CURL -sL -o "$PACKCHECK" $PACKCHECK_URL; fi;
113+ chmod +x $PACKCHECK
114+
91115 # We start with a clean environment (env -i) and specify all the
92116 # environment variables explicitly. TRAVIS vars are needed by
93117 # hpc-coveralls.
@@ -95,11 +119,9 @@ script:
95119 LC_ALL=C.UTF-8
96120 TRAVIS=$TRAVIS
97121 TRAVIS_JOB_ID=$TRAVIS_JOB_ID
98− PATH=$PATH
99− BUILD=$BUILD
122+ PATH="$PATH"
100123 RESOLVER=$RESOLVER
101124 STACK_UPGRADE=y
102− STACK_YAML="$STACK_YAML"
103125 STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
104126 GHCVER=$GHCVER
105127 GHC_OPTIONS="$GHC_OPTIONS"
@@ -111,19 +133,7 @@ script:
111133 $(cabal_env CABAL_NO_SANDBOX=y)
112134 $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
113135 HLINT_OPTIONS="$HLINT_OPTIONS"
114− /bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))
136+ bash -c "$PACKCHECK $BUILD"
115137
116138install: true
117139language: c
118−
119−# ------------------------------------------------------------------------
120−# Build caching
121−# ------------------------------------------------------------------------
122−
123−sudo: false
124−cache:
125− directories:
126− - $HOME/.cabal
127− - $HOME/.ghc
128− - $HOME/.local
129− - $HOME/.stack