@@ -1,81 +1,96 @@
11notifications:
22 email: false
33
4−language: c
5−
6−sudo: false
7−cache:
8− directories:
9− - $HOME/.cabal
10− - $HOME/.ghc
11− - $HOME/.local
12− - $HOME/.stack
13−
144matrix:
155 include:
16− # cabal/linux
17− # cabal build for GHC 7.10.3 hangs
18− #- env: BUILD=cabal GHCVER=7.10.3 CABALVER=1.22
19− #addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
206
21− - env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.22
22− addons: {apt: {packages: [libgmp-dev,cabal-install-1.22,libsdl1.2-dev], sources: [hvr-ghc]}}
7+ # --------------------------------------------------------------------------
8+ # Linux/cabal builds
9+ # cabal builds require pre-installed cabal-install and ghc
10+ # --------------------------------------------------------------------------
2311
24− # stack/linux use a pre-installed cabal-install for faster builds
25− # GHC 8.0.1
26− - env: BUILD=stack RESOLVER=lts-7.24 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
27− addons: {apt: {packages: [libgmp-dev,cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
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]}}
2816
29− - env: BUILD=stack RESOLVER=lts-9.16 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
30− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,libsdl1.2-dev], sources: [hvr-ghc]}}
17+ # --------------------------------------------------------------------------
18+ # Linux/stack builds
19+ # --------------------------------------------------------------------------
3120
32− # Note COVERALLS (hpc-coveralls) requires cabal build
33− - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS=y
34− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
21+ # 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"
23+ addons: {apt: {packages: [libgmp-dev,libsdl1.2-dev]}}
3524
36− #- env: BUILD=cabal GHCVER=head CABALVER=head
37− # addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
25+ # 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"
27+ addons: {apt: {packages: [libsdl1.2-dev]}}
3828
39− - env: BUILD=stack RESOLVER=nightly CABALVER=2.0
40− addons: {apt: {packages: [libgmp-dev,cabal-install-2.0], sources: [hvr-ghc]}}
29+ # GHC 8.2.2
30+ - env: BUILD=stack RESOLVER=lts-10.0 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
31+ addons: {apt: {packages: [libsdl1.2-dev]}}
4132
42− #- env: BUILD=cabal GHCVER=head CABALVER=head
43− # addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
33+ # Nightly
34+ - env: BUILD=stack RESOLVER=nightly
4435
45− # cabal/stack/osx - TODO install cabal-install
46− # GHC 8.0.1
47− - env: BUILD=cabal RESOLVER=lts-7.24
36+ # --------------------------------------------------------------------------
37+ # OS X builds
38+ # --------------------------------------------------------------------------
39+
40+ # GHC 8.2.2/cabal
41+ - env: BUILD=cabal RESOLVER=lts-10.0
4842 os: osx
4943
50− # GHC 8.0.2
51− - env: BUILD=stack RESOLVER=lts-9.16
44+ # GHC 8.2.2/stack
45+ - env: BUILD=stack RESOLVER=lts-10.0
5246 os: osx
5347
48+ # --------------------------------------------------------------------------
49+ # Lint
50+ # --------------------------------------------------------------------------
51+
52+ - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
53+
54+ # --------------------------------------------------------------------------
55+ # Builds that are allowed to fail
56+ # --------------------------------------------------------------------------
57+
5458 allow_failures:
55− - env: BUILD=stack RESOLVER=nightly CABALVER=2.0
56− #- env: BUILD=cabal GHCVER=head CABALVER=head
59+ - env: BUILD=stack RESOLVER=nightly
60+ - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
5761
58−install: true
5962script:
6063 - |
61− # Customizable options
62− PACKAGE_TEST_VER="7fe14f616d05d69de25a46002668a8509b6257a5"
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"
6370 GHC_OPTIONS="-O0 -Werror"
64− test -n "$COVERALLS" && \
65− COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines \
66− --exclude-dir=test test"
6771
68− # Usually no changes should be needed after this
72+ # ------------------------------------------------------------------------
73+ # Normally no customizations should be needed this point onwards
74+ # ------------------------------------------------------------------------
75+
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; }
78+
79+ # When GHCVER or CABALVER env variables are specified, modify the path to
80+ # find the binaries installed from hvr-ghc repo
6981 add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
82+
83+ # Emit the value of the var specified as arg only when the build is cabal
7084 cabal_env() { test "$BUILD" = cabal && echo $1; }
71− pkg_test() { echo https://raw.githubusercontent.com/harendra-kumar/package-test/$1/package-test.sh; }
7285
7386 CURL=$(which curl)
7487 PATH=/bin:/usr/bin
7588 add_path GHCVER ghc
7689 add_path CABALVER cabal
7790
78− # TRAVIS vars are needed by hpc-coveralls
91+ # We start with a clean environment (env -i) and specify all the
92+ # environment variables explicitly. TRAVIS vars are needed by
93+ # hpc-coveralls.
7994 - env -i
8095 LC_ALL=C.UTF-8
8196 TRAVIS=$TRAVIS
@@ -84,7 +99,7 @@ script:
8499 BUILD=$BUILD
85100 RESOLVER=$RESOLVER
86101 STACK_UPGRADE=y
87− STACK_YAML=$STACK_YAML
102+ STACK_YAML="$STACK_YAML"
88103 STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
89104 GHCVER=$GHCVER
90105 GHC_OPTIONS="$GHC_OPTIONS"
@@ -95,4 +110,20 @@ script:
95110 $(cabal_env CABAL_CHECK_RELAX=y)
96111 $(cabal_env CABAL_NO_SANDBOX=y)
97112 $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
113+ HLINT_OPTIONS="$HLINT_OPTIONS"
98114 /bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))
115+
116+install: true
117+language: 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