From f951031be7e0afe421d90bd0ab251f572aa33ed1 Mon Sep 17 00:00:00 2001 From: tottoto Date: Thu, 19 Oct 2023 02:47:18 +0900 Subject: [PATCH] chore(ci): cache rust dependency (#3353) --- .github/workflows/CI.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 922a27121a..258cded761 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -83,6 +83,8 @@ jobs: with: toolchain: ${{ matrix.rust }} + - uses: Swatinem/rust-cache@v2 + - name: Test run: cargo test ${{ matrix.features }} @@ -109,6 +111,8 @@ jobs: with: toolchain: ${{ steps.msrv.outputs.version }} + - uses: Swatinem/rust-cache@v2 + - name: Check run: cargo check --features full @@ -126,6 +130,8 @@ jobs: with: components: miri + - uses: Swatinem/rust-cache@v2 + - name: Test # Can't enable tcp feature since Miri does not support the tokio runtime run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test --features http1,http2,client,server,nightly @@ -144,6 +150,8 @@ jobs: - name: Install cargo-hack uses: taiki-e/install-action@cargo-hack + - uses: Swatinem/rust-cache@v2 + - name: check --feature-powerset run: cargo hack --no-dev-deps check --feature-powerset --depth 2 --skip ffi,tracing env: @@ -160,6 +168,8 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + - uses: Swatinem/rust-cache@v2 + - name: Build FFI env: RUSTFLAGS: --cfg hyper_unstable_ffi @@ -193,6 +203,8 @@ jobs: with: tool: cargo-expand + - uses: Swatinem/rust-cache@v2 + - name: Build FFI env: RUSTFLAGS: --cfg hyper_unstable_ffi @@ -212,6 +224,8 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@nightly + - uses: Swatinem/rust-cache@v2 + - name: cargo doc run: cargo rustdoc --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links @@ -233,6 +247,8 @@ jobs: with: tool: cargo-check-external-types@0.1.7 + - uses: Swatinem/rust-cache@v2 + - name: check-external-types run: cargo check-external-types --config .github/workflows/external-types.toml @@ -249,6 +265,8 @@ jobs: - name: Install cargo-udeps uses: taiki-e/install-action@cargo-udeps + - uses: Swatinem/rust-cache@v2 + - name: Check unused dependencies on default features run: cargo udeps