diff --git a/.github/actions/just-setup/action.yml b/.github/actions/just-setup/action.yml index 0187304f..66baed82 100644 --- a/.github/actions/just-setup/action.yml +++ b/.github/actions/just-setup/action.yml @@ -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 }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b843cc24..05366c3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 diff --git a/.github/workflows/release-packages.yml b/.github/workflows/release-packages.yml index feff50e7..6cc60658 100644 --- a/.github/workflows/release-packages.yml +++ b/.github/workflows/release-packages.yml @@ -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: diff --git a/justfile b/justfile index dada41ef..6ea50afe 100644 --- a/justfile +++ b/justfile @@ -215,7 +215,7 @@ build: print-env check: print-env {{cargo-bin}} check {{cargo-build-args}} --profile check-only - cargo-hack hack check --feature-powerset -p leon {{cargo-check-args}} --profile check-only + cargo hack check --feature-powerset -p leon {{cargo-check-args}} --profile check-only {{cargo-bin}} check -p binstalk-downloader --no-default-features --profile check-only {{cargo-bin}} check -p cargo-binstall --no-default-features --features rustls {{cargo-check-args}} --profile check-only cargo-hack hack check -p binstalk-downloader \