@@ -1,26 +1,23 @@
1notifications:
1notifications:
2 email: false
2 email: false
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"
7 # --------------------------------------------------------------------------
14 # --------------------------------------------------------------------------
9− # cabal builds require pre-installed cabal-install and ghc
10− # --------------------------------------------------------------------------
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]}}
17− # --------------------------------------------------------------------------
18− # Linux/stack builds
15+ # (Linux) stack builds
19 # --------------------------------------------------------------------------
16 # --------------------------------------------------------------------------
21 # GHC 7.10.3
18 # GHC 7.10.3
22 - env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
19 - 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]}}
25 # GHC 8.0.2
22 # GHC 8.0.2
26 - env: BUILD=stack RESOLVER=lts-9.20 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
23 - 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:
34 - env: BUILD=stack RESOLVER=nightly
31 - env: BUILD=stack RESOLVER=nightly
33+ # --------------------------------------------------------------------------
34+ # (Linux) cabal builds require pre-installed cabal-install and ghc
35+ # --------------------------------------------------------------------------
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]}}
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]}}
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]}}
36 # --------------------------------------------------------------------------
46 # --------------------------------------------------------------------------
37 # OS X builds
47 # OS X builds
38 # --------------------------------------------------------------------------
48 # --------------------------------------------------------------------------
40− # GHC 8.2.2/cabal
50+ # GHC 8.2.2/cabal build via stack
41 - env: BUILD=cabal RESOLVER=lts-10.0
51 - env: BUILD=cabal RESOLVER=lts-10.0
@@ -51,6 +61,15 @@ matrix:
52 - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
62 - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
64+ # --------------------------------------------------------------------------
65+ # Build and send coverage report to coveralls.io using hpc-coveralls
66+ # --------------------------------------------------------------------------
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]}}
54 # --------------------------------------------------------------------------
73 # --------------------------------------------------------------------------
55 # Builds that are allowed to fail
74 # Builds that are allowed to fail
56 # --------------------------------------------------------------------------
75 # --------------------------------------------------------------------------
@@ -59,22 +78,22 @@ matrix:
59 - env: BUILD=stack RESOLVER=nightly
78 - env: BUILD=stack RESOLVER=nightly
60 - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
79 - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
62−script:
81+# ------------------------------------------------------------------------
63− - |
82+# Settings beyond this point are advanced and normally not tweaked
64− # ------------------------------------------------------------------------
65− # You can customize these to desired values
66− # ------------------------------------------------------------------------
83+# ------------------------------------------------------------------------
68− # The commit id of the package-test script to use
69− PACKAGE_TEST_VER="1a4de26422ee296f0811e032bec922123f019963"
70− GHC_OPTIONS="-O0 -Werror"
72− # ------------------------------------------------------------------------
85+sudo: false
73− # Normally no customizations should be needed this point onwards
86+cache:
74− # ------------------------------------------------------------------------
87+ directories:
76− # Where to find the package-test.sh script
95+ # Where to find the packcheck.sh script
77− pkg_test() { echo https://raw.githubusercontent.com/harendra-kumar/package-test/$1/package-test.sh; }
96+ PACKCHECK_URL=https://raw.githubusercontent.com/harendra-kumar/packcheck/${PACKCHECK_COMMIT}/packcheck.sh
79 # When GHCVER or CABALVER env variables are specified, modify the path to
98 # When GHCVER or CABALVER env variables are specified, modify the path to
80 # find the binaries installed from hvr-ghc repo
99 # find the binaries installed from hvr-ghc repo
@@ -88,6 +107,11 @@ script:
88 add_path GHCVER ghc
107 add_path GHCVER ghc
89 add_path CABALVER cabal
108 add_path CABALVER cabal
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;
91 # We start with a clean environment (env -i) and specify all the
115 # We start with a clean environment (env -i) and specify all the
92 # environment variables explicitly. TRAVIS vars are needed by
116 # environment variables explicitly. TRAVIS vars are needed by
93 # hpc-coveralls.
117 # hpc-coveralls.
@@ -95,11 +119,9 @@ script:
95 LC_ALL=C.UTF-8
119 LC_ALL=C.UTF-8
96 TRAVIS=$TRAVIS
120 TRAVIS=$TRAVIS
97 TRAVIS_JOB_ID=$TRAVIS_JOB_ID
121 TRAVIS_JOB_ID=$TRAVIS_JOB_ID
98− PATH=$PATH
122+ PATH="$PATH"
100 RESOLVER=$RESOLVER
123 RESOLVER=$RESOLVER
101 STACK_UPGRADE=y
124 STACK_UPGRADE=y
102− STACK_YAML="$STACK_YAML"
103 STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
125 STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
104 GHCVER=$GHCVER
126 GHCVER=$GHCVER
105 GHC_OPTIONS="$GHC_OPTIONS"
127 GHC_OPTIONS="$GHC_OPTIONS"
@@ -111,19 +133,7 @@ script:
111 $(cabal_env CABAL_NO_SANDBOX=y)
133 $(cabal_env CABAL_NO_SANDBOX=y)
112 $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
134 $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
113 HLINT_OPTIONS="$HLINT_OPTIONS"
135 HLINT_OPTIONS="$HLINT_OPTIONS"
114− /bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))
136+ bash -c "$PACKCHECK $BUILD"
116install: true
138install: true
117language: c
139language: c
119−# ------------------------------------------------------------------------
121−# ------------------------------------------------------------------------