debug: save then lookup same key to isolate backend issue
This commit is contained in:
@@ -27,33 +27,6 @@ runs:
|
|||||||
echo "hash=$HASH" >> $GITHUB_OUTPUT
|
echo "hash=$HASH" >> $GITHUB_OUTPUT
|
||||||
echo "fingerprint=$HASH" >> $GITHUB_ENV
|
echo "fingerprint=$HASH" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Lookup cache (debug)
|
|
||||||
id: cache-lookup
|
|
||||||
uses: https://gitea.com/actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.cargo/registry
|
|
||||||
key: rust-linux-${{ steps.cache-key.outputs.hash }}
|
|
||||||
lookup-only: true
|
|
||||||
|
|
||||||
- name: Show lookup result
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "cache-hit (lookup): ${{ steps.cache-lookup.outputs.cache-hit }}"
|
|
||||||
echo "key used: rust-linux-${{ steps.cache-key.outputs.hash }}"
|
|
||||||
|
|
||||||
- name: Cache cargo + rustup
|
|
||||||
id: cache
|
|
||||||
uses: https://gitea.com/actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
~/.rustup/toolchains
|
|
||||||
~/.rustup/settings.toml
|
|
||||||
target
|
|
||||||
key: rust-linux-${{ steps.cache-key.outputs.hash }}
|
|
||||||
restore-keys: rust-linux-
|
|
||||||
|
|
||||||
- name: Setup Rust
|
- name: Setup Rust
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -63,9 +36,37 @@ runs:
|
|||||||
# Add cargo bin to PATH for subsequent steps
|
# Add cargo bin to PATH for subsequent steps
|
||||||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Show cached sizes
|
- name: Show sizes before cache
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "=== ~/.cargo ===" && du -sh ~/.cargo 2>/dev/null || echo "(empty)"
|
echo "=== ~/.cargo ===" && du -sh ~/.cargo 2>/dev/null || echo "(empty)"
|
||||||
echo "=== ~/.rustup ===" && du -sh ~/.rustup 2>/dev/null || echo "(empty)"
|
echo "=== ~/.rustup ===" && du -sh ~/.rustup 2>/dev/null || echo "(empty)"
|
||||||
echo "=== target ===" && du -sh target 2>/dev/null || echo "(empty)"
|
|
||||||
|
- name: Save cache
|
||||||
|
id: cache-save
|
||||||
|
uses: https://gitea.com/actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/registry
|
||||||
|
~/.cargo/git
|
||||||
|
~/.rustup/toolchains
|
||||||
|
~/.rustup/settings.toml
|
||||||
|
target
|
||||||
|
key: rust-linux-${{ steps.cache-key.outputs.hash }}
|
||||||
|
save-always: true
|
||||||
|
|
||||||
|
- name: Lookup same key immediately after save
|
||||||
|
id: cache-lookup
|
||||||
|
uses: https://gitea.com/actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ~/.cargo/registry
|
||||||
|
key: rust-linux-${{ steps.cache-key.outputs.hash }}
|
||||||
|
lookup-only: true
|
||||||
|
|
||||||
|
- name: Show sizes after cache
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "=== ~/.cargo ===" && du -sh ~/.cargo 2>/dev/null || echo "(empty)"
|
||||||
|
echo "=== ~/.rustup ===" && du -sh ~/.rustup 2>/dev/null || echo "(empty)"
|
||||||
|
echo "save result: ${{ steps.cache-save.outputs.cache-hit }}"
|
||||||
|
echo "lookup result: ${{ steps.cache-lookup.outputs.cache-hit }}"
|
||||||
|
|||||||
Reference in New Issue
Block a user