From b686b68ae65c124849433e28b2ddb64312cd4e5c Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 14 Mar 2023 03:24:17 +0000 Subject: [PATCH] use sparse registry in CI --- .github/workflows/clippy-fmt.yml | 8 ++++++-- .github/workflows/linux.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/clippy-fmt.yml b/.github/workflows/clippy-fmt.yml index 984beb2e..96c9047f 100644 --- a/.github/workflows/clippy-fmt.yml +++ b/.github/workflows/clippy-fmt.yml @@ -22,15 +22,19 @@ jobs: name: clippy check runs-on: ubuntu-latest + env: + CI: 1 + CARGO_INCREMENTAL: false + CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse + steps: - uses: actions/checkout@v3 - uses: dtolnay/rust-toolchain@stable with: { components: clippy } - - run: cargo generate-lockfile - name: Cache Dependencies - uses: Swatinem/rust-cache@v2.2.0 + uses: Swatinem/rust-cache@v2.2.1 # - name: Create test DBs # run: | diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 5ac8d162..4ea9ad4d 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -18,7 +18,8 @@ jobs: env: CI: 1 - CARGO_UNSTABLE_SPARSE_REGISTRY: true + CARGO_INCREMENTAL: false + CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse steps: - uses: actions/checkout@v3 @@ -29,7 +30,7 @@ jobs: rustup override set ${{ matrix.version }} - name: Cache Dependencies - uses: Swatinem/rust-cache@v2.2.0 + uses: Swatinem/rust-cache@v2.2.1 - name: Install DB CLI tools run: | @@ -67,3 +68,6 @@ jobs: chmod a+rwx test.db cargo test -p=diesel-example --no-fail-fast -- --nocapture timeout-minutes: 10 + + - name: Clear the cargo caches + run: cargo install cargo-cache --version=0.8.3 --no-default-features --features=ci-autoclean && cargo-cache