From bce2e87b9ac8b1d4d4649f14525069b5a3119abb Mon Sep 17 00:00:00 2001 From: Nazar Mokrynskyi Date: Fri, 19 Jan 2024 16:17:16 +0200 Subject: [PATCH] Take advantage of Rust reimplementation of Git in Cargo (gitoxide) and shallow clones --- .github/workflows/rust.yml | 14 +++++--------- .github/workflows/rustdoc.yml | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 12a78598c8c..20d0f026534 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -114,10 +114,8 @@ jobs: ${{ runner.os }}-cargo- - name: cargo clippy - uses: actions-rs/clippy-check@b5b5f21f4797c02da247df37026fcd0a5024aa4d # @v1.0.7 - with: - token: ${{ secrets.GITHUB_TOKEN }} - args: --locked --all-targets --features "runtime-benchmarks" -- -D warnings + run: | + cargo -Zgitoxide -Zgit clippy --locked --all-targets --features "runtime-benchmarks" -- -D warnings cargo-docs: runs-on: ${{ fromJson(github.repository_owner == 'subspace' && '["self-hosted", "ubuntu-20.04-x86-64"]' || '"ubuntu-22.04"') }} @@ -141,7 +139,7 @@ jobs: ${{ runner.os }}-cargo- - name: Check Documentation - run: cargo doc --locked --all --no-deps --lib + run: cargo -Zgitoxide -Zgit doc --locked --all --no-deps --lib env: RUSTDOCFLAGS: "-D rustdoc::broken-intra-doc-links -D rustdoc::private_intra_doc_links" @@ -207,7 +205,5 @@ jobs: tool: cargo-nextest - name: cargo nextest run --locked - uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # @v1.0.1 - with: - command: nextest - args: run --locked + run: | + cargo -Zgitoxide -Zgit nextest run --locked diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml index 48d7a8cfcbd..0454ea09b70 100644 --- a/.github/workflows/rustdoc.yml +++ b/.github/workflows/rustdoc.yml @@ -46,7 +46,7 @@ jobs: # Build the rust crate docs - name: Build Documentation - run: cargo doc --all --no-deps --lib + run: cargo -Zgitoxide -Zgit doc --all --no-deps --lib env: RUSTDOCFLAGS: "-Z unstable-options --enable-index-page"