mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-05-20 14:41:21 +00:00
ci(semver-checks): avoid stale caches after rustc or tool upgrade
With an upgrade to the Rust toolchain, the version of the rustdoc JSON may change. We incorporate the rustc version into the cache key to automatically invalidate the cache in that case. Additionally, we also incorporate the version of the `cargo semver-checks` tool. Related: https://github.com/obi1kenobi/cargo-semver-checks/issues/415. Pull-Request: #3664.
This commit is contained in:
parent
7e9581c4ef
commit
82e38bfa28
@ -17,10 +17,15 @@ runs:
|
||||
MAX_STABLE_VERSION=$(curl https://crates.io/api/v1/crates/${{ inputs.crate }} --silent | jq '.crate.max_stable_version')
|
||||
echo "version=${MAX_STABLE_VERSION}" >> $GITHUB_OUTPUT
|
||||
|
||||
- shell: bash
|
||||
run: |
|
||||
rustc --version | tee .rustc-version
|
||||
cargo semver-checks --version | tee .semver-checks-version
|
||||
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ github.workspace }}/target/semver-checks/cache
|
||||
key: semver-checks-cache-${{ inputs.crate }}-${{ steps.get-released-version.outputs.version }}
|
||||
key: semver-checks-cache-${{ hashFiles('.rustc-version') }}-${{ hashFiles('.semver-checks-version') }}-${{ inputs.crate }}-${{ steps.get-released-version.outputs.version }}
|
||||
|
||||
- run: cargo semver-checks check-release --package ${{ inputs.crate }} --verbose
|
||||
shell: bash
|
||||
|
Loading…
x
Reference in New Issue
Block a user