ci: separate quick and full tests again, update

The linux full tests no longer test GHC 8.0,
and all full tests now always compile all modules
and generate optimised binaries.
This commit is contained in:
Simon Michael 2020-06-21 09:01:18 -07:00
parent 28f25f5b2d
commit 269b981dec
4 changed files with 27 additions and 62 deletions

View File

@ -1,10 +1,11 @@
# Thorough linux CI tests: build, test, benchmark, haddock & # Thorough tests on linux.
# run functional tests, with all supported GHC versions. # Runs on notable pushes to ci-linux, on notable pull requests against
# # master, and weekly on master.
# Runs: periodically on master, on notable pull request to master, and # Builds all modules optimised, runs unit, benchmark, doc, functional,
# on notable push to ci-linux or master. # haddock tests, with all supported GHC versions,
# and uploads binaries artifact.
name: linux full CI name: linux CI
on: on:
# Scheduled workflows run on the latest commit on the default or base branch. (master) # Scheduled workflows run on the latest commit on the default or base branch. (master)
@ -28,7 +29,7 @@ on:
- '!**.txt' - '!**.txt'
push: push:
branches: [ master, ci-linux ] branches: [ ci-linux ]
paths: paths:
- '.github/workflows/linux.yml' - '.github/workflows/linux.yml'
- 'stack*' - 'stack*'
@ -49,7 +50,8 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
plan: plan:
- { key: "80", args: "--stack-yaml=stack8.0.yaml" } # GHC 8.0 is still supported but we don't have a build plan for hledger-web, let it go
# - { key: "80", args: "--stack-yaml=stack8.0.yaml" }
- { key: "82", args: "--stack-yaml=stack8.2.yaml" } - { key: "82", args: "--stack-yaml=stack8.2.yaml" }
- { key: "84", args: "--stack-yaml=stack8.4.yaml" } - { key: "84", args: "--stack-yaml=stack8.4.yaml" }
- { key: "86", args: "--stack-yaml=stack8.6.yaml" } - { key: "86", args: "--stack-yaml=stack8.6.yaml" }
@ -61,20 +63,6 @@ jobs:
- name: Check out - name: Check out
uses: actions/checkout@v2 uses: actions/checkout@v2
# deep clone so we can restore timestamps (see below)
with:
fetch-depth: 0
# Restore timestamps to help stack not rebuild unchanged files.
# https://stackoverflow.com/questions/60906336
# https://stackoverflow.com/a/36243002/84401
# https://www.reddit.com/r/haskell/comments/g00ldn/haskell_stack_on_github_actions/
- name: Restore source file timestamps
run: |
git ls-tree -r --name-only HEAD | while read filename; do
TS="$(git log -1 --format="%ct" -- ${filename})"
touch "${filename}" -mt "$(date --date="@$TS" "+%Y%m%d%H%M.%S")"
done
# things to be cached/restored: # things to be cached/restored:
@ -191,9 +179,9 @@ jobs:
env: env:
ARGS: ${{ matrix.plan.args }} ARGS: ${{ matrix.plan.args }}
- name: Build hledger quickly warning free, run unit tests, run doc tests - name: Build all hledger modules optimised and warning free, run unit/doc/bench tests
run: | run: |
stack $ARGS install --test --bench --fast --ghc-options=-Werror --no-terminal stack $ARGS install --test --bench --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --no-terminal
# --pedantic --no-run-benchmarks # --pedantic --no-run-benchmarks
env: env:
ARGS: ${{ matrix.plan.args }} ARGS: ${{ matrix.plan.args }}
@ -215,7 +203,7 @@ jobs:
- name: Test haddock generation - name: Test haddock generation
run: | run: |
time stack $ARGS build --fast --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs" time stack $ARGS build --haddock --no-haddock-deps --no-haddock-hyperlink-source --haddock-arguments="--no-print-missing-docs"
# --no-haddock-hyperlink-source is 25% faster # --no-haddock-hyperlink-source is 25% faster
# --no-print-missing-docs is 600% quieter # --no-print-missing-docs is 600% quieter
env: env:

