Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/pr-sccache-restore/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: PR sccache restore

inputs:
artifact-name-suffix:
desciption: The suffix to append to the artifict name (sccache-pr#)
required: true

runs:
using: "composite"
steps:
- uses: ./.github/workflows/unprivileged-download-artifact
id: download-artifact
with:
artifact-name: sccache-pr${{ github.event.pull_request.number }}-${{ inputs.artifact-name-suffix }}

- shell: bash
if: steps.download-artifact.outputs.filename != ''
run: |
# Is this the best way to clear the cache?
rm -Rf .sccache/
unzip ${{ steps.download-artifact.outputs.filename }}
rm ${{ steps.download-artifact.outputs.filename }}
tar --zstd -xf sccache.tar.zst
rm sccache.tar.zst
ls -altr

27 changes: 27 additions & 0 deletions .github/workflows/pr-sccache-save/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR sccache save
inputs:
artifact-name-suffix:
desciption: The suffix to append to the artifict name (sccache-pr#)
required: true

runs:
using: "composite"
steps:
- name: Package sccache Directory
shell: bash
run: |
# Dereference symlinks so that this works on Windows.
tar -h -c .sccache | zstd -T0 -c > sccache.tar.zst

- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 #v4.3.0
with:
name: 'sccache-pr${{ github.event.number }}-${{ inputs.artifact-name-suffix }}'
path: sccache.tar.zst
retention-days: 7
overwrite: true

- shell: bash
run: |
rm sccache.tar.zst
sccache --show-stats

Loading