From 1ace767c1436e693e1f713230631cd6d4bf60bb5 Mon Sep 17 00:00:00 2001 From: Arunanshu Biswas Date: Sat, 21 Sep 2024 15:29:16 +0530 Subject: [PATCH 1/2] ci(workflows): use sccache for caching rust deps --- .github/workflows/ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5c5475f..f0eb4d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,11 @@ defaults: run: shell: bash +env: + # enable caching for faster compilation + SCCACHE_GHA_ENABLED: "true" + RUSTC_WRAPPER: "sccache" + jobs: test: name: Test on ${{ matrix.os }} with Python ${{ matrix.python-version }} @@ -39,6 +44,9 @@ jobs: with: components: clippy + - name: Run sccache-cache 🗄️ + uses: mozilla-actions/sccache-action@v0.0.5 + - name: Setup Rust Cache 🗄️ uses: Swatinem/rust-cache@v2 @@ -126,6 +134,9 @@ jobs: - name: Install Rust 🦀 uses: dtolnay/rust-toolchain@stable + - name: Run sccache-cache 🗄️ + uses: mozilla-actions/sccache-action@v0.0.5 + - name: Setup Rust Cache 🗄️ uses: Swatinem/rust-cache@v2 From ff87193809f78ceac96f61bd528567225a3cf29c Mon Sep 17 00:00:00 2001 From: Arunanshu Biswas Date: Sat, 21 Sep 2024 15:40:04 +0530 Subject: [PATCH 2/2] ci(workflows): run sccache during sdist build too --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f0eb4d1..d1d7ac2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -162,6 +162,9 @@ jobs: - name: Checkout repository uses: actions/checkout@v4 + - name: Run sccache-cache 🗄️ + uses: mozilla-actions/sccache-action@v0.0.5 + - name: Build sdist run: pipx run build --sdist