;ci: windows, linux-x64-stack: add unit testing to these

This commit is contained in:
Simon Michael 2024-09-30 15:19:37 -10:00
parent d8d236385d
commit 4dc4dbc917
3 changed files with 15 additions and 19 deletions

View File

@ -1,5 +1,5 @@
# Runs on any push to binaries-linux-x64-stack.
# ACTION: Builds and saves mac x64 static binaries with stack and the default ghc. May not work,
# ACTION: Builds, unit-tests and saves mac x64 static binaries with stack and the default ghc. May not work,
# the cabal-based binaries-linux-x64.yml is normally used instead.
name: binaries-linux-x64-stack
@ -106,15 +106,11 @@ jobs:
run: |
stack --allow-different-user setup --install-ghc
- name: Build with stack
- name: Build with stack and run unit tests
run: |
stack --allow-different-user build --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger # || (echo "ERROR: building hledger failed"; false)
stack --allow-different-user build --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-ui # || (echo "ERROR: building hledger-ui failed"; false)
stack --allow-different-user build --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-web # || (echo "ERROR: building hledger-web failed"; false)
- name: Run built-in unit tests
run: |
stack exec -- hledger test
stack --allow-different-user build --test --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger # || (echo "ERROR: building hledger failed"; false)
stack --allow-different-user build --test --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-ui # || (echo "ERROR: building hledger-ui failed"; false)
stack --allow-different-user build --test --ghc-options='-optl-static -fPIC' --ghc-options=-Werror hledger-web # || (echo "ERROR: building hledger-web failed"; false)
- name: Gather binaries
run: |

View File

@ -1,5 +1,5 @@
# Runs on any push to binaries-linux-x64 or binaries.
# ACTION: Builds and saves linux x64 static binaries with cabal and the ghc version below and Alpine linux,
# ACTION: Builds, unit-tests and saves linux x64 static binaries with cabal and the ghc version below and Alpine linux,
# which provides the statically-linkable musl.
name: binaries-linux-x64

View File

@ -1,5 +1,5 @@
# Runs on any push to binaries-windows-x64 or binaries.
# ACTION: Builds and saves windows x64 binaries with stack and the default ghc.
# ACTION: Builds, unit-tests and saves windows x64 binaries with stack and the default ghc.
name: binaries-windows-x64
on:
@ -118,24 +118,24 @@ jobs:
run: |
./stack --no-terminal setup --install-ghc
# - name: Install shelltestrunner
## - export PATH=~/.local/bin:$PATH
# - if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.10; fi
# - shelltest --version
- name: Install haskell deps
run: |
./stack --no-terminal build --only-dependencies --dry-run
./stack --no-terminal build --only-dependencies
./stack --no-terminal build --test --only-dependencies --dry-run
./stack --no-terminal build --test --only-dependencies
# use whichever GHC is in default stack.yaml
- name: Build all hledger modules warning free, optimised and minimised
run: |
./stack --no-terminal install --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
./stack --no-terminal install --test --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
# --ghc-options=-split-sections doesn't work on windows, "too many sections"
# --pedantic
# - name: Install shelltestrunner
## - export PATH=~/.local/bin:$PATH
# - if [[ ! -x ~/.local/bin/shelltest ]]; then stack install shelltestrunner-1.10; fi
# - shelltest --version
# run hledger-lib/hledger functional tests, skipping the ones for addons
## - export PATH=~/.local/bin:$PATH
#- COLUMNS=80 stack exec -- shelltest --execdir -j16 hledger/test -x /_ -x /addons -x ledger-compat/ledger-baseline -x ledger-compat/ledger-regress -x ledger-compat/ledger-collected