From 26e233e8f24c96da069e02e27433bacbd5e5024d Mon Sep 17 00:00:00 2001 From: Nicolas Date: Mon, 14 Oct 2024 20:02:12 +0200 Subject: [PATCH] add sccache --- .github/workflows/rust.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 1e8e31bbcf1..1b00e4de50e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -6,6 +6,8 @@ env: RUSTFLAGS: -D warnings RUSTDOCFLAGS: -D warnings NIGHTLY_VERSION: nightly-2024-09-11 + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" jobs: fmt-crank-check-test: @@ -29,6 +31,9 @@ jobs: - name: Set up cargo cache uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.6 + - name: Rustfmt run: cargo fmt --all -- --check @@ -95,6 +100,9 @@ jobs: - name: Set up cargo cache uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.6 + - name: Check wasm32 egui_demo_app run: cargo check -p egui_demo_app --lib --target wasm32-unknown-unknown @@ -124,6 +132,10 @@ jobs: - name: Set up cargo cache uses: Swatinem/rust-cache@v2 + + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.6 + - uses: dtolnay/rust-toolchain@master with: toolchain: ${{env.NIGHTLY_VERSION}} @@ -180,6 +192,9 @@ jobs: - name: Set up cargo cache uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.6 + - run: cargo check --features wgpu,android-native-activity --target aarch64-linux-android working-directory: crates/eframe @@ -199,6 +214,9 @@ jobs: - name: Set up cargo cache uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.6 + # Default features are disabled because glutin doesn't compile for ios. - run: cargo check --features wgpu --target aarch64-apple-ios --no-default-features working-directory: crates/eframe @@ -217,6 +235,9 @@ jobs: - name: Set up cargo cache uses: Swatinem/rust-cache@v2 + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.6 + - name: Check all run: cargo check --all-targets --all-features