mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-25 19:31:44 +03:00
ci: oldest, ci: more cleanup, more modular steps
This commit is contained in:
parent
605f8446e5
commit
57963554cb
77
.github/workflows/ci.yml
vendored
77
.github/workflows/ci.yml
vendored
@ -78,7 +78,8 @@ jobs:
|
||||
# # git log "$GITHUB_BASE_REF"..
|
||||
# # tools/commitlint "$GITHUB_BASE_REF"..
|
||||
|
||||
# EARLY CHECKS
|
||||
|
||||
# EARLY ACTIONS
|
||||
|
||||
- name: Check commit messages
|
||||
# keep this step synced in all workflows which do it
|
||||
@ -123,7 +124,8 @@ jobs:
|
||||
&& (grep -qE '^ *;' $$.gitlog || echo "do-all=true" >> $GITHUB_ENV)) \
|
||||
|| ( echo "could not identify commit range, continuing CI steps"; echo "do-all=true" >> $GITHUB_ENV )
|
||||
|
||||
- name: Uncache extra tools (ripgrep) in /usr/bin
|
||||
|
||||
- name: Cache - extra tools (ripgrep) in /usr/bin
|
||||
id: extratools
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@ -137,9 +139,10 @@ jobs:
|
||||
tools/checkembeddedfiles
|
||||
if: env.do-all
|
||||
|
||||
|
||||
# CACHES
|
||||
|
||||
- name: Uncache stack global package db
|
||||
- name: Cache - stack global package db
|
||||
id: stack-global
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@ -152,7 +155,7 @@ jobs:
|
||||
${{ runner.os }}-stack-global-$ghc
|
||||
if: env.do-all
|
||||
|
||||
- name: Uncache stack-installed programs in ~/.local/bin
|
||||
- name: Cache - stack-installed programs in ~/.local/bin
|
||||
id: stack-programs
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@ -162,7 +165,7 @@ jobs:
|
||||
${{ runner.os }}-stack-programs-$ghc
|
||||
if: env.do-all
|
||||
|
||||
- name: Uncache .stack-work
|
||||
- name: Cache - .stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .stack-work
|
||||
@ -171,7 +174,7 @@ jobs:
|
||||
${{ runner.os }}-stack-work-$ghc
|
||||
if: env.do-all
|
||||
|
||||
- name: Uncache hledger-lib/.stack-work
|
||||
- name: Cache - hledger-lib/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger-lib/.stack-work
|
||||
@ -180,7 +183,7 @@ jobs:
|
||||
${{ runner.os }}-hledger-lib-stack-work-$ghc
|
||||
if: env.do-all
|
||||
|
||||
- name: Uncache hledger/.stack-work
|
||||
- name: Cache - hledger/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger/.stack-work
|
||||
@ -189,7 +192,7 @@ jobs:
|
||||
${{ runner.os }}-hledger-stack-work-$ghc
|
||||
if: env.do-all
|
||||
|
||||
- name: Uncache hledger-ui/.stack-work
|
||||
- name: Cache - hledger-ui/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger-ui/.stack-work
|
||||
@ -198,7 +201,7 @@ jobs:
|
||||
${{ runner.os }}-hledger-ui-stack-work-$ghc
|
||||
if: env.do-all
|
||||
|
||||
- name: Uncache hledger-web/.stack-work
|
||||
- name: Cache - hledger-web/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger-web/.stack-work
|
||||
@ -207,50 +210,50 @@ jobs:
|
||||
${{ runner.os }}-hledger-web-stack-work-$ghc
|
||||
if: env.do-all
|
||||
|
||||
|
||||
# ACTIONS
|
||||
# one step at a time for faster & more focussed failures
|
||||
# in modular steps for faster & more focussed failures
|
||||
|
||||
# - name: Set up stack
|
||||
# run: |
|
||||
# # mkdir -p ~/.local/bin
|
||||
# # export PATH=~/.local/bin:$PATH
|
||||
# # curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack
|
||||
# # if [[ ! -x ~/.local/bin/stack ]]; then curl -sL https://get.haskellstack.org/stable/linux-x86_64.tar.gz | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'; chmod a+x ~/.local/bin/stack; fi
|
||||
# stack --version
|
||||
# if: env.do-all
|
||||
|
||||
# - name: Set up GHC
|
||||
# run: |
|
||||
# $stack setup --install-ghc
|
||||
# if: env.do-all
|
||||
|
||||
- name: Install haskell deps
|
||||
- name: Install old GHC
|
||||
run: |
|
||||
$stack build --test --bench --only-dependencies --dry-run
|
||||
$stack build --test --bench --only-dependencies
|
||||
if: env.do-all
|
||||
$stack setup --install-ghc
|
||||
|
||||
# These take ~2m on a 2023 github worker.
|
||||
|
||||
- name: Install hledger-lib deps
|
||||
run: |
|
||||
$stack build --test --bench hledger-lib --only-dependencies
|
||||
|
||||
- name: Build/test hledger-lib
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-lib
|
||||
if: env.do-all
|
||||
$stack install --test --bench hledger-lib --fast --ghc-options=-Werror
|
||||
|
||||
|
||||
- name: Install hledger deps
|
||||
run: |
|
||||
$stack build --test --bench hledger --only-dependencies
|
||||
|
||||
- name: Build/test hledger
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger
|
||||
if: env.do-all
|
||||
$stack install --test --bench hledger --fast --ghc-options=-Werror
|
||||
|
||||
|
||||
- name: Install hledger-ui deps
|
||||
run: |
|
||||
$stack build --test --bench hledger-ui --only-dependencies
|
||||
|
||||
- name: Build/test hledger-ui
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-ui
|
||||
if: env.do-all
|
||||
$stack install --test --bench hledger-ui --fast --ghc-options=-Werror
|
||||
|
||||
|
||||
- name: Install hledger-web deps
|
||||
run: |
|
||||
$stack build --test --bench hledger-web --only-dependencies
|
||||
|
||||
- name: Build/test hledger-web
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-web
|
||||
if: env.do-all
|
||||
$stack install --test --bench hledger-web --fast --ghc-options=-Werror
|
||||
|
||||
|
||||
- name: Install shelltestrunner
|
||||
run: |
|
||||
|
49
.github/workflows/oldest.yml
vendored
49
.github/workflows/oldest.yml
vendored
@ -29,9 +29,10 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
|
||||
# CACHES
|
||||
|
||||
- name: Uncache stack global package db
|
||||
- name: Cache - stack global package db
|
||||
id: stack-global
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@ -43,7 +44,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-global-$ghc
|
||||
|
||||
- name: Uncache stack-installed programs in ~/.local/bin
|
||||
- name: Cache - stack-installed programs in ~/.local/bin
|
||||
id: stack-programs
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
@ -52,7 +53,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-programs-$ghc
|
||||
|
||||
- name: Uncache .stack-work
|
||||
- name: Cache - .stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .stack-work
|
||||
@ -60,7 +61,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-stack-work-$ghc
|
||||
|
||||
- name: Uncache hledger-lib/.stack-work
|
||||
- name: Cache - hledger-lib/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger-lib/.stack-work
|
||||
@ -68,7 +69,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-lib-stack-work-$ghc
|
||||
|
||||
- name: Uncache hledger/.stack-work
|
||||
- name: Cache - hledger/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger/.stack-work
|
||||
@ -76,7 +77,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-stack-work-$ghc
|
||||
|
||||
- name: Uncache hledger-ui/.stack-work
|
||||
- name: Cache - hledger-ui/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger-ui/.stack-work
|
||||
@ -84,7 +85,7 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-ui-stack-work-$ghc
|
||||
|
||||
- name: Uncache hledger-web/.stack-work
|
||||
- name: Cache - hledger-web/.stack-work
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: hledger-web/.stack-work
|
||||
@ -92,32 +93,50 @@ jobs:
|
||||
restore-keys: |
|
||||
${{ runner.os }}-hledger-web-stack-work-$ghc
|
||||
|
||||
|
||||
# ACTIONS
|
||||
# one step at a time for faster & more focussed failures
|
||||
# in modular steps for faster & more focussed failures
|
||||
|
||||
- name: Install old GHC
|
||||
run: |
|
||||
$stack setup --install-ghc
|
||||
|
||||
- name: Install haskell deps
|
||||
|
||||
- name: Install hledger-lib deps
|
||||
run: |
|
||||
$stack build --test --bench --only-dependencies
|
||||
$stack build --test --bench hledger-lib --only-dependencies
|
||||
|
||||
- name: Build/test hledger-lib
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-lib
|
||||
$stack install --test --bench hledger-lib --fast --ghc-options=-Werror
|
||||
|
||||
|
||||
- name: Install hledger deps
|
||||
run: |
|
||||
$stack build --test --bench hledger --only-dependencies
|
||||
|
||||
- name: Build/test hledger
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger
|
||||
$stack install --test --bench hledger --fast --ghc-options=-Werror
|
||||
|
||||
|
||||
- name: Install hledger-ui deps
|
||||
run: |
|
||||
$stack build --test --bench hledger-ui --only-dependencies
|
||||
|
||||
- name: Build/test hledger-ui
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-ui
|
||||
$stack install --test --bench hledger-ui --fast --ghc-options=-Werror
|
||||
|
||||
- name: Build/test hledger-webb
|
||||
|
||||
- name: Install hledger-web deps
|
||||
run: |
|
||||
$stack install --fast --ghc-options=-Werror --test --bench hledger-web
|
||||
$stack build --test --bench hledger-web --only-dependencies
|
||||
|
||||
- name: Build/test hledger-web
|
||||
run: |
|
||||
$stack install --test --bench hledger-web --fast --ghc-options=-Werror
|
||||
|
||||
|
||||
- name: Install shelltestrunner
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user