From 6b2c3496267b52d363571b8e37d6788fa60083fc Mon Sep 17 00:00:00 2001 From: Jonathan Kelley Date: Mon, 8 Jan 2024 16:32:49 -0800 Subject: [PATCH] use proper cache --- .github/workflows/main.yml | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 98b848bc8..915787cb1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,7 +35,7 @@ env: CARGO_TERM_COLOR: always CARGO_INCREMENTAL: "0" SCCACHE_GHA_ENABLED: "true" - RUSTC_WRAPPER: "sccache" + # RUSTC_WRAPPER: "sccache" SCCACHE_IDLE_TIMEOUT: "0" SCCACHE_GHA_VERSION: "sccache" SCCACHE_BYPASS_CHECK: "on" @@ -50,7 +50,9 @@ jobs: - run: sudo apt-get update - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev - uses: dtolnay/rust-toolchain@stable - - uses: mozilla-actions/sccache-action@v0.0.3 + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" - uses: ilammy/setup-nasm@v1 - run: cargo check --all --examples --tests @@ -63,7 +65,9 @@ jobs: - run: sudo apt-get update - run: sudo apt install libwebkit2gtk-4.1-dev libgtk-3-dev libayatana-appindicator3-dev libxdo-dev - uses: dtolnay/rust-toolchain@stable - - uses: mozilla-actions/sccache-action@v0.0.3 + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" - uses: ilammy/setup-nasm@v1 - uses: davidB/rust-cargo-make@v1 - uses: browser-actions/setup-firefox@latest @@ -80,7 +84,9 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt - - uses: mozilla-actions/sccache-action@v0.0.3 + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" - run: cargo fmt --all -- --check clippy: @@ -95,7 +101,9 @@ jobs: - uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - - uses: mozilla-actions/sccache-action@v0.0.3 + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" - run: cargo clippy --workspace --examples --tests -- -D warnings miri: @@ -120,7 +128,9 @@ jobs: with: toolchain: ${{ env.rust_nightly }} components: miri - - uses: mozilla-actions/sccache-action@v0.0.3 + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" - name: miri # Many of tests in tokio/tests and doctests use #[tokio::test] or # #[tokio::main] that calls epoll_create1 that Miri does not support. @@ -148,8 +158,9 @@ jobs: with: toolchain: stable targets: x86_64-unknown-linux-gnu,wasm32-unknown-unknown - - uses: mozilla-actions/sccache-action@v0.0.3 - + - uses: Swatinem/rust-cache@v2 + with: + cache-all-crates: "true" - name: Install dependencies run: npm ci @@ -235,6 +246,7 @@ jobs: - name: Install cross if: ${{ matrix.platform.cross == true }} + uses: taiki-e/install-action@cross - uses: Swatinem/rust-cache@v2