@@ -1,14 +1,29 @@
1−# See https://github.com/harendra-kumar/packcheck for all options and their
2−# explanation.
1+# You can use any of the options supported by packcheck as environment
2+# variables here. See https://github.com/harendra-kumar/packcheck for all
3+# options and their explanation.
34env:
5+ # ------------------------------------------------------------------------
6+ # Global options, you can use these per build as well
7+ # ------------------------------------------------------------------------
48 global:
59 # ------------------------------------------------------------------------
6− # Global options used for all CI tests
10+ # Common options
711 # ------------------------------------------------------------------------
812 - GHC_OPTIONS="-Werror"
13+ - CABAL_REINIT_CONFIG=y
14+ - LC_ALL=C.UTF-8
915
1016 # ------------------------------------------------------------------------
11− # Options for builds that need stack (note, cabal builds can use stack)
17+ # What to build
18+ # ------------------------------------------------------------------------
19+ # - DISABLE_TEST=y
20+ # - DISABLE_BENCH=y
21+ # - DISABLE_DOCS=y
22+ # - DISABLE_SDIST_BUILD=y
23+ - ENABLE_INSTALL=y
24+
25+ # ------------------------------------------------------------------------
26+ # stack options
1227 # ------------------------------------------------------------------------
1328 # Note requiring a specific version of stack using STACKVER may fail due to
1429 # github API limit while checking and upgrading/downgrading to the specific
@@ -17,16 +32,17 @@ env:
1732 - STACK_UPGRADE="y"
1833
1934 # ------------------------------------------------------------------------
20− # Other options: Normally you would not need to customize these
21− # Note - these are used by both stack and cabal builds
35+ # cabal options
2236 # ------------------------------------------------------------------------
23− - CABAL_REINIT_CONFIG=y
2437 - CABAL_CHECK_RELAX=y
2538 - CABAL_NO_SANDBOX=y
2639 - CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com
27− - TEST_INSTALL=y
40+
41+ # ------------------------------------------------------------------------
42+ # Where to find the required tools
43+ # ------------------------------------------------------------------------
2844 - PATH=/bin:/usr/bin
29− - LC_ALL=C.UTF-8
45+ - TOOLS_DIR=/opt
3046
3147 # ------------------------------------------------------------------------
3248 # Location of packcheck.sh (the shell script invoked to perform CI tests ).
@@ -39,10 +55,12 @@ env:
3955 # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
4056 # then it is automatically pulled from this URL.
4157 - PACKCHECK_GITHUB_URL="https://raw.githubusercontent.com/harendra-kumar/packcheck"
42− - PACKCHECK_GITHUB_COMMIT="437800a90f3b469b04768af068094d2ac582f351"
58+ - PACKCHECK_GITHUB_COMMIT="1e44e612ce2af77c067aec489a254fdfbd6e589b"
4359
4460notifications:
45− email: false
61+ email:
62+ on_success: change
63+ on_failure: always
4664
4765# This matrix has total of 6 builds enabled, we try to cover last three major
4866# GHC versions, stack, cabal, Linux and OSX with minimum number of builds
@@ -55,78 +73,82 @@ matrix:
5573 include:
5674
5775 # --------------------------------------------------------------------------
58− # (Linux) stack builds
76+ # (Linux) stack builds (BUILD=stack). Some common envvars for stack builds
77+ # are: STACK_YAML, STACK_OPTIONS, STACK_BUILD_OPTIONS
5978 # --------------------------------------------------------------------------
6079
6180 # For 7.10.3 we disable -Werror because of some bogus SPECIALIZE pragma
6281 # warnings.
63− - env: BUILD=stack CABALVER=1.22 GHCVER=7.10.3 GHC_OPTIONS="" RESOLVER=lts-6 STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
64− addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3,libsdl1.2-dev], sources: [hvr-ghc]}}
65−
66− - env: BUILD=stack CABALVER=1.24 GHCVER=8.0.2 RESOLVER=lts-9 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
67− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,libsdl1.2-dev], sources: [hvr-ghc]}}
82+ - env: BUILD=stack RESOLVER=lts-6 GHCVER=7.10.3 GHC_OPTIONS="" STACK_YAML=stack-7.10.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
83+ addons: {apt: {packages: [cabal-install-1.22,libsdl1.2-dev], sources: [hvr-ghc]}}
6884
69− - env: BUILD=stack CABALVER=2.0 GHCVER=8.2.2 RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
70− addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,libsdl1.2-dev], sources: [hvr-ghc]}}
85+ - env: BUILD=stack RESOLVER=lts-9 GHCVER=8.0.2 STACK_YAML=stack-8.0.yaml STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
86+ addons: {apt: {packages: [cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
7187
72− - env: BUILD=stack CABALVER=2.0 GHCVER=8.2.2 RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag streamly:diag"
73− addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2,libsdl1.2-dev], sources: [hvr-ghc]}}
88+ # Use cabal-install-1.24 for stack solver to work
89+ - env: BUILD=stack GHCVER=8.2.2 RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag streamly:diag"
90+ addons: {apt: {packages: [cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
7491
75− # Nightly
92+ # Use cabal-install-1.24 for stack solver to work
7693 - env: BUILD=stack RESOLVER=nightly
94+ addons: {apt: {packages: [cabal-install-1.24], sources: [hvr-ghc]}}
7795
78− # Using a custom stack-yaml config file.
96+ # You can keep a STACK_YAML file at any path location
7997 #- env: BUILD=stack STACK_YAML=.ci/stack-8.0.yaml
8098
81− # You can customize a stack build even without a custom stack-yaml
82− # using STACK_OPTIONS, STACK_BUILD_OPTIONS, GHC_OPTIONS etc.
99+ # You can specify build flags like this:
83100 #- env: BUILD=stack RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag packcheck:dev"
84101
85102 # --------------------------------------------------------------------------
86− # (Linux) cabal builds
103+ # (Linux) cabal builds (BUILD=cabal, BUILD=cabal-new). Common envvars are:
104+ # CABAL_CONFIGURE_OPTIONS (cabal), CABAL_NEWBUILD_OPTIONS (cabal-new)
87105 # --------------------------------------------------------------------------
88106
89− #- env: BUILD=cabal CABALVER=1.22 GHCVER=7.10.3
107+ #- env: BUILD=cabal GHCVER=7.10.3
90108 # addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
91109
92− #- env: BUILD=cabal CABALVER=1.24 GHCVER=8.0.2
110+ #- env: BUILD=cabal-new GHCVER=8.0.2
93111 # addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
94112
95− # Consider that we do an 8.2.2 cabal build for OSX, see below
96− #- env: BUILD=cabal CABALVER=2.0 GHCVER=8.2.2
113+ # Disabled by default as we have a cabal ghc-8.2.2 build for OSX
114+ #- env: BUILD=cabal-new GHCVER=8.2.2
97115 # addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
98116
99− - env: BUILD=cabal CABALVER=2.2 GHCVER=8.4.2
117+ - env: BUILD=cabal-new GHCVER=8.4.2 GHC_OPTIONS=""
100118 addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.2], sources: [hvr-ghc]}}
101119
102− - env: BUILD=cabal CABALVER=head GHCVER=head
120+ - env: BUILD=cabal-new GHCVER=head GHC_OPTIONS=""
103121 addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
104122
123+ # You can specify build flags like this:
124+ #- env: BUILD=cabal-new CABAL_NEWBUILD_OPTIONS="--flags=dev"
125+ # addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
126+
105127 # --------------------------------------------------------------------------
106128 # OS X builds
107129 # --------------------------------------------------------------------------
108130
109− # GHC 8.2.2/cabal build via stack
110− - env: BUILD=cabal RESOLVER=lts-11
131+ # GHC 8.2.2/cabal build using stack!
132+ - env: BUILD=cabal-new RESOLVER=lts-11 GHCVER=8.2.2 GHC_OPTIONS=""
111133 os: osx
112134
113135 # GHC 8.2.2/stack
114− #- env: BUILD=stack RESOLVER=lts-11
136+ #- env: BUILD=stack RESOLVER=lts-11 GHCVER=8.2.2
115137 # os: osx
116138
117139 # --------------------------------------------------------------------------
118− # Lint
140+ # Lint e.g. HLINT_COMMANDS="hlint lint src; hlint lint test"
119141 # --------------------------------------------------------------------------
120142
121143 - env: BUILD=stack RESOLVER=lts-11 HLINT_COMMANDS="hlint lint ."
122144
123145 # --------------------------------------------------------------------------
124146 # Build and send coverage report to coveralls.io using hpc-coveralls
147+ # Works only with BUILD=cabal; add your project to coveralls.io first
148+ # For available options see hpc-coveralls docs.
125149 # --------------------------------------------------------------------------
126150
127− # Note COVERALLS (hpc-coveralls) works only with cabal build.
128− # For this to succeed you have to add your project to coveralls.io first
129− - env: BUILD=cabal CABALVER=2.0 GHCVER=8.2.2 COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test properties loops nested-loops parallel-loops"
151+ - env: BUILD=cabal COVERALLS_OPTIONS="--coverage-mode=StrictlyFullLines --exclude-dir=test test properties loops nested-loops parallel-loops"
130152 addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
131153
132154 # --------------------------------------------------------------------------
@@ -135,7 +157,7 @@ matrix:
135157
136158 allow_failures:
137159 - env: BUILD=stack RESOLVER=nightly
138− - env: BUILD=cabal CABALVER=head GHCVER=head
160+ - env: BUILD=cabal-new GHCVER=head GHC_OPTIONS=""
139161 - env: BUILD=stack RESOLVER=lts-11 HLINT_COMMANDS="hlint lint ."
140162
141163# ------------------------------------------------------------------------
@@ -154,13 +176,6 @@ install: true
154176
155177script:
156178 - |
157− # When GHCVER or CABALVER env variables are specified, modify the path to
158− # find the binaries installed from hvr-ghc repo
159− add_path() { eval "test -n \"\$$1\"" && eval "PATH=/opt/$2/\"\$$1\"/bin:$PATH"; true; }
160−
161− # Emit the value of the var specified as arg only when the build is cabal
162− cabal_env() { test "$BUILD" = cabal && echo $1; }
163−
164179 # If a custom stack-yaml is specified, replace the default with that
165180 if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
166181 unset STACK_YAML
@@ -171,9 +186,7 @@ script:
171186 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
172187 chmod +x $PACKCHECK_LOCAL_PATH
173188
174− add_path GHCVER ghc
175− add_path CABALVER cabal
176−
177− # In addition to PACKCHECK envvars hpc-coveralls needs TRAVIS,
178− # TRAVIS_JOB_ID variables set by the travis CI environment.
179− - bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
189+ # This script is governed by various PACKCHECK envvars that are set above.
190+ # In addition, hpc-coveralls needs TRAVIS, TRAVIS_JOB_ID variables set by
191+ # the travis CI environment.
192+ - bash -c "$PACKCHECK_LOCAL_PATH $BUILD PATH=/bin:/usr/bin"