49 lines
1.2 KiB
YAML
49 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: true
|
|
ccache_path:
|
|
description: 'Path to the ccache directory'
|
|
required: true
|
|
ccache_primary_key:
|
|
description: 'Primary ccache key'
|
|
required: true
|
|
vcpkg_cache_path:
|
|
description: 'Path to the vcpkg binary cache directory'
|
|
required: true
|
|
vcpkg_cache_primary_key:
|
|
description: 'Primary vcpkg binary cache key'
|
|
required: true
|
|
|
|
runs:
|
|
using: 'composite'
|
|
steps:
|
|
- name: 'Prune obsolete ccache files'
|
|
shell: bash
|
|
env:
|
|
CCACHE_DIR: ${{ inputs.ccache_path }}
|
|
run: |
|
|
ccache --evict-older-than=1d
|
|
|
|
- name: 'Compiler Cache'
|
|
uses: actions/cache/save@v5
|
|
with:
|
|
path: ${{ inputs.ccache_path }}
|
|
key: ${{ inputs.ccache_primary_key }}
|
|
|
|
- name: 'Cache Stats'
|
|
shell: bash
|
|
env:
|
|
CCACHE_DIR: ${{ inputs.ccache_path }}
|
|
run: |
|
|
ccache -s
|
|
|
|
- name: 'vcpkg binary cache'
|
|
uses: actions/cache/save@v5
|
|
with:
|
|
path: ${{ inputs.vcpkg_cache_path }}
|
|
key: ${{ inputs.vcpkg_cache_primary_key }}
|