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:
Jiahao XU 2023-10-20 20:37:54 +10:00 committed by GitHub
parent 4de2d0f49c
commit 7e132f690d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 12 deletions

View file

@ -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

View file

@ -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: