mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
ci: Switch to Swatinem/rust-cache@v2
(#1113)
Fixed #1038 sccache is not very effective at caching dependencies, the external C/C++ is recompiled in every ci and it takes a lot of time. Compilation of other Rust dependencies also takes quite some time and sccache is not helping at all, so I decided to switch to `Swatinem/rust-cache@v2`. The downside of the new caching method is that a new cache conntaining part of the `.cargo/` and `target/` will be created whenver `Cargo.lock`/`Cargo.toml` changes, but it can still reuse the old cache to create new caching. This is acceptable given that `sccache` often fails to reuse cache due to rate limiting from GHA, since it is not designed for use like a s3 object pool, and `sccache` will create a lot of new cache artifacts for a given branch that cannot be reused in main and would have to cleanup via a cronjob. Edit: rust 1.70 uses llvm 16.0, however ubuntu-latest still uses llvm 15.0 As such, during release-build, cross-lang-lto failed due to llvm is too old. Temporarily disable linker-plugin-lto to fix this. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
9ecfce4104
commit
b69c082160
4 changed files with 22 additions and 55 deletions
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
|
@ -47,8 +47,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
env:
|
||||
# just-setup use binstall to install sccache,
|
||||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
|
@ -78,8 +76,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
env:
|
||||
# just-setup use binstall to install sccache,
|
||||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
|
@ -97,8 +93,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
env:
|
||||
# just-setup use binstall to install sccache,
|
||||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
|
@ -115,8 +109,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
env:
|
||||
# just-setup use binstall to install sccache,
|
||||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
|
@ -141,8 +133,6 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: ${{ matrix.target }}
|
||||
|
||||
- run: just toolchain rustfmt,clippy
|
||||
- run: just ci-install-deps
|
||||
|
|
1
.github/workflows/release-build.yml
vendored
1
.github/workflows/release-build.yml
vendored
|
@ -52,7 +52,6 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
cache-suffix: release-${{ matrix.t }}
|
||||
tools: cargo-auditable
|
||||
env:
|
||||
# just-setup use binstall to install sccache and cargo-auditable,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue