-
Notifications
You must be signed in to change notification settings - Fork 710
CI: remove dependency on cabal-plan (#8891) #8893
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,6 @@ | |
# See https://github.com/haskell/cabal/issues/8049 | ||
HC=ghc | ||
CABAL=cabal | ||
CABALPLAN=cabal-plan | ||
JOBS=4 | ||
LIBTESTS=true | ||
CLITESTS=true | ||
|
@@ -50,7 +49,6 @@ Available options: | |
--(no-)run-cli-suite Run cabal-testsuite with client | ||
-w, --with-compiler HC With compiler | ||
--with-cabal CABAL With cabal-install | ||
--with-cabal-plan CABALPLAN With cabal-plan | ||
--extra-hc HC Extra compiler to run test-suite with | ||
--(no-)doctest Run doctest on library | ||
--(no-)solver-benchmarks Build and trial run solver-benchmarks | ||
|
@@ -196,11 +194,6 @@ while [ $# -gt 0 ]; do | |
shift | ||
shift | ||
;; | ||
--with-cabal-plan) | ||
CABALPLAN=$2 | ||
shift | ||
shift | ||
;; | ||
--extra-hc) | ||
EXTRAHCS="$EXTRAHCS $2" | ||
shift | ||
|
@@ -315,7 +308,7 @@ BUILDDIR=dist-newstyle-validate-$BASEHC | |
CABAL_TESTSUITE_BDIR="$(pwd)/$BUILDDIR/build/$ARCH/$BASEHC/cabal-testsuite-3" | ||
|
||
CABALNEWBUILD="${CABAL} v2-build $JOBS -w $HC --builddir=$BUILDDIR --project-file=$PROJECTFILE" | ||
CABALPLANLISTBIN="${CABALPLAN} list-bin --builddir=$BUILDDIR" | ||
CABALLISTBIN="${CABAL} list-bin --builddir=$BUILDDIR --project-file=$PROJECTFILE" | ||
|
||
# header | ||
####################################################################### | ||
|
@@ -327,7 +320,6 @@ cat <<EOF | |
compiler: $HC | ||
runhaskell: $RUNHASKELL | ||
cabal-install: $CABAL | ||
cabal-plan: $CABALPLAN | ||
jobs: $JOBS | ||
Cabal tests: $LIBTESTS | ||
cabal-install tests: $CLITESTS | ||
|
@@ -347,7 +339,6 @@ print_header print-tool-versions | |
|
||
timed $HC --version | ||
timed $CABAL --version | ||
timed $CABALPLAN --version | ||
|
||
for EXTRAHC in $EXTRAHCS; do | ||
timed $EXTRAHC --version | ||
|
@@ -368,8 +359,11 @@ step_time_summary() { | |
|
||
step_build() { | ||
print_header "build" | ||
print_header "Step Build: dry run" | ||
timed $CABALNEWBUILD $TARGETS --dry-run || exit 1 | ||
$CABALPLAN topo --builddir=$BUILDDIR || exit 1 | ||
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we still want a list of packages in the plan (though not topologically sorted) we can do it with a jq command: jq -r '."install-plan" | map(."pkg-name" + "-" + ."pkg-version" + " " + ."component-name") | join("\n")' "$BUILDDIR/cache/plan.json" iirc it's installed by default on github runners There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. TBH I don't see a big value in this list. If someone feels strongly about it, I could add this oneliner, perhaps. But I'm not a fan of this solution either: it looks rather fragile to my uniformed taste. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I guess, it was requested here: #8440 so there are users for it... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since #8440 was opened by @andreasabel, paging him in... Andreas, maybe you have a preference between:
I personally lean towards (3) as I fail to see much advantage of anything else. One difference between
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
If we want the whole build plan we need 1. or 2. (or cabal freeze I guess) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good to know, thank you! I don't see much emotion one way or another, so I'm just leaving the current version (with your oneliner) for the review... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Where is the one-liner replacement for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @andreasabel oops: forgot to commit. Fixed. |
||
print_header "Step Build: full build plan (cached and to-be-built dependencies):" | ||
jq -r '."install-plan" | map(."pkg-name" + "-" + ."pkg-version" + " " + ."component-name") | join("\n")' "$BUILDDIR/cache/plan.json" | ||
print_header "Step Build: actual build" | ||
timed $CABALNEWBUILD $TARGETS || exit 1 | ||
} | ||
|
||
|
@@ -386,22 +380,22 @@ timed doctest -package-env=doctest-Cabal --fast Cabal/Distribution Cabal/Languag | |
step_lib_tests() { | ||
print_header "Cabal: tests" | ||
|
||
CMD="$($CABALPLANLISTBIN Cabal-tests:test:unit-tests) $TESTSUITEJOBS --hide-successes --with-ghc=$HC" | ||
CMD="$($CABALLISTBIN Cabal-tests:test:unit-tests) $TESTSUITEJOBS --hide-successes --with-ghc=$HC" | ||
(cd Cabal-tests && timed $CMD) || exit 1 | ||
|
||
CMD="$($CABALPLANLISTBIN Cabal-tests:test:check-tests) $TESTSUITEJOBS --hide-successes" | ||
CMD="$($CABALLISTBIN Cabal-tests:test:check-tests) $TESTSUITEJOBS --hide-successes" | ||
(cd Cabal-tests && timed $CMD) || exit 1 | ||
|
||
CMD="$($CABALPLANLISTBIN Cabal-tests:test:parser-tests) $TESTSUITEJOBS --hide-successes" | ||
CMD="$($CABALLISTBIN Cabal-tests:test:parser-tests) $TESTSUITEJOBS --hide-successes" | ||
(cd Cabal-tests && timed $CMD) || exit 1 | ||
|
||
CMD="$($CABALPLANLISTBIN Cabal-tests:test:rpmvercmp) $TESTSUITEJOBS --hide-successes" | ||
CMD="$($CABALLISTBIN Cabal-tests:test:rpmvercmp) $TESTSUITEJOBS --hide-successes" | ||
(cd Cabal-tests && timed $CMD) || exit 1 | ||
|
||
CMD="$($CABALPLANLISTBIN Cabal-tests:test:no-thunks-test) $TESTSUITEJOBS --hide-successes" | ||
CMD="$($CABALLISTBIN Cabal-tests:test:no-thunks-test) $TESTSUITEJOBS --hide-successes" | ||
(cd Cabal-tests && timed $CMD) || exit 1 | ||
|
||
CMD=$($CABALPLANLISTBIN Cabal-tests:test:hackage-tests) | ||
CMD=$($CABALLISTBIN Cabal-tests:test:hackage-tests) | ||
(cd Cabal-tests && timed $CMD read-fields) || exit 1 | ||
if $HACKAGETESTSALL; then | ||
(cd Cabal-tests && timed $CMD parsec) || exit 1 | ||
|
@@ -418,14 +412,14 @@ fi | |
step_lib_suite() { | ||
print_header "Cabal: cabal-testsuite" | ||
|
||
CMD="$($CABALPLANLISTBIN cabal-testsuite:exe:cabal-tests) --builddir=$CABAL_TESTSUITE_BDIR $TESTSUITEJOBS --with-ghc=$HC --hide-successes" | ||
CMD="$($CABALLISTBIN cabal-testsuite:exe:cabal-tests) --builddir=$CABAL_TESTSUITE_BDIR $TESTSUITEJOBS --with-ghc=$HC --hide-successes" | ||
(cd cabal-testsuite && timed $CMD) || exit 1 | ||
} | ||
|
||
step_lib_suite_extras() { | ||
for EXTRAHC in $EXTRAHCS; do | ||
|
||
CMD="$($CABALPLANLISTBIN cabal-testsuite:exe:cabal-tests) --builddir=$CABAL_TESTSUITE_BDIR $TESTSUITEJOBS --with-ghc=$EXTRAHC --hide-successes" | ||
CMD="$($CABALLISTBIN cabal-testsuite:exe:cabal-tests) --builddir=$CABAL_TESTSUITE_BDIR $TESTSUITEJOBS --with-ghc=$EXTRAHC --hide-successes" | ||
(cd cabal-testsuite && timed $CMD) || exit 1 | ||
|
||
done | ||
|
@@ -438,19 +432,19 @@ step_cli_tests() { | |
print_header "cabal-install: tests" | ||
|
||
# this are sorted in asc time used, quicker tests first. | ||
CMD="$($CABALPLANLISTBIN cabal-install:test:long-tests) $TESTSUITEJOBS --hide-successes" | ||
CMD="$($CABALLISTBIN cabal-install:test:long-tests) $TESTSUITEJOBS --hide-successes" | ||
(cd cabal-install && timed $CMD) || exit 1 | ||
|
||
# This doesn't work in parallel either | ||
CMD="$($CABALPLANLISTBIN cabal-install:test:unit-tests) -j1 --hide-successes" | ||
CMD="$($CABALLISTBIN cabal-install:test:unit-tests) -j1 --hide-successes" | ||
(cd cabal-install && timed $CMD) || exit 1 | ||
|
||
# Only single job, otherwise we fail with "Heap exhausted" | ||
CMD="$($CABALPLANLISTBIN cabal-install:test:mem-use-tests) -j1 --hide-successes" | ||
CMD="$($CABALLISTBIN cabal-install:test:mem-use-tests) -j1 --hide-successes" | ||
(cd cabal-install && timed $CMD) || exit 1 | ||
|
||
# This test-suite doesn't like concurrency | ||
CMD="$($CABALPLANLISTBIN cabal-install:test:integration-tests2) -j1 --hide-successes --with-ghc=$HC" | ||
CMD="$($CABALLISTBIN cabal-install:test:integration-tests2) -j1 --hide-successes --with-ghc=$HC" | ||
(cd cabal-install && timed $CMD) || exit 1 | ||
} | ||
|
||
|
@@ -460,7 +454,7 @@ CMD="$($CABALPLANLISTBIN cabal-install:test:integration-tests2) -j1 --hide-succe | |
step_cli_suite() { | ||
print_header "cabal-install: cabal-testsuite" | ||
|
||
CMD="$($CABALPLANLISTBIN cabal-testsuite:exe:cabal-tests) --builddir=$CABAL_TESTSUITE_BDIR --with-cabal=$($CABALPLANLISTBIN cabal-install:exe:cabal) $TESTSUITEJOBS --with-ghc=$HC --hide-successes" | ||
CMD="$($CABALLISTBIN cabal-testsuite:exe:cabal-tests) --builddir=$CABAL_TESTSUITE_BDIR --with-cabal=$($CABALLISTBIN cabal-install:exe:cabal) $TESTSUITEJOBS --with-ghc=$HC --hide-successes" | ||
(cd cabal-testsuite && timed $CMD) || exit 1 | ||
} | ||
|
||
|
@@ -470,15 +464,15 @@ CMD="$($CABALPLANLISTBIN cabal-testsuite:exe:cabal-tests) --builddir=$CABAL_TEST | |
step_solver_benchmarks_tests() { | ||
print_header "solver-benchmarks: test" | ||
|
||
CMD="$($CABALPLANLISTBIN solver-benchmarks:test:unit-tests)" | ||
CMD="$($CABALLISTBIN solver-benchmarks:test:unit-tests)" | ||
(cd Cabal && timed $CMD) || exit 1 | ||
} | ||
|
||
step_solver_benchmarks_run() { | ||
print_header "solver-benchmarks: run" | ||
|
||
SOLVEPKG=Chart-diagrams | ||
CMD="$($CABALPLANLISTBIN solver-benchmarks:exe:hackage-benchmark) --cabal1=$CABAL --cabal2=$($CABALPLANLISTBIN cabal-install:exe:cabal) --trials=5 --packages=$SOLVEPKG --print-trials" | ||
CMD="$($CABALLISTBIN solver-benchmarks:exe:hackage-benchmark) --cabal1=$CABAL --cabal2=$($CABALLISTBIN cabal-install:exe:cabal) --trials=5 --packages=$SOLVEPKG --print-trials" | ||
(cd Cabal && timed $CMD) || exit 1 | ||
} | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.