ci: report cache hit/miss

This commit is contained in:
🪞👃🪞 2025-04-12 00:02:09 +03:00
parent ee6f24515f
commit f58ff407b3
2 changed files with 24 additions and 8 deletions
.forgejo/workflows

View file

@ -1,11 +1,16 @@
on: [tag]
on:
push:
tags: '*'
jobs:
build:
container: { image: "alpine:edge" }
steps:
- name: install deps
run: apk add --no-cache nodejs tree rustup git just cloc build-base clang20-dev pipewire-jack-dev lilv-dev serd-dev
run: apk add --no-cache bash nodejs tree rustup git just cloc build-base clang20-dev pipewire-jack-dev lilv-dev serd-dev
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
- run: whoami && pwd && tree && cloc src/ && cloc .
- id: cache
name: cache restore
@ -19,9 +24,13 @@ jobs:
~/.cargo/git/db/
target/
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
- run: whoami && pwd && tree
- run: cloc src/ && cloc .
- name: cache hit
if: steps.cache.outputs.cache-hit == 'true'
run: echo "cache hit! :)"
- name: cache miss
if: steps.cache.outputs.cache-miss != 'true'
run: echo "cache miss! :("
- run: rustup-init -y
- run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv
#- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just doc

View file

@ -7,6 +7,9 @@ jobs:
- name: install deps
run: apk add --no-cache nodejs tree rustup git just cloc build-base clang20-dev pipewire-jack-dev lilv-dev serd-dev
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
- run: whoami && pwd && tree && cloc src/ && cloc .
- id: cache
name: cache restore
uses: https://data.forgejo.org/actions/cache/restore@v4
@ -19,12 +22,16 @@ jobs:
~/.cargo/git/db/
target/
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
- run: whoami && pwd && tree
- name: cache hit
if: steps.cache.outputs.cache-hit == 'true'
run: echo "cache hit! :)"
- name: cache miss
if: steps.cache.outputs.cache-miss != 'true'
run: echo "cache miss! :("
- run: cloc src/ && cloc .
- run: rustup-init -y
- run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv
#- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just doc
- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just test
- run: tree