on master help sign in
update CI configs to latest packcheck
21c07abHarendra Kumar
.travis.yml+66−53
@@ -1,14 +1,29 @@
1+# You can use any of the options supported by packcheck as environment
1−# See https://github.com/harendra-kumar/packcheck for all options and their
2+# variables here. See https://github.com/harendra-kumar/packcheck for all
2−# explanation.
3+# options and their explanation.
3env:
4env:
5+ # ------------------------------------------------------------------------
6+ # Global options, you can use these per build as well
7+ # ------------------------------------------------------------------------
4 global:
8 global:
5 # ------------------------------------------------------------------------
9 # ------------------------------------------------------------------------
6− # Global options used for all CI tests
10+ # Common options
7 # ------------------------------------------------------------------------
11 # ------------------------------------------------------------------------
8 - GHC_OPTIONS="-Werror"
12 - GHC_OPTIONS="-Werror"
13+ - CABAL_REINIT_CONFIG=y
14+ - LC_ALL=C.UTF-8
9
15
10 # ------------------------------------------------------------------------
16 # ------------------------------------------------------------------------
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
12 # ------------------------------------------------------------------------
27 # ------------------------------------------------------------------------
13 # Note requiring a specific version of stack using STACKVER may fail due to
28 # Note requiring a specific version of stack using STACKVER may fail due to
14 # github API limit while checking and upgrading/downgrading to the specific
29 # github API limit while checking and upgrading/downgrading to the specific
@@ -17,16 +32,17 @@ env:
17 - STACK_UPGRADE="y"
32 - STACK_UPGRADE="y"
18
33
19 # ------------------------------------------------------------------------
34 # ------------------------------------------------------------------------
20− # Other options: Normally you would not need to customize these
35+ # cabal options
21− # Note - these are used by both stack and cabal builds
22 # ------------------------------------------------------------------------
36 # ------------------------------------------------------------------------
23− - CABAL_REINIT_CONFIG=y
24 - CABAL_CHECK_RELAX=y
37 - CABAL_CHECK_RELAX=y
25 - CABAL_NO_SANDBOX=y
38 - CABAL_NO_SANDBOX=y
26 - CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com
39 - CABAL_HACKAGE_MIRROR=hackage.haskell.org:http://hackage.fpcomplete.com
27− - TEST_INSTALL=y
40+
41+ # ------------------------------------------------------------------------
42+ # Where to find the required tools
43+ # ------------------------------------------------------------------------
28 - PATH=/bin:/usr/bin
44 - PATH=/bin:/usr/bin
29− - LC_ALL=C.UTF-8
45+ - TOOLS_DIR=/opt
30
46
31 # ------------------------------------------------------------------------
47 # ------------------------------------------------------------------------
32 # Location of packcheck.sh (the shell script invoked to perform CI tests ).
48 # Location of packcheck.sh (the shell script invoked to perform CI tests ).
@@ -39,10 +55,12 @@ env:
39 # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
55 # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
40 # then it is automatically pulled from this URL.
56 # then it is automatically pulled from this URL.
41 - PACKCHECK_GITHUB_URL="https://raw.githubusercontent.com/harendra-kumar/packcheck"
57 - PACKCHECK_GITHUB_URL="https://raw.githubusercontent.com/harendra-kumar/packcheck"
42− - PACKCHECK_GITHUB_COMMIT="437800a90f3b469b04768af068094d2ac582f351"
58+ - PACKCHECK_GITHUB_COMMIT="1e44e612ce2af77c067aec489a254fdfbd6e589b"
43
59
44notifications:
60notifications:
45− email: false
61+ email:
62+ on_success: change
63+ on_failure: always
46
64
47# This matrix has total of 6 builds enabled, we try to cover last three major
65# This matrix has total of 6 builds enabled, we try to cover last three major
48# GHC versions, stack, cabal, Linux and OSX with minimum number of builds
66# GHC versions, stack, cabal, Linux and OSX with minimum number of builds
@@ -55,78 +73,82 @@ matrix:
55 include:
73 include:
56
74
57 # --------------------------------------------------------------------------
75 # --------------------------------------------------------------------------
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
59 # --------------------------------------------------------------------------
78 # --------------------------------------------------------------------------
60
79
61 # For 7.10.3 we disable -Werror because of some bogus SPECIALIZE pragma
80 # For 7.10.3 we disable -Werror because of some bogus SPECIALIZE pragma
62 # warnings.
81 # 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"
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"
67− addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2,libsdl1.2-dev], sources: [hvr-ghc]}}
83+ addons: {apt: {packages: [cabal-install-1.22,libsdl1.2-dev], sources: [hvr-ghc]}}
68
84
69− - env: BUILD=stack CABALVER=2.0 GHCVER=8.2.2 RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag streamly:examples-sdl"
85+ - env: BUILD=stack RESOLVER=lts-9 GHCVER=8.0.2 STACK_YAML=stack-8.0.yaml 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]}}
86+ addons: {apt: {packages: [cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
71
87
88+ # Use cabal-install-1.24 for stack solver to work
72− - env: BUILD=stack CABALVER=2.0 GHCVER=8.2.2 RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag streamly:diag"
89+ - env: BUILD=stack 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]}}
90+ addons: {apt: {packages: [cabal-install-1.24,libsdl1.2-dev], sources: [hvr-ghc]}}
74
91
75− # Nightly
92+ # Use cabal-install-1.24 for stack solver to work
76 - env: BUILD=stack RESOLVER=nightly
93 - env: BUILD=stack RESOLVER=nightly
94+ addons: {apt: {packages: [cabal-install-1.24], sources: [hvr-ghc]}}
77
95
78− # Using a custom stack-yaml config file.
96+ # You can keep a STACK_YAML file at any path location
79 #- env: BUILD=stack STACK_YAML=.ci/stack-8.0.yaml
97 #- env: BUILD=stack STACK_YAML=.ci/stack-8.0.yaml
80
98
81− # You can customize a stack build even without a custom stack-yaml
99+ # You can specify build flags like this:
82− # using STACK_OPTIONS, STACK_BUILD_OPTIONS, GHC_OPTIONS etc.
83 #- env: BUILD=stack RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag packcheck:dev"
100 #- env: BUILD=stack RESOLVER=lts-11 STACK_BUILD_OPTIONS="--flag packcheck:dev"
84
101
85 # --------------------------------------------------------------------------
102 # --------------------------------------------------------------------------
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)
87 # --------------------------------------------------------------------------
105 # --------------------------------------------------------------------------
88
106
89− #- env: BUILD=cabal CABALVER=1.22 GHCVER=7.10.3
107+ #- env: BUILD=cabal GHCVER=7.10.3
90 # addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
108 # addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}}
91
109
92− #- env: BUILD=cabal CABALVER=1.24 GHCVER=8.0.2
110+ #- env: BUILD=cabal-new GHCVER=8.0.2
93 # addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
111 # addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}}
94
112
95− # Consider that we do an 8.2.2 cabal build for OSX, see below
113+ # Disabled by default as we have a cabal ghc-8.2.2 build for OSX
96− #- env: BUILD=cabal CABALVER=2.0 GHCVER=8.2.2
114+ #- env: BUILD=cabal-new GHCVER=8.2.2
97 # addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
115 # addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
98
116
99− - env: BUILD=cabal CABALVER=2.2 GHCVER=8.4.2
117+ - env: BUILD=cabal-new GHCVER=8.4.2 GHC_OPTIONS=""
100 addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.2], sources: [hvr-ghc]}}
118 addons: {apt: {packages: [cabal-install-2.2,ghc-8.4.2], sources: [hvr-ghc]}}
101
119
102− - env: BUILD=cabal CABALVER=head GHCVER=head
120+ - env: BUILD=cabal-new GHCVER=head GHC_OPTIONS=""
103 addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
121 addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}}
104
122
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+
105 # --------------------------------------------------------------------------
127 # --------------------------------------------------------------------------
106 # OS X builds
128 # OS X builds
107 # --------------------------------------------------------------------------
129 # --------------------------------------------------------------------------
108
130
109− # GHC 8.2.2/cabal build via stack
131+ # GHC 8.2.2/cabal build using stack!
110− - env: BUILD=cabal RESOLVER=lts-11
132+ - env: BUILD=cabal-new RESOLVER=lts-11 GHCVER=8.2.2 GHC_OPTIONS=""
111 os: osx
133 os: osx
112
134
113 # GHC 8.2.2/stack
135 # GHC 8.2.2/stack
114− #- env: BUILD=stack RESOLVER=lts-11
136+ #- env: BUILD=stack RESOLVER=lts-11 GHCVER=8.2.2
115 # os: osx
137 # os: osx
116
138
117 # --------------------------------------------------------------------------
139 # --------------------------------------------------------------------------
118− # Lint
140+ # Lint e.g. HLINT_COMMANDS="hlint lint src; hlint lint test"
119 # --------------------------------------------------------------------------
141 # --------------------------------------------------------------------------
120
142
121 - env: BUILD=stack RESOLVER=lts-11 HLINT_COMMANDS="hlint lint ."
143 - env: BUILD=stack RESOLVER=lts-11 HLINT_COMMANDS="hlint lint ."
122
144
123 # --------------------------------------------------------------------------
145 # --------------------------------------------------------------------------
124 # Build and send coverage report to coveralls.io using hpc-coveralls
146 # 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.
125 # --------------------------------------------------------------------------
149 # --------------------------------------------------------------------------
126
150
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"
130 addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
152 addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.2], sources: [hvr-ghc]}}
131
153
132 # --------------------------------------------------------------------------
154 # --------------------------------------------------------------------------
@@ -135,7 +157,7 @@ matrix:
135
157
136 allow_failures:
158 allow_failures:
137 - env: BUILD=stack RESOLVER=nightly
159 - env: BUILD=stack RESOLVER=nightly
138− - env: BUILD=cabal CABALVER=head GHCVER=head
160+ - env: BUILD=cabal-new GHCVER=head GHC_OPTIONS=""
139 - env: BUILD=stack RESOLVER=lts-11 HLINT_COMMANDS="hlint lint ."
161 - env: BUILD=stack RESOLVER=lts-11 HLINT_COMMANDS="hlint lint ."
140
162
141# ------------------------------------------------------------------------
163# ------------------------------------------------------------------------
@@ -154,13 +176,6 @@ install: true
154
176
155script:
177script:
156 - |
178 - |
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−
164 # If a custom stack-yaml is specified, replace the default with that
179 # If a custom stack-yaml is specified, replace the default with that
165 if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
180 if test -e "$STACK_YAML"; then rm -f stack.yaml && ln -sv $STACK_YAML stack.yaml; else true; fi
166 unset STACK_YAML
181 unset STACK_YAML
@@ -171,9 +186,7 @@ script:
171 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
186 if test ! -e "$PACKCHECK_LOCAL_PATH"; then $CURL -sL -o "$PACKCHECK_LOCAL_PATH" $PACKCHECK_URL; fi;
172 chmod +x $PACKCHECK_LOCAL_PATH
187 chmod +x $PACKCHECK_LOCAL_PATH
173
188
174− add_path GHCVER ghc
189+ # This script is governed by various PACKCHECK envvars that are set above.
175− add_path CABALVER cabal
176−
177− # In addition to PACKCHECK envvars hpc-coveralls needs TRAVIS,
190+ # In addition, hpc-coveralls needs TRAVIS, TRAVIS_JOB_ID variables set by
178− # TRAVIS_JOB_ID variables set by the travis CI environment.
191+ # the travis CI environment.
179− - bash -c "$PACKCHECK_LOCAL_PATH $BUILD"
192+ - bash -c "$PACKCHECK_LOCAL_PATH $BUILD PATH=/bin:/usr/bin"
appveyor.yml+31−13
@@ -1,33 +1,49 @@
1+# You can use any of the options supported by packcheck as environment
1−# See https://github.com/harendra-kumar/packcheck for all options and their
2+# variables here. See https://github.com/harendra-kumar/packcheck for all
2−# explanation.
3+# options and their explanation.
3environment:
4environment:
5+ # ------------------------------------------------------------------------
6+ # Global options, you can use these per build as well
7+ # ------------------------------------------------------------------------
4 global:
8 global:
5 # ------------------------------------------------------------------------
9 # ------------------------------------------------------------------------
6− # Global options used for all CI tests
10+ # Common options
7 # ------------------------------------------------------------------------
11 # ------------------------------------------------------------------------
8 GHC_OPTIONS: "-Werror"
12 GHC_OPTIONS: "-Werror"
13+ CABAL_REINIT_CONFIG: "y"
14+ LC_ALL: "C.UTF-8"
15+
16+ # ------------------------------------------------------------------------
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"
9
24
10 # ------------------------------------------------------------------------
25 # ------------------------------------------------------------------------
11− # Options for builds that need stack (note, cabal builds can use stack)
26+ # stack options
12 # ------------------------------------------------------------------------
27 # ------------------------------------------------------------------------
13 # Note requiring a specific version of stack using STACKVER may fail due to
28 # Note requiring a specific version of stack using STACKVER may fail due to
14 # github API limit while checking and upgrading/downgrading to the specific
29 # github API limit while checking and upgrading/downgrading to the specific
15 # version.
30 # version.
16 #STACKVER: "1.6.5"
31 #STACKVER: "1.6.5"
17 STACK_UPGRADE: "y"
32 STACK_UPGRADE: "y"
18− RESOLVER: "lts-11.0"
33+ RESOLVER: "lts-11"
34+ STACK_ROOT: "c:\\sr"
19
35
20 # ------------------------------------------------------------------------
36 # ------------------------------------------------------------------------
21− # Normally you would not need to customize these params
37+ # cabal options
22 # ------------------------------------------------------------------------
38 # ------------------------------------------------------------------------
23− CABAL_REINIT_CONFIG: "y"
24 CABAL_CHECK_RELAX: "y"
39 CABAL_CHECK_RELAX: "y"
25 CABAL_NO_SANDBOX: "y"
40 CABAL_NO_SANDBOX: "y"
26 CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
41 CABAL_HACKAGE_MIRROR: "hackage.haskell.org:http://hackage.fpcomplete.com"
27− TEST_INSTALL: "y"
42+
28− LC_ALL: "C.UTF-8"
43+ # ------------------------------------------------------------------------
44+ # Where to find the required tools
45+ # ------------------------------------------------------------------------
29 PATH: "%PATH%;%APPDATA%\\local\\bin"
46 PATH: "%PATH%;%APPDATA%\\local\\bin"
30− STACK_ROOT: "c:\\sr"
31 LOCAL_BIN: "%APPDATA%\\local\\bin"
47 LOCAL_BIN: "%APPDATA%\\local\\bin"
32
48
33 # ------------------------------------------------------------------------
49 # ------------------------------------------------------------------------
@@ -41,7 +57,7 @@ environment:
41 # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
57 # If you have not committed packcheck.sh in your repo at PACKCHECK_LOCAL_PATH
42 # then it is automatically pulled from this URL.
58 # then it is automatically pulled from this URL.
43 PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
59 PACKCHECK_GITHUB_URL: "https://raw.githubusercontent.com/harendra-kumar/packcheck"
44− PACKCHECK_GITHUB_COMMIT: "437800a90f3b469b04768af068094d2ac582f351"
60+ PACKCHECK_GITHUB_COMMIT: "1e44e612ce2af77c067aec489a254fdfbd6e589b"
45
61
46cache:
62cache:
47 - "%STACK_ROOT%"
63 - "%STACK_ROOT%"
@@ -57,9 +73,11 @@ before_test:
57- if not exist %PACKCHECK_LOCAL_PATH% curl -sSkL -o%PACKCHECK_LOCAL_PATH% %PACKCHECK_GITHUB_URL%/%PACKCHECK_GITHUB_COMMIT%/packcheck.sh
73- if not exist %PACKCHECK_LOCAL_PATH% curl -sSkL -o%PACKCHECK_LOCAL_PATH% %PACKCHECK_GITHUB_URL%/%PACKCHECK_GITHUB_COMMIT%/packcheck.sh
58- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN%
74- if not exist %LOCAL_BIN% mkdir %LOCAL_BIN%
59- where stack.exe || curl -sSkL -ostack.zip http://www.stackage.org/stack/windows-x86_64 && 7z x stack.zip stack.exe && move stack.exe %LOCAL_BIN%
75- where stack.exe || curl -sSkL -ostack.zip http://www.stackage.org/stack/windows-x86_64 && 7z x stack.zip stack.exe && move stack.exe %LOCAL_BIN%
60−#- stack upgrade --binary-only --binary-version %STACKVER%
76+- if defined STACKVER (stack upgrade --binary-only --binary-version %STACKVER%) else (stack upgrade --binary-only || ver > nul)
61- stack --version
77- stack --version
62
78
63test_script:
79test_script:
64- stack setup > nul
80- stack setup > nul
81+- for /f "usebackq tokens=*" %%i in (`where 7z.exe`) do set PATH7Z=%%i\..
82+- for /f "usebackq tokens=*" %%i in (`where git.exe`) do set PATHGIT=%%i\..
65−- chcp 65001 && stack exec bash -- -c "chmod +x %PACKCHECK_LOCAL_PATH%; %PACKCHECK_LOCAL_PATH% stack"
83+- chcp 65001 && stack exec bash -- -c "chmod +x %PACKCHECK_LOCAL_PATH%; %PACKCHECK_LOCAL_PATH% stack PATH=/usr/bin:\"%PATH7Z%\":\"%PATHGIT%\""