fix: use shell-based hash instead of go-hashfiles
Some checks failed
Rust Build Cache Test / build (push) Failing after 4s
Some checks failed
Rust Build Cache Test / build (push) Failing after 4s
This commit is contained in:
@@ -19,11 +19,10 @@ jobs:
|
|||||||
|
|
||||||
- name: Get Cargo lock hash
|
- name: Get Cargo lock hash
|
||||||
id: hash
|
id: hash
|
||||||
uses: https://gitea.com/actions/go-hashfiles@v0.0.1
|
run: |
|
||||||
with:
|
echo "hash=$(cat Cargo.lock Cargo.toml | sha256sum | cut -d' ' -f1)" >> $GITHUB_OUTPUT
|
||||||
patterns: |
|
echo "=== Manifest hash ==="
|
||||||
Cargo.lock
|
echo "${{ env.hash }}"
|
||||||
Cargo.toml
|
|
||||||
|
|
||||||
- name: Cache cargo
|
- name: Cache cargo
|
||||||
uses: https://gitea.com/actions/cache@v3
|
uses: https://gitea.com/actions/cache@v3
|
||||||
@@ -36,16 +35,17 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
rust-${{ runner.os }}-
|
rust-${{ runner.os }}-
|
||||||
|
|
||||||
- name: Show cache info
|
- name: Show cache info (before build)
|
||||||
run: |
|
run: |
|
||||||
echo "=== Cache Key ==="
|
echo "=== Cache Key ==="
|
||||||
echo "rust-${{ runner.os }}-${{ steps.hash.outputs.hash }}"
|
echo "rust-${{ runner.os }}-${{ steps.hash.outputs.hash }}"
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Cargo cache directories ==="
|
echo "=== Cargo cache directories (before build) ==="
|
||||||
du -sh ~/.cargo/registry ~/.cargo/git target 2>/dev/null || echo "Dirs not yet present"
|
du -sh ~/.cargo/registry ~/.cargo/git target 2>/dev/null || echo "Dirs not yet present"
|
||||||
echo ""
|
echo ""
|
||||||
echo "=== Cargo version ==="
|
echo "=== Cargo version ==="
|
||||||
cargo --version
|
cargo --version
|
||||||
|
rustc --version
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --verbose
|
run: cargo build --verbose
|
||||||
|
|||||||
Reference in New Issue
Block a user