Skip to content

Commit fcf086c

Browse files
authored
Merge pull request #668 from haskell-CI/cabal-plan-constraint-sets
Run cabal-plan topo for each constraint set
2 parents 5c52bf1 + 0fee7a1 commit fcf086c

File tree

5 files changed

+11
-3
lines changed

5 files changed

+11
-3
lines changed

.github/workflows/haskell-ci.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
run: |
256256
perl -i -e 'while (<ARGV>) { print unless /package-id\s+(base-compat-batteries|bs-cmpt-bttrs)-\d+(\.\d+)*/; }' .ghc.environment.*
257257
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then cd ${PKGDIR_haskell_ci} || false ; fi
258-
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --fast -XHaskell2010 -XNoImplicitPrelude -XBangPatterns -XDeriveAnyClass -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable -XDerivingStrategies -XGeneralizedNewtypeDeriving -XScopedTypeVariables -XTypeOperators src ; fi
258+
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --fast -XHaskell2010 -XBangPatterns -XDeriveAnyClass -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable -XDerivingStrategies -XGeneralizedNewtypeDeriving -XNoImplicitPrelude -XScopedTypeVariables -XTypeOperators src ; fi
259259
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then cd ${PKGDIR_cabal_install_parsers} || false ; fi
260260
if [ $((HCNUMVER < 90000)) -ne 0 ] ; then doctest --fast -XHaskell2010 src ; fi
261261
- name: docspec
@@ -280,6 +280,8 @@ jobs:
280280
rm -f cabal.project.local
281281
- name: constraint set deepseq-1.4
282282
run: |
283+
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='deepseq ==1.4.*' --constraint='binary installed' all --dry-run ; fi
284+
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then cabal-plan topo | sort ; fi
283285
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='deepseq ==1.4.*' --constraint='binary installed' --dependencies-only -j2 all ; fi
284286
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='deepseq ==1.4.*' --constraint='binary installed' all ; fi
285287
if [ $((HCNUMVER < 80400)) -ne 0 ] ; then $CABAL v2-haddock --disable-documentation --haddock-all $ARG_COMPILER --with-haddock $HADDOCK --disable-tests --disable-benchmarks --constraint='deepseq ==1.4.*' --constraint='binary installed' all ; fi

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.16.6 - 2023-07-10
2+
3+
- Add `cabal-plan topo` to the constraint set steps
4+
15
## 0.16.5 - 2023-06-13
26

37
- Use optparse-applicative-0.18.1.

haskell-ci.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cabal-version: 2.2
22
name: haskell-ci
3-
version: 0.16.5
3+
version: 0.16.6
44
synopsis: Cabal package script generator for Travis-CI
55
description:
66
Script generator (@haskell-ci@) for

haskell-ci.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ run_cmd $CABAL v2-test $ARG_COMPILER $ARG_TESTS $ARG_BENCH all --test-show-detai
523523
put_info "doctest"
524524
run_cmd perl -i -e 'while (<ARGV>) { print unless /package-id\s+(base-compat-batteries|bs-cmpt-bttrs)-\d+(\.\d+)*/; }' .ghc.environment.*
525525
change_dir_if $((HCNUMVER < 90000)) ${PKGDIR_haskell_ci}
526-
run_cmd_if $((HCNUMVER < 90000)) doctest --fast -XHaskell2010 -XNoImplicitPrelude -XBangPatterns -XDeriveAnyClass -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable -XDerivingStrategies -XGeneralizedNewtypeDeriving -XScopedTypeVariables -XTypeOperators src
526+
run_cmd_if $((HCNUMVER < 90000)) doctest --fast -XHaskell2010 -XBangPatterns -XDeriveAnyClass -XDeriveFoldable -XDeriveFunctor -XDeriveGeneric -XDeriveTraversable -XDerivingStrategies -XGeneralizedNewtypeDeriving -XNoImplicitPrelude -XScopedTypeVariables -XTypeOperators src
527527
change_dir_if $((HCNUMVER < 90000)) ${PKGDIR_cabal_install_parsers}
528528
run_cmd_if $((HCNUMVER < 90000)) doctest --fast -XHaskell2010 src
529529

src/HaskellCI/GitHub.hs

+2
Original file line numberDiff line numberDiff line change
@@ -597,6 +597,8 @@ makeGitHub _argv config@Config {..} gitconfig prj jobs@JobVersions {..} = do
597597
let constraintFlags = map (\x -> "--constraint='" ++ x ++ "'") (csConstraints cs)
598598
let allFlags = unwords (testFlag : benchFlag : constraintFlags)
599599

600+
sh_cs $ "$CABAL v2-build $ARG_COMPILER " ++ allFlags ++ " all --dry-run"
601+
sh_cs $ "cabal-plan topo | sort"
600602
when cfgInstallDeps $ sh_cs $ "$CABAL v2-build $ARG_COMPILER " ++ allFlags ++ " --dependencies-only -j2 all"
601603
sh_cs $ "$CABAL v2-build $ARG_COMPILER " ++ allFlags ++ " all"
602604
when (docspecEnabled && csDocspec cs) $

0 commit comments

Comments
 (0)