From 2b3b7cb01bb0a64c7fcb04513341d20c2532769d Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 7 Nov 2023 18:08:24 +0700 Subject: [PATCH] ci: add scache for rust builds --- .github/actions/rust/action.yaml | 8 ++++---- .github/workflows/tests-rs-package.yml | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/.github/actions/rust/action.yaml b/.github/actions/rust/action.yaml index 49cf9304553..94343535f59 100644 --- a/.github/actions/rust/action.yaml +++ b/.github/actions/rust/action.yaml @@ -45,10 +45,10 @@ runs: echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV export PATH="${PATH}:${HOME}/.local/bin" -# - name: Run sccache-cache -# uses: mozilla-actions/sccache-action@v0.0.3 -# with: -# version: "v0.7.0" + - name: Run sccache-cache + uses: mozilla-actions/sccache-action@v0.0.3 + with: + version: "v0.7.0" - name: Hash ref_name id: hashed-ref-name diff --git a/.github/workflows/tests-rs-package.yml b/.github/workflows/tests-rs-package.yml index 9e4e1920389..c4753b8bdc1 100644 --- a/.github/workflows/tests-rs-package.yml +++ b/.github/workflows/tests-rs-package.yml @@ -28,6 +28,11 @@ jobs: - uses: clechasseur/rs-clippy-check@v3 with: args: --package ${{ inputs.package }} --all-features --frozen -- --no-deps + env: + RUSTC_WRAPPER: sccache + SCCACHE_BUCKET: multi-runner-linux-x64-platform-cache-ui535z23 + SCCACHE_REGION: ${{ vars.AWS_REGION }} + SCCACHE_S3_KEY_PREFIX: ${{ runner.os }}/sccache/x86_64-unknown-linux-gnu/ formatting: name: Formatting @@ -120,3 +125,8 @@ jobs: - name: Run tests run: cargo test --package=${{ inputs.package }} --all-features --frozen + env: + RUSTC_WRAPPER: sccache + SCCACHE_BUCKET: multi-runner-linux-x64-platform-cache-ui535z23 + SCCACHE_REGION: ${{ vars.AWS_REGION }} + SCCACHE_S3_KEY_PREFIX: ${{ runner.os }}/sccache/x86_64-unknown-linux-gnu/