Skip to content

Commit

Permalink
chore: further platform fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lklimek committed Nov 25, 2024
1 parent f7ffa9a commit e8bb748
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/actions/docker/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 0 additions & 6 deletions .github/actions/rust/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
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
Expand Down
7 changes: 4 additions & 3 deletions .github/actions/sccache/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

0 comments on commit e8bb748

Please sign in to comment.