;bin: linux/pr CI uses ghc 8.2, make functest uses default ghc (#1453)

This commit is contained in:
Simon Michael 2021-01-12 12:09:02 -08:00
parent fc32f22f86
commit 84bf42a9fc
5 changed files with 34 additions and 18 deletions

View File

@ -216,8 +216,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
# XXX func tests in bin are run only with GHC 8.2 for now
COLUMNS=80 $stack exec -- shelltest --execdir -j16 hledger/test bin/_scripts8.2.test -x /_ -x /addons
# XXX run only the bin/ func tests corresponding to the GHC version enabled above, for now
- name: Test haddock generation
env:

18
bin/_scripts8.2.test Normal file
View File

@ -0,0 +1,18 @@
# Functional tests for the add-on scripts in this directory.
# Keep synced: compile.sh, scripts*.test, hledger-*.hs ...
# Check that these ones still compile with this version of hledger.
# stdout and exit code are ignored for cleaner failure output.
#
# The tests below are hard coded to one GHC version.
# See also scriptsX.Y.test, used by our CI workflows which run other GHC versions
# (so they don't install and build for a whole extra GHC version).
#
# $ ./compile.sh >/dev/null
$ 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

View File

@ -1,6 +1,6 @@
#!/bin/sh
# Compile all add-on scripts in this directory.
# Keep synced: compile.sh, scripts.test, hledger-check-fancyassertions.hs.
# Keep synced: compile.sh, scripts*.test, hledger-*.hs ...
cd "$(dirname "$0")" || exit

View File

@ -18,9 +18,9 @@
--
-- 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
-- package dependencies, to the extent they are required, in multiple
-- places.
-- Keep synced: compile.sh, scripts.test, hledger-check-fancyassertions.hs.
-- Keep synced: compile.sh, scripts*.test, hledger-*.hs ...
{-
```

View File

@ -1,20 +1,18 @@
# Functional tests for the add-on scripts in this directory.
# Keep synced: compile.sh, scripts.test, hledger-check-fancyassertions.hs.
# Keep synced: compile.sh, scripts*.test, hledger-*.hs ...
# 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.
# The tests below are hard coded to one GHC version.
# See also scriptsX.Y.test, used by our CI workflows which run other GHC versions
# (so they don't install and build for a whole extra GHC version).
#
# $ ./compile.sh >/dev/null
$ 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
$ stack ghc hledger-balance-as-budget.hs >/dev/null || true
$ stack ghc hledger-check-fancyassertions.hs >/dev/null || true
$ stack ghc hledger-check-tagfiles.hs >/dev/null || true
$ stack ghc hledger-combine-balances.hs >/dev/null || true
$ stack ghc hledger-print-location.hs >/dev/null || true
$ stack ghc hledger-smooth.hs >/dev/null || true
$ stack ghc hledger-swap-dates.hs >/dev/null || true