mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-24 14:28:42 +00:00
Fix CI: Use cargo-hack
0.6.10 (#1468)
* Fix ci: Install deps before caching and include `JUST*` env values in caching key To make sure caching is done properly and does not accidentally include (old) pre-built binaries that we don't want. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix missing `shell` Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * Fix justfile target `check`: Call `cargo hack check` directly without using the `CARGO=cargo-zigbuild` env since `leon` does not use external C/C++ compiler anyway. Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> * CI: Dowgrade cargo-hack to 0.6.10 This is the last version working Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com> --------- Signed-off-by: Jiahao XU <Jiahao_XU@outlook.com>
This commit is contained in:
parent
4de2d0f49c
commit
7e132f690d
4 changed files with 14 additions and 12 deletions
5
.github/actions/just-setup/action.yml
vendored
5
.github/actions/just-setup/action.yml
vendored
|
@ -53,7 +53,12 @@ runs:
|
|||
fi
|
||||
shell: bash
|
||||
|
||||
- run: just ci-install-deps
|
||||
shell: bash
|
||||
|
||||
- if: inputs.indexcache || inputs.buildcache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
env-vars: "CARGO CC CFLAGS CXX CMAKE RUST JUST"
|
||||
env:
|
||||
RUSTFLAGS: ${{ steps.retrieve-rustflags.outputs.RUSTFLAGS }}
|
||||
|
|
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
|
@ -58,7 +58,6 @@ jobs:
|
|||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- run: just ci-install-deps
|
||||
- run: just test
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
@ -87,19 +86,19 @@ jobs:
|
|||
CARGO_BUILD_TARGET: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
tools: cargo-hack
|
||||
env:
|
||||
# just-setup use binstall to install sccache,
|
||||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Enable cargo-zigbuild
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: echo JUST_USE_CARGO_ZIGBUILD=true >> "$GITHUB_ENV"
|
||||
|
||||
- run: just ci-install-deps
|
||||
- uses: ./.github/actions/just-setup
|
||||
with:
|
||||
tools: cargo-hack@0.6.10
|
||||
env:
|
||||
# just-setup use binstall to install sccache,
|
||||
# which works better when we provide it with GITHUB_TOKEN.
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- run: just avoid-dev-deps
|
||||
- run: just check
|
||||
|
||||
|
@ -121,7 +120,6 @@ jobs:
|
|||
- uses: ./.github/actions/just-setup
|
||||
|
||||
- run: just toolchain rustfmt,clippy
|
||||
- run: just ci-install-deps
|
||||
- run: just avoid-dev-deps
|
||||
- run: just lint
|
||||
|
||||
|
|
1
.github/workflows/release-packages.yml
vendored
1
.github/workflows/release-packages.yml
vendored
|
@ -69,7 +69,6 @@ jobs:
|
|||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- run: just toolchain rust-src
|
||||
- run: just ci-install-deps
|
||||
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue