diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index a5f287b8a..e35482371 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -73,6 +73,7 @@ jobs: matrix: plan: # GHC 8.0 is still supported but we don't have a build plan for hledger-web, let it go + # XXX func tests in bin (see shelltest below) are run only with GHC 8.2 for now # - { ghc: "80" , stack: "stack --stack-yaml=stack8.0.yaml" } - { ghc: "82" , stack: "stack --stack-yaml=stack8.2.yaml" } # - { ghc: "84" , stack: "stack --stack-yaml=stack8.4.yaml" } @@ -216,6 +217,7 @@ jobs: run: | export PATH=~/.local/bin:$PATH COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test bin -x /_ -x /addons + # XXX func tests in bin are run only with GHC 8.2 for now - name: Test haddock generation env: diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index a33c8083e..c1bd97e2e 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -47,6 +47,7 @@ jobs: # - { ghc: "86" , stack: "stack --stack-yaml=stack8.6.yaml" } # - { ghc: "88" , stack: "stack --stack-yaml=stack.yaml" } - { ghc: "810" , stack: "stack --stack-yaml=stack8.10.yaml" } + # XXX func tests in bin should be run only with GHC 8.10 for now (see shelltest below) steps: @@ -159,7 +160,8 @@ jobs: stack: ${{ matrix.plan.stack }} run: | export PATH=~/.local/bin:$PATH - COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test bin -x /_ -x /addons + COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons # bin + # XXX func tests in bin are run only with GHC 8.2 for now # artifacts: diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 2542913b8..1b9cbab3b 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -152,4 +152,5 @@ jobs: stack: ${{ matrix.plan.stack }} run: | export PATH=~/.local/bin:$PATH - COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test bin -x /_ -x /addons + COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons # bin + # XXX func tests in bin are run only with GHC 8.2 for now diff --git a/bin/compile.sh b/bin/compile.sh index a613e3868..bebf391e9 100755 --- a/bin/compile.sh +++ b/bin/compile.sh @@ -1,5 +1,6 @@ #!/bin/sh # Compile all add-on scripts in this directory. +# Keep synced: compile.sh, scripts.test, hledger-check-fancyassertions.hs. cd "$(dirname "$0")" || exit diff --git a/bin/hledger-check-fancyassertions.hs b/bin/hledger-check-fancyassertions.hs index 898f36b7e..71df7ad99 100755 --- a/bin/hledger-check-fancyassertions.hs +++ b/bin/hledger-check-fancyassertions.hs @@ -15,6 +15,12 @@ -- hledger version from that stackage resolver, so in this case you -- should check out the corresponding release-tagged version of this -- script for compatibility (eg: git checkout 1.18.1). +-- +-- This setup is adapted for some current limitations of stack's +-- ghc/runghc/script commands. Unfortunately it requires repeating +-- package dependencies, to the extent they are required, in three +-- places. +-- Keep synced: compile.sh, scripts.test, hledger-check-fancyassertions.hs. {- ``` diff --git a/bin/scripts.test b/bin/scripts.test index b963fdcfd..0b0681451 100644 --- a/bin/scripts.test +++ b/bin/scripts.test @@ -1,12 +1,20 @@ # Functional tests for the add-on scripts in this directory. +# Keep synced: compile.sh, scripts.test, hledger-check-fancyassertions.hs. -# Check that they all (or at least these ones) still compile with this version of hledger. +# Check that these ones still compile with this version of hledger. # stdout and exit code are ignored for cleaner failure output. +# +# Our CI workflows run with multiple GHC versions, but the tests below +# are hard coded to one version. We don't want them to cause a whole +# extra GHC version to be installed and built for. +# XXX For now, we hard code GHC 8.2 here, same as the linux/pull request CI, +# and run these tests only there. +# # $ ./compile.sh >/dev/null -$ ./hledger-balance-as-budget.hs >/dev/null || true -$ ./hledger-check-fancyassertions.hs >/dev/null || true -$ ./hledger-check-tagfiles.hs >/dev/null || true -$ ./hledger-combine-balances.hs >/dev/null || true -$ ./hledger-print-location.hs >/dev/null || true -$ ./hledger-smooth.hs >/dev/null || true -$ ./hledger-swap-dates.hs >/dev/null || true +$ stack --stack-yaml ../stack8.2.yaml ghc hledger-balance-as-budget.hs >/dev/null || true +$ stack --stack-yaml ../stack8.2.yaml ghc hledger-check-fancyassertions.hs >/dev/null || true +$ stack --stack-yaml ../stack8.2.yaml ghc hledger-check-tagfiles.hs >/dev/null || true +$ stack --stack-yaml ../stack8.2.yaml ghc hledger-combine-balances.hs >/dev/null || true +$ stack --stack-yaml ../stack8.2.yaml ghc hledger-print-location.hs >/dev/null || true +$ stack --stack-yaml ../stack8.2.yaml ghc hledger-smooth.hs >/dev/null || true +$ stack --stack-yaml ../stack8.2.yaml ghc hledger-swap-dates.hs >/dev/null || true