3
0
Fork 0
mirror of https://github.com/Swatinem/rust-cache synced 2026-04-10 16:35:32 +00:00

feat: cache more cargo binaries

Instead of relying on `.crates2.json` to know which binaries are installed,
scan the bin directory and save the result in the action's state.
This commit is contained in:
Charles Lechasseur 2026-04-05 03:43:14 -04:00
parent f51f967e15
commit d3825ba554
No known key found for this signature in database
GPG key ID: 3805F097BAFD839D
2 changed files with 42 additions and 12 deletions

34
.github/workflows/binstall.yml vendored Normal file
View file

@ -0,0 +1,34 @@
name: binstall
on: [push, pull_request]
permissions: {}
jobs:
binstall:
if: github.repository == 'Swatinem/rust-cache'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
name: Test `cargo binstall` on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- run: rustup toolchain install stable --profile minimal --no-self-update
- uses: cargo-bins/cargo-binstall@v1.17.9
- uses: ./
- run: cargo binstall -y cargo-deny
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}