mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
Restore compiler caches through a shared setup action and save them explicitly only when compilation reports cache misses. Keep existing restore prefixes and make cache-save failures nonfatal. Before saving ccache, prune entries that were not used during the job. This avoids duplicate snapshots on fully cached runs and removes unrelated restored objects from changed snapshots. Key the MSVC installed prefix by its dependency build inputs rather than unrelated workflow edits; dependency options remain in the hashed helper project. Validation: actual ccache 4.9.1 cold/warm and pruning checks; sccache statistics and failure-path checks; nine workflow setup/save pairs; actionlint, git diff --check, and meson test -C build (302 passed, one skipped). Remote uploads remain for CI. Assisted-by: OpenAI Codex
42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
name: Setup compiler cache
|
|
description: Restore and configure a compiler cache without saving an unchanged snapshot
|
|
|
|
inputs:
|
|
key:
|
|
description: Cache key identifying the workflow and compiler configuration
|
|
required: true
|
|
variant:
|
|
description: Compiler cache implementation
|
|
default: ccache
|
|
max-size:
|
|
description: Maximum local cache size
|
|
default: 500MB
|
|
|
|
outputs:
|
|
key:
|
|
description: Cache key identifying the workflow and compiler configuration
|
|
value: ${{ inputs.key }}
|
|
variant:
|
|
description: Compiler cache implementation
|
|
value: ${{ inputs.variant }}
|
|
start:
|
|
description: Start time used to retain objects accessed during this job
|
|
value: ${{ steps.start.outputs.start }}
|
|
|
|
runs:
|
|
using: composite
|
|
steps:
|
|
- name: Record cache start time
|
|
id: start
|
|
shell: bash
|
|
continue-on-error: true
|
|
run: echo "start=$(date +%s)" >> "$GITHUB_OUTPUT"
|
|
- name: Restore compiler cache
|
|
uses: hendrikmuhs/ccache-action@f09c25b45002a07be2955cbe52e8cee55643f89d # v1.2.24
|
|
continue-on-error: true
|
|
with:
|
|
key: ${{ inputs.key }}
|
|
variant: ${{ inputs.variant }}
|
|
max-size: ${{ inputs.max-size }}
|
|
save: false
|