mirror of
https://github.com/simonmichael/hledger.git
synced 2024-09-20 18:58:23 +03:00
ci: ci: drop unused matrix; cleanup
This commit is contained in:
parent
e1540af4b8
commit
50ee1db91f
84
.github/workflows/ci.yml
vendored
84
.github/workflows/ci.yml
vendored
@ -61,19 +61,21 @@ jobs:
|
||||
# with the platform(s) and GHC version(s) enabled below.
|
||||
# On success, upload the binaries as a downloadable artifact.
|
||||
ci:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# keep synced with branch protection rules, see link above
|
||||
plan:
|
||||
# the oldest supported ghc, to check backward compatibility
|
||||
# - { ghc: "810", stack: "stack --stack-yaml=stack8.10.yaml" }
|
||||
- { ghc: "944", stack: "stack --stack-yaml=stack9.4.yaml" }
|
||||
|
||||
# declare env.CONTINUE variable used below, to prevent "Context access might be invalid" warnings
|
||||
# strategy:
|
||||
# fail-fast: false
|
||||
# matrix:
|
||||
# # keep synced with branch protection rules, see link above
|
||||
# plan:
|
||||
# # the oldest supported ghc, to check backward compatibility
|
||||
# # - { ghc: "810", stack: "stack --stack-yaml=stack8.10.yaml" }
|
||||
# - { ghc: "944", stack: "stack --stack-yaml=stack9.4.yaml" }
|
||||
|
||||
env:
|
||||
ghc: 944
|
||||
stack: stack --stack-yaml=stack9.4.yaml
|
||||
# declare this to prevent "Context access might be invalid" warnings below
|
||||
CONTINUE:
|
||||
|
||||
steps:
|
||||
@ -89,12 +91,12 @@ jobs:
|
||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||
run: |
|
||||
echo $GITHUB_CONTEXT
|
||||
# echo "$GITHUB_SHA"
|
||||
# echo "$GITHUB_REF"
|
||||
# echo "$GITHUB_HEAD_REF"
|
||||
# echo "$GITHUB_BASE_REF"
|
||||
# git log "$GITHUB_BASE_REF"..
|
||||
# tools/commitlint "$GITHUB_BASE_REF"..
|
||||
# echo "$GITHUB_SHA"
|
||||
# echo "$GITHUB_REF"
|
||||
# echo "$GITHUB_HEAD_REF"
|
||||
# echo "$GITHUB_BASE_REF"
|
||||
# git log "$GITHUB_BASE_REF"..
|
||||
# tools/commitlint "$GITHUB_BASE_REF"..
|
||||
|
||||
- name: Check commit messages
|
||||
# keep this step synced in all workflows which do it
|
||||
@ -155,9 +157,9 @@ jobs:
|
||||
# XXX if stack.yaml is a symlink, this fails with
|
||||
# Error: The template is not valid. .github/workflows/push.yml (Line: 103, Col: 14): hashFiles('**.yaml') failed.
|
||||
# Fail to hash files under directory '/home/runner/work/hledger/hledger'
|
||||
key: ${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||
key: ${{ runner.os }}-stack-global-$ghc-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-global-${{ matrix.plan.ghc }}
|
||||
${{ runner.os }}-stack-global-$ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Uncache stack-installed programs in ~/.local/bin
|
||||
@ -165,54 +167,54 @@ jobs:
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ~/.local/bin
|
||||
key: ${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||
key: ${{ runner.os }}-stack-programs-$ghc-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-programs-${{ matrix.plan.ghc }}
|
||||
${{ runner.os }}-stack-programs-$ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Uncache .stack-work
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: .stack-work
|
||||
key: ${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.yaml') }}
|
||||
key: ${{ runner.os }}-stack-work-$ghc-${{ hashFiles('**.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-work-${{ matrix.plan.ghc }}
|
||||
${{ runner.os }}-stack-work-$ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Uncache hledger-lib/.stack-work
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: hledger-lib/.stack-work
|
||||
key: ${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||
key: ${{ runner.os }}-hledger-lib-stack-work-$ghc-${{ hashFiles('hledger-lib/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-lib-stack-work-${{ matrix.plan.ghc }}
|
||||
${{ runner.os }}-hledger-lib-stack-work-$ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Uncache hledger/.stack-work
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: hledger/.stack-work
|
||||
key: ${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger/package.yaml') }}
|
||||
key: ${{ runner.os }}-hledger-stack-work-$ghc-${{ hashFiles('hledger/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-stack-work-${{ matrix.plan.ghc }}
|
||||
${{ runner.os }}-hledger-stack-work-$ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Uncache hledger-ui/.stack-work
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: hledger-ui/.stack-work
|
||||
key: ${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||
key: ${{ runner.os }}-hledger-ui-stack-work-$ghc-${{ hashFiles('hledger-ui/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-ui-stack-work-${{ matrix.plan.ghc }}
|
||||
${{ runner.os }}-hledger-ui-stack-work-$ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Uncache hledger-web/.stack-work
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: hledger-web/.stack-work
|
||||
key: ${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}-${{ hashFiles('hledger-web/package.yaml') }}
|
||||
key: ${{ runner.os }}-hledger-web-stack-work-$ghc-${{ hashFiles('hledger-web/package.yaml') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-web-stack-work-${{ matrix.plan.ghc }}
|
||||
${{ runner.os }}-hledger-web-stack-work-$ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
# actions:
|
||||
@ -227,39 +229,21 @@ jobs:
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Install GHC
|
||||
env:
|
||||
stack: ${{ matrix.plan.stack }}
|
||||
run: |
|
||||
$stack setup --install-ghc
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Install haskell deps
|
||||
env:
|
||||
stack: ${{ matrix.plan.stack }}
|
||||
run: |
|
||||
$stack build --test --bench --only-dependencies --dry-run
|
||||
$stack build --test --bench --only-dependencies
|
||||
if: env.CONTINUE
|
||||
|
||||
# - name: Build all hledger modules warning free, optimised and minimised, run unit/doc/bench tests
|
||||
# env:
|
||||
# stack: ${{ matrix.plan.stack }}
|
||||
# run: |
|
||||
# $stack install --test --bench --force-dirty --ghc-options=-fforce-recomp --ghc-options=-Werror --ghc-options=-split-sections --no-terminal
|
||||
# # build quicker when tweaking ci: $stack install --ghc-options=-Werror --ghc-options=-split-sections --no-terminal
|
||||
# # -split-sections shrinks binaries by 30% on average here
|
||||
# # --pedantic --no-run-benchmarks
|
||||
# if: env.CONTINUE
|
||||
|
||||
# Packages are built one at a time to fail faster on error.
|
||||
# Note: doctests won't run if using GHC 9.0, see hledger-lib/package.yaml
|
||||
# Takes ~2m on a 2023 github worker.
|
||||
- name: Build all hledger modules fast, warning free, run unit/doc/bench tests
|
||||
env:
|
||||
stack: ${{ matrix.plan.stack }}
|
||||
run: |
|
||||
# These previously used --force-dirty --ghc-options--fforce-recomp for some reason ?
|
||||
# But that built hledger-lib four times and hledger three times. Try without.
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-lib
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-ui
|
||||
@ -268,8 +252,6 @@ jobs:
|
||||
if: env.CONTINUE
|
||||
|
||||
- name: Install shelltestrunner
|
||||
env:
|
||||
stack: ${{ matrix.plan.stack }}
|
||||
run: |
|
||||
export PATH=~/.local/bin:$PATH
|
||||
if [[ ! -x ~/.local/bin/shelltest ]]; then $stack install shelltestrunner-1.10; fi
|
||||
@ -278,8 +260,6 @@ jobs:
|
||||
|
||||
# Takes ~30s on a 2023 github worker.
|
||||
- name: Test functional tests (excluding addons)
|
||||
env:
|
||||
stack: ${{ matrix.plan.stack }}
|
||||
run: |
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user