View File

@ -1,6 +1,7 @@
# Light Mac CI tests: build and run functional tests with one GHC version. # Fairly thorough tests on mac.
# # Runs on notable pushes to ci-mac, and weekly on master.
# Runs: periodically on master, and on notable push to ci-mac. # Builds all modules optimised, runs unit, doc, functional tests,
# and uploads binaries artifact.
name: mac CI name: mac CI
@ -31,20 +32,6 @@ jobs:
- name: Check out - name: Check out
uses: actions/checkout@v2 uses: actions/checkout@v2
# deep clone so we can restore timestamps (see below)
with:
fetch-depth: 0
# Restore timestamps to help stack not rebuild unchanged files.
# https://stackoverflow.com/questions/60906336
# https://stackoverflow.com/a/36243002/84401
# https://www.reddit.com/r/haskell/comments/g00ldn/haskell_stack_on_github_actions/
- name: Restore source file timestamps
run: |
git ls-tree -r --name-only HEAD | while read filename; do
TS="$(git log -1 --format="%ct" -- ${filename})"
touch "${filename}" -mt "$(date -r "$TS" "+%Y%m%d%H%M.%S")"
done
# things to be cached/restored: # things to be cached/restored:
@ -112,11 +99,11 @@ jobs:
- name: Install haskell deps - name: Install haskell deps
run: | run: |
stack build --test --bench --only-dependencies stack build --test --only-dependencies
- name: Build hledger and test unit tests, doc tests - name: Build hledger and test unit tests, doc tests
run: | run: |
stack install --test --ghc-options=-Werror stack install --test --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
# --pedantic # --pedantic
- name: Install shelltestrunner - name: Install shelltestrunner

View File

@ -1,5 +1,5 @@
# Quick tests for notable pushes to master, # Quick tests on linux, minimising compute power and carbon emissions.
# minimising compute power and carbon emissions. # Runs on notable pushes to master.
# Builds incrementally and runs functional tests with one GHC version. # Builds incrementally and runs functional tests with one GHC version.
name: push CI name: push CI

View File

@ -1,3 +1,8 @@
# Fairly thorough tests on windows.
# Runs on notable pushes to ci-windows, and weekly on master.
# Builds all modules optimised, runs unit, doc tests,
# and uploads binaries artifact.
# Light Windows CI tests: build and run functional tests with one GHC version. # Light Windows CI tests: build and run functional tests with one GHC version.
# GHC 8.8.2 for now to avoid https://gitlab.haskell.org/ghc/ghc/issues/17926. # GHC 8.8.2 for now to avoid https://gitlab.haskell.org/ghc/ghc/issues/17926.
# #
@ -32,21 +37,6 @@ jobs:
- name: Check out - name: Check out
uses: actions/checkout@v2 uses: actions/checkout@v2
# deep clone so we can restore timestamps (see below)
with:
fetch-depth: 0
# Restore timestamps to help stack not rebuild unchanged files.
# https://stackoverflow.com/questions/60906336
# https://stackoverflow.com/a/36243002/84401
# https://www.reddit.com/r/haskell/comments/g00ldn/haskell_stack_on_github_actions/
- name: Restore source file timestamps
shell: bash
run: |
git ls-tree -r --name-only HEAD | while read filename; do
TS="$(git log -1 --format="%ct" -- ${filename})"
touch "${filename}" -mt "$(date --date="@$TS" "+%Y%m%d%H%M.%S")"
done
# things to be cached/restored: # things to be cached/restored:
@ -141,7 +131,7 @@ jobs:
- name: Build hledger executables - name: Build hledger executables
run: | run: |
stack --resolver=lts-15.3 --no-terminal install --ghc-options=-Werror stack --resolver=lts-15.3 --no-terminal install --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror
# --pedantic # --pedantic
# run hledger-lib/hledger functional tests, skipping the ones for addons # run hledger-lib/hledger functional tests, skipping the ones for addons