@@ -124,7 +124,7 @@ jobs:
124124 HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))')
125125 echo "HCNUMVER=$HCNUMVER" >> "$GITHUB_ENV"
126126 echo "ARG_TESTS=--enable-tests" >> "$GITHUB_ENV"
127- echo "ARG_BENCH=--disable -benchmarks" >> "$GITHUB_ENV"
127+ echo "ARG_BENCH=--enable -benchmarks" >> "$GITHUB_ENV"
128128 echo "HEADHACKAGE=false" >> "$GITHUB_ENV"
129129 echo "ARG_COMPILER=--$HCKIND --with-compiler=$HC" >> "$GITHUB_ENV"
130130 env :
@@ -192,6 +192,7 @@ jobs:
192192 run : |
193193 touch cabal.project
194194 echo "packages: $GITHUB_WORKSPACE/source/." >> cabal.project
195+ echo "packages: $GITHUB_WORKSPACE/source/splitmix-tests" >> cabal.project
195196 cat cabal.project
196197 - name : sdist
197198 run : |
@@ -205,19 +206,28 @@ jobs:
205206 run : |
206207 PKGDIR_splitmix="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/splitmix-[0-9.]*')"
207208 echo "PKGDIR_splitmix=${PKGDIR_splitmix}" >> "$GITHUB_ENV"
209+ PKGDIR_splitmix_tests="$(find "$GITHUB_WORKSPACE/unpacked" -maxdepth 1 -type d -regex '.*/splitmix-tests-[0-9.]*')"
210+ echo "PKGDIR_splitmix_tests=${PKGDIR_splitmix_tests}" >> "$GITHUB_ENV"
208211 rm -f cabal.project cabal.project.local
209212 touch cabal.project
210213 touch cabal.project.local
211214 echo "packages: ${PKGDIR_splitmix}" >> cabal.project
215+ echo "packages: ${PKGDIR_splitmix_tests}" >> cabal.project
212216 echo "package splitmix" >> cabal.project
213217 echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
218+ echo "package splitmix-tests" >> cabal.project
219+ echo " ghc-options: -Werror=missing-methods -Werror=missing-fields" >> cabal.project
214220 if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package splitmix" >> cabal.project ; fi
215221 if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
222+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo "package splitmix-tests" >> cabal.project ; fi
223+ if [ $((HCNUMVER >= 90400)) -ne 0 ] ; then echo " ghc-options: -Werror=unused-packages" >> cabal.project ; fi
216224 if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package splitmix" >> cabal.project ; fi
217225 if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
226+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo "package splitmix-tests" >> cabal.project ; fi
227+ if [ $((HCNUMVER >= 90000)) -ne 0 ] ; then echo " ghc-options: -Werror=incomplete-patterns -Werror=incomplete-uni-patterns" >> cabal.project ; fi
218228 cat >> cabal.project <<EOF
219229 EOF
220- $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(splitmix)$/; }' >> cabal.project.local
230+ $HCPKG list --simple-output --names-only | perl -ne 'for (split /\s+/) { print "constraints: any.$_ installed\n" unless /^(splitmix|splitmix-tests )$/; }' >> cabal.project.local
221231 cat cabal.project
222232 cat cabal.project.local
223233 - name : dump install plan
@@ -230,10 +240,6 @@ jobs:
230240 key : ${{ runner.os }}-${{ matrix.compiler }}-${{ github.sha }}
231241 path : ~/.cabal/store
232242 restore-keys : ${{ runner.os }}-${{ matrix.compiler }}-
233- - name : install dependencies
234- run : |
235- $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --dependencies-only -j2 all
236- $CABAL v2-build $ARG_COMPILER $ARG_TESTS $ARG_BENCH --dependencies-only -j2 all
237243 - name : build w/o tests
238244 run : |
239245 $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
@@ -251,6 +257,8 @@ jobs:
251257 run : |
252258 cd ${PKGDIR_splitmix} || false
253259 ${CABAL} -vnormal check
260+ cd ${PKGDIR_splitmix_tests} || false
261+ ${CABAL} -vnormal check
254262 - name : haddock
255263 run : |
256264 $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK $ARG_TESTS $ARG_BENCH all
@@ -265,34 +273,29 @@ jobs:
265273 run : |
266274 $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' all --dry-run
267275 cabal-plan topo | sort
268- $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' --dependencies-only -j2 all
269276 $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' all
270277 $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.12' all
271278 - name : constraint set bytestring-0.11
272279 run : |
273280 if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' all --dry-run ; fi
274281 if [ $((HCNUMVER < 90800)) -ne 0 ] ; then cabal-plan topo | sort ; fi
275- if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' --dependencies-only -j2 all ; fi
276282 if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' all ; fi
277283 if [ $((HCNUMVER < 90800)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='bytestring ^>=0.11' all ; fi
278284 - name : constraint set time-1.12
279285 run : |
280286 if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' all --dry-run ; fi
281287 if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then cabal-plan topo | sort ; fi
282- if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' --dependencies-only -j2 all ; fi
283288 if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' all ; fi
284289 if [ $((HCNUMVER >= 80800 && HCNUMVER < 91200)) -ne 0 ] ; then $CABAL v2-test $ARG_COMPILER --enable-tests --disable-benchmarks --constraint='time ^>=1.12' all ; fi
285290 - name : constraint set time-1.11
286291 run : |
287292 if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.11' all --dry-run ; fi
288293 if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cabal-plan topo | sort ; fi
289- if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.11' --dependencies-only -j2 all ; fi
290294 if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.11' all ; fi
291295 - name : constraint set time-1.10
292296 run : |
293297 if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.10' all --dry-run ; fi
294298 if [ $((HCNUMVER < 90400)) -ne 0 ] ; then cabal-plan topo | sort ; fi
295- if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.10' --dependencies-only -j2 all ; fi
296299 if [ $((HCNUMVER < 90400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='time ^>=1.10' all ; fi
297300 - name : save cache
298301 if : always()
0 commit comments