mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Speedup CI (#842)
- Remove `tools: cross` input to `actions/just-setup` since we use `cargo-zigbuild` for cross compiling instead of `cross-rs` now. - Only install `cargo-zigbuild` in `just ci-install-deps` if `JUST_USE_CARGO_ZIGBUILD` is enabled - Include hash of `rustc -vV` in `build-cache` Switching between different versions of `rustc` will cause all crates to be rebuilt using new `rustc`. - Replace input `cache` with `index-cache` and `build-cache` in `actions/just-setup` for better control of caching behavior - Reuse workflow `test`'s `build-cache` in workflow `lint` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
599bcaf333
commit
c8b92b1985
4 changed files with 30 additions and 13 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
@ -53,7 +53,6 @@ jobs:
|
|||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
|
||||
- run: just toolchain
|
||||
- run: just ci-install-deps
|
||||
- run: just test
|
||||
env:
|
||||
|
@ -78,10 +77,8 @@ jobs:
|
|||
- uses: actions/checkout@v3
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
tools: cross
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
|
||||
- run: just toolchain
|
||||
- run: just ci-install-deps
|
||||
- run: just check
|
||||
|
||||
|
@ -96,19 +93,26 @@ jobs:
|
|||
with:
|
||||
cache-suffix: ${{ env.CARGO_BUILD_TARGET }}
|
||||
|
||||
- run: just toolchain
|
||||
- run: just check
|
||||
|
||||
lint:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
include:
|
||||
- target: x86_64-apple-darwin
|
||||
os: macos-latest
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
os: ubuntu-latest
|
||||
- target: x86_64-pc-windows-msvc
|
||||
os: windows-latest
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue