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

View file

@ -1,11 +1,16 @@
on: [tag] on:
push:
tags: '*'
jobs: jobs:
build: build:
container: { image: "alpine:edge" } container: { image: "alpine:edge" }
steps: steps:
- name: install deps - 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 - id: cache
name: cache restore name: cache restore
@ -19,9 +24,13 @@ jobs:
~/.cargo/git/db/ ~/.cargo/git/db/
target/ target/
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY . - name: cache hit
- run: whoami && pwd && tree if: steps.cache.outputs.cache-hit == 'true'
- run: cloc src/ && cloc . run: echo "cache hit! :)"
- name: cache miss
if: steps.cache.outputs.cache-miss != 'true'
run: echo "cache miss! :("
- run: rustup-init -y - run: rustup-init -y
- run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv - 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 doc

View file

@ -7,6 +7,9 @@ jobs:
- name: install deps - 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 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 - id: cache
name: cache restore name: cache restore
uses: https://data.forgejo.org/actions/cache/restore@v4 uses: https://data.forgejo.org/actions/cache/restore@v4
@ -19,12 +22,16 @@ jobs:
~/.cargo/git/db/ ~/.cargo/git/db/
target/ target/
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY . - name: cache hit
- run: whoami && pwd && tree 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: cloc src/ && cloc .
- run: rustup-init -y - run: rustup-init -y
- run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv - 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: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just test
- run: tree - run: tree