@@ -1,81 +1,96 @@
1notifications:
1notifications:
2 email: false
2 email: false
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]}}
21− - env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.22
7+ # --------------------------------------------------------------------------
22− addons: {apt: {packages: [libgmp-dev,cabal-install-1.22,libsdl1.2-dev], sources: [hvr-ghc]}}
8+ # Linux/cabal builds
9+ # cabal builds require pre-installed cabal-install and ghc
10+ # --------------------------------------------------------------------------
24− # stack/linux use a pre-installed cabal-install for faster builds
12+ # Note COVERALLS (hpc-coveralls) requires cabal build. Sends the coverage
25− # GHC 8.0.1
13+ # info for the test suite named "test" to coveralls.io using hpc-coveralls.
26− - env: BUILD=stack RESOLVER=lts-7.24 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
14+ - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test"
27− addons: {apt: {packages: [libgmp-dev,cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
15+ addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
29− - env: BUILD=stack RESOLVER=lts-9.16 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl" CABALVER=1.24
17+ # --------------------------------------------------------------------------
30− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,libsdl1.2-dev], sources: [hvr-ghc]}}
18+ # Linux/stack builds
19+ # --------------------------------------------------------------------------
32− # Note COVERALLS (hpc-coveralls) requires cabal build
21+ # GHC 7.10.3
33− - env: BUILD=cabal GHCVER=8.0.2 CABALVER=1.24 COVERALLS=y
22+ - env: BUILD=stack RESOLVER=lts-6.35 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
34− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
23+ addons: {apt: {packages: [libgmp-dev,libsdl1.2-dev]}}
36− #- env: BUILD=cabal GHCVER=head CABALVER=head
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"
37− # addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
27+ addons: {apt: {packages: [libsdl1.2-dev]}}
39− - env: BUILD=stack RESOLVER=nightly CABALVER=2.0
30+ - env: BUILD=stack RESOLVER=lts-10.0 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
40− addons: {apt: {packages: [libgmp-dev,cabal-install-2.0], sources: [hvr-ghc]}}
31+ addons: {apt: {packages: [libsdl1.2-dev]}}
42− #- env: BUILD=cabal GHCVER=head CABALVER=head
33+ # Nightly
43− # addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
34+ - env: BUILD=stack RESOLVER=nightly
45− # cabal/stack/osx - TODO install cabal-install
36+ # --------------------------------------------------------------------------
38+ # --------------------------------------------------------------------------
46− # GHC 8.0.1
40+ # GHC 8.2.2/cabal
47− - env: BUILD=cabal RESOLVER=lts-7.24
41+ - env: BUILD=cabal RESOLVER=lts-10.0
50− # GHC 8.0.2
44+ # GHC 8.2.2/stack
51− - env: BUILD=stack RESOLVER=lts-9.16
45+ - env: BUILD=stack RESOLVER=lts-10.0
48+ # --------------------------------------------------------------------------
50+ # --------------------------------------------------------------------------
52+ - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
54+ # --------------------------------------------------------------------------
55+ # Builds that are allowed to fail
56+ # --------------------------------------------------------------------------
54 allow_failures:
58 allow_failures:
55− - env: BUILD=stack RESOLVER=nightly CABALVER=2.0
59+ - env: BUILD=stack RESOLVER=nightly
56− #- env: BUILD=cabal GHCVER=head CABALVER=head
60+ - env: BUILD=stack RESOLVER=lts-10.0 HLINT_OPTIONS="."
61− # Customizable options
64+ # ------------------------------------------------------------------------
62− PACKAGE_TEST_VER="7fe14f616d05d69de25a46002668a8509b6257a5"
65+ # You can customize these to desired values
66+ # ------------------------------------------------------------------------
68+ # The commit id of the package-test script to use
69+ PACKAGE_TEST_VER="1a4de26422ee296f0811e032bec922123f019963"
63 GHC_OPTIONS="-O0 -Werror"
70 GHC_OPTIONS="-O0 -Werror"
64− test -n "$COVERALLS" && \
65− COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines \
66− --exclude-dir=test test"
72+ # ------------------------------------------------------------------------
68− # Usually no changes should be needed after this
73+ # Normally no customizations should be needed this point onwards
74+ # ------------------------------------------------------------------------
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; }
79+ # When GHCVER or CABALVER env variables are specified, modify the path to
80+ # find the binaries installed from hvr-ghc repo
69 add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
81 add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
83+ # Emit the value of the var specified as arg only when the build is cabal
70 cabal_env() { test "$BUILD" = cabal && echo $1; }
84 cabal_env() { test "$BUILD" = cabal && echo $1; }
71− pkg_test() { echo https://raw.githubusercontent.com/harendra-kumar/package-test/$1/package-test.sh; }
73 CURL=$(which curl)
86 CURL=$(which curl)
74 PATH=/bin:/usr/bin
87 PATH=/bin:/usr/bin
75 add_path GHCVER ghc
88 add_path GHCVER ghc
76 add_path CABALVER cabal
89 add_path CABALVER cabal
91+ # We start with a clean environment (env -i) and specify all the
92+ # environment variables explicitly. TRAVIS vars are needed by
78− # TRAVIS vars are needed by hpc-coveralls
93+ # hpc-coveralls.
80 LC_ALL=C.UTF-8
95 LC_ALL=C.UTF-8
81 TRAVIS=$TRAVIS
96 TRAVIS=$TRAVIS
@@ -84,7 +99,7 @@ script:
84 BUILD=$BUILD
99 BUILD=$BUILD
85 RESOLVER=$RESOLVER
100 RESOLVER=$RESOLVER
86 STACK_UPGRADE=y
101 STACK_UPGRADE=y
87− STACK_YAML=$STACK_YAML
102+ STACK_YAML="$STACK_YAML"
88 STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
103 STACK_BUILD_OPTIONS="$STACK_BUILD_OPTIONS"
89 GHCVER=$GHCVER
104 GHCVER=$GHCVER
90 GHC_OPTIONS="$GHC_OPTIONS"
105 GHC_OPTIONS="$GHC_OPTIONS"
@@ -95,4 +110,20 @@ script:
95 $(cabal_env CABAL_CHECK_RELAX=y)
110 $(cabal_env CABAL_CHECK_RELAX=y)
96 $(cabal_env CABAL_NO_SANDBOX=y)
111 $(cabal_env CABAL_NO_SANDBOX=y)
97 $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
112 $(cabal_env CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com)
113+ HLINT_OPTIONS="$HLINT_OPTIONS"
98 /bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))
114 /bin/bash <($CURL -sL $(pkg_test $PACKAGE_TEST_VER))
119+# ------------------------------------------------------------------------
121+# ------------------------------------------------------------------------