ladybird/.github/actions/cache-save/action.yml
Timothy Flynn ba36312864 CI: Remove outdated references to Serenity vs. toolchain ccache
The toolchain ccache no longer exists. Remove it and the "Serenity"
prefix from remaining ccache variables.
2024-08-27 19:24:39 -04:00

38 lines
981 B
YAML

name: 'Cache Save Action'
description: 'Saves caches of build artifacts.'
author: 'Andrew Kaster <akaster@serenityos.org>'
inputs:
arch:
description: 'Target Architecture to restore caches for'
required: false
default: 'x86_64'
ccache_path:
description: 'Path to the ccache directory'
required: false
default: ''
ccache_primary_key:
description: 'Primary ccache key'
required: false
default: ''
runs:
using: "composite"
steps:
- name: 'Prune obsolete ccache files'
shell: bash
if: ${{ inputs.ccache_path != '' }}
run: |
CCACHE_DIR=${{ inputs.ccache_path }} ccache --evict-older-than=1d
- name: 'Compiler Cache'
uses: actions/cache/save@v4
if: ${{ inputs.ccache_path != '' }}
with:
path: ${{ inputs.ccache_path }}
key: ${{ inputs.ccache_primary_key }}
- name: 'Cache Stats'
shell: bash
run: |
CCACHE_DIR=${{ inputs.ccache_path }} ccache -s