mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
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'
|
|
serenity_ccache_path:
|
|
description: 'Path to the SerenityOS ccache directory'
|
|
required: false
|
|
default: ''
|
|
serenity_ccache_primary_key:
|
|
description: 'Primary key for the Serenity ccache'
|
|
required: false
|
|
default: ''
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: 'Prune obsolete ccache files'
|
|
shell: bash
|
|
if: ${{ inputs.serenity_ccache_path != '' }}
|
|
run: |
|
|
CCACHE_DIR=${{ inputs.serenity_ccache_path }} ccache --evict-older-than=1d
|
|
|
|
- name: 'Serenity Compiler Cache'
|
|
uses: actions/cache/save@v4
|
|
if: ${{ inputs.serenity_ccache_path != '' }}
|
|
with:
|
|
path: ${{ inputs.serenity_ccache_path }}
|
|
key: ${{ inputs.serenity_ccache_primary_key }}
|
|
|
|
- name: 'Cache Stats'
|
|
shell: bash
|
|
run: |
|
|
echo "Toolchain Compiler Cache"
|
|
CCACHE_DIR=${{ inputs.toolchain_ccache_path }} ccache -s
|
|
|
|
echo "Serenity Compiler Cache"
|
|
CCACHE_DIR=${{ inputs.serenity_ccache_path }} ccache -s
|