Make sure generate cache without needs #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Generate Cache Workflow | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- v0.6.x | |
merge_group: | |
jobs: | |
generate_cache: | |
runs-on: ubuntu-latest | |
name: Generate cache | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }} | |
- name: Populate cache | |
run: | | |
# Ensure all dependencies are downloaded - both for our crates and for | |
# tools we use in CI. We don't care about these tools succeeding for | |
# two reasons: First, this entire job is best-effort since it's just a | |
# performance optimization. Second, there may be failures due to | |
# issues other than failing to download dependencies (e.g., `cargo | |
# metadata` called with a malformed `Cargo.toml`, build failure in our | |
# own crate or in dependencies, etc). For those reasons, we discard | |
# stderr and ignore status codes. | |
# | |
# For downloading our crates' dependencies in particular, note that | |
# there is no support for doing this directly [1], so we just check | |
# all crates using --tests. | |
# | |
# [1] https://stackoverflow.com/a/42139535/836390 | |
cargo check --workspace --tests &> /dev/null || true | |
cargo metadata &> /dev/null || true | |
cargo install cargo-readme --version 3.2.0 &> /dev/null || true | |
cargo install --locked kani-verifier &> /dev/null || true | |
cargo kani setup &> /dev/null || true |