From e8bb7485ed65c7fe35b92b7b8fb1819a7a483497 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:29:15 +0100 Subject: [PATCH] chore: further platform fixes --- .github/actions/docker/action.yaml | 2 +- .github/actions/rust/action.yaml | 6 ------ .github/actions/sccache/action.yaml | 7 ++++--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/actions/docker/action.yaml b/.github/actions/docker/action.yaml index 8bf1df906c5..cfd35a19ec1 100644 --- a/.github/actions/docker/action.yaml +++ b/.github/actions/docker/action.yaml @@ -182,7 +182,7 @@ runs: SCCACHE_BUCKET=${{ inputs.cache_bucket }} SCCACHE_REGION=${{ inputs.cache_region }} SCCACHE_ENDPOINT=${{ inputs.cache_endpoint }} - SCCACHE_S3_KEY_PREFIX=${{ runner.os }}/sccache/${{ runner.arch }}/linux-gnu + SCCACHE_S3_KEY_PREFIX=${{ env.SCCACHE_S3_KEY_PREFIX }} SCCACHE_VERSION=${{ env.SCCACHE_VERSION }} AWS_PROFILE=sccache cache-from: ${{ steps.layer_cache_settings.outputs.cache_from }} diff --git a/.github/actions/rust/action.yaml b/.github/actions/rust/action.yaml index 722e7df55fd..ff26db3fad6 100644 --- a/.github/actions/rust/action.yaml +++ b/.github/actions/rust/action.yaml @@ -82,12 +82,6 @@ runs: echo "PROTOC=${HOME}/.local/bin/protoc" >> $GITHUB_ENV export PATH="${PATH}:${HOME}/.local/bin" - - name: Install sccache-cache - uses: mozilla-actions/sccache-action@v0.0.6 - with: - version: "v0.8.2" # Must be the same as in Dockerfile - if: inputs.cache == 'true' - - name: Set HOME variable to github context shell: bash run: echo "HOME=$HOME" >> $GITHUB_ENV diff --git a/.github/actions/sccache/action.yaml b/.github/actions/sccache/action.yaml index 2984abc6c05..ac9e42da987 100644 --- a/.github/actions/sccache/action.yaml +++ b/.github/actions/sccache/action.yaml @@ -18,8 +18,9 @@ inputs: description: S3 endpoint secret access key required: true platform: - description: "Platform and architecture to use when caching; helps to avoid invalid cache on different arch" - required: true + description: "Platform and architecture to use when caching; defaults to linux/amd64" + required: false + default: "linux/amd64" install: description: "Install sccache" default: "true" @@ -53,6 +54,6 @@ runs: echo "SCCACHE_BUCKET=${{ inputs.bucket }}" >> $GITHUB_ENV echo "SCCACHE_REGION=${{ inputs.region }}" >> $GITHUB_ENV echo "SCCACHE_ENDPOINT=${{ inputs.endpoint }}" >> $GITHUB_ENV - echo "SCCACHE_S3_KEY_PREFIX=${{ runner.os }}/sccache/${{ inputs.platform }}/" >> $GITHUB_ENV + echo "SCCACHE_S3_KEY_PREFIX=sccache/${{ inputs.platform }}/" >> $GITHUB_ENV # "SCCACHE_VERSION" is used inside Docker to install the same version of sccache echo "SCCACHE_VERSION=${{ inputs.version }}" >> $GITHUB_ENV