mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-07 18:17:23 +00:00
CI: Add a quoteless cache restore key for GitHub runners
The way we echo the cache keys for output variables strips these quotes. So when we save the caches at the end of CI, the keys are sans quotes. This patch adds an extra cache restore key without quotes to allow jobs to fetch their own caches again. This will become moot once all runners are able to use the Blacksmith cache action.
This commit is contained in:
parent
877687d1f6
commit
9d0c307341
Notes:
github-actions[bot]
2025-05-30 13:04:35 +00:00
Author: https://github.com/trflynn89
Commit: 9d0c307341
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4929
1 changed files with 11 additions and 5 deletions
16
.github/actions/cache-restore/action.yml
vendored
16
.github/actions/cache-restore/action.yml
vendored
|
@ -61,10 +61,11 @@ runs:
|
|||
id: 'ccache-blacksmith'
|
||||
if: ${{ inputs.ccache_path != '' && startsWith(inputs.runner_label, 'blacksmith') }}
|
||||
with:
|
||||
path: ${{ inputs.ccache_path }}
|
||||
key: '"ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}" | ${{ steps.date-stamp.outputs.timestamp }}'
|
||||
restore-keys: |
|
||||
"ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}"
|
||||
path: ${{ inputs.ccache_path }}
|
||||
key: '"ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}" | ${{ steps.date-stamp.outputs.timestamp }}'
|
||||
restore-keys: |
|
||||
ccache | ${{ inputs.os }} | ${{ inputs.arch }} | ${{ inputs.toolchain }} | ${{ inputs.cache_key_extra }} | ${{ inputs.ccache_version }}
|
||||
"ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}"
|
||||
|
||||
- name: 'Compiler Cache (GitHub runner)'
|
||||
uses: actions/cache/restore@v4
|
||||
|
@ -74,6 +75,7 @@ runs:
|
|||
path: ${{ inputs.ccache_path }}
|
||||
key: '"ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}" | ${{ steps.date-stamp.outputs.timestamp }}'
|
||||
restore-keys: |
|
||||
ccache | ${{ inputs.os }} | ${{ inputs.arch }} | ${{ inputs.toolchain }} | ${{ inputs.cache_key_extra }} | ${{ inputs.ccache_version }}
|
||||
"ccache" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}"
|
||||
|
||||
- name: 'Configure Compiler Cache'
|
||||
|
@ -96,9 +98,10 @@ runs:
|
|||
path: ${{ inputs.vcpkg_cache_path }}
|
||||
key: '"vcpkg" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}" | ${{ steps.date-stamp.outputs.timestamp }}'
|
||||
restore-keys: |
|
||||
vcpkg | ${{ inputs.os }} | ${{ inputs.arch }} | ${{ inputs.toolchain }} | ${{ inputs.cache_key_extra }} | ${{ inputs.ccache_version }}
|
||||
"vcpkg" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}"
|
||||
|
||||
- name: 'Compiler Cache (GitHub runner)'
|
||||
- name: 'Restore vcpkg cache (GitHub runner)'
|
||||
uses: actions/cache/restore@v4
|
||||
if: ${{ inputs.ccache_path != '' && !startsWith(inputs.runner_label, 'blacksmith') }}
|
||||
id: 'vcpkg-gh'
|
||||
|
@ -106,8 +109,11 @@ runs:
|
|||
path: ${{ inputs.vcpkg_cache_path }}
|
||||
key: '"vcpkg" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}" | ${{ steps.date-stamp.outputs.timestamp }}'
|
||||
restore-keys: |
|
||||
vcpkg | ${{ inputs.os }} | ${{ inputs.arch }} | ${{ inputs.toolchain }} | ${{ inputs.cache_key_extra }} | ${{ inputs.ccache_version }}
|
||||
"vcpkg" | "${{ inputs.os }}" | "${{ inputs.arch }}" | "${{ inputs.toolchain }}" | "${{ inputs.cache_key_extra }}" | "${{ inputs.ccache_version }}"
|
||||
|
||||
# FIXME: When all runners are using the useblacksmith/cache action and this step is removed, we should also be able
|
||||
# to remove the quoteless cache restore keys in the cache actions above.
|
||||
- name: 'Cache Outputs'
|
||||
id: 'cache-outputs'
|
||||
shell: bash
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue