
Some checks are pending
CI / Lagom (false, FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, macos-14, macOS, Clang) (push) Waiting to run
CI / Lagom (false, NO_FUZZ, ubuntu-22.04, Linux, GNU) (push) Waiting to run
CI / Lagom (true, NO_FUZZ, ubuntu-22.04, Linux, Clang) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (macos-14, macOS, macOS-universal2) (push) Waiting to run
Package the js repl as a binary artifact / build-and-package (ubuntu-22.04, Linux, Linux-x86_64) (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Push notes / build (push) Waiting to run
The toolchain ccache no longer exists. Remove it and the "Serenity" prefix from remaining ccache variables.
76 lines
2.6 KiB
YAML
76 lines
2.6 KiB
YAML
name: 'Cache Restore Action'
|
|
description: 'Restores caches of downloaded files and build artifacts.'
|
|
author: 'Andrew Kaster <akaster@serenityos.org>'
|
|
|
|
inputs:
|
|
os:
|
|
description: 'Operating System to restore caches for'
|
|
required: true
|
|
default: 'Linux'
|
|
arch:
|
|
description: 'Target Architecture to restore caches for'
|
|
required: false
|
|
default: 'x86_64'
|
|
toolchain:
|
|
description: 'Toolchain to restore caches for (GNU or Clang)'
|
|
required: false
|
|
default: 'GNU'
|
|
cache_key_extra:
|
|
description: 'Code coverage setting, ON or OFF, or debug setting, ALL or NORMAL'
|
|
required: false
|
|
default: 'OFF'
|
|
ccache_version:
|
|
description: 'Increment this number if CI has trouble with ccache.'
|
|
required: false
|
|
default: '0'
|
|
ccache_path:
|
|
description: 'Path to the ccache directory'
|
|
required: false
|
|
default: ''
|
|
download_cache_path:
|
|
description: 'Path to the download cache directory'
|
|
required: false
|
|
default: 'caches'
|
|
|
|
outputs:
|
|
ccache_primary_key:
|
|
description: 'Primary ccache key'
|
|
value: ${{ steps.ccache.outputs.cache-primary-key }}
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: 'Date Stamp'
|
|
shell: bash
|
|
id: 'date-stamp'
|
|
run: |
|
|
echo "timestamp=$(date -u "+%Y%m%d%H%M_%S")" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: 'Compiler Cache'
|
|
uses: actions/cache/restore@v4
|
|
id: 'ccache'
|
|
if: ${{ inputs.ccache_path != '' }}
|
|
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 }}"
|
|
|
|
- name: 'Configure Compiler Cache'
|
|
if: ${{ inputs.ccache_path != '' }}
|
|
shell: bash
|
|
run: |
|
|
CCACHE_DIR=${{ inputs.ccache_path }} ccache -M 0
|
|
|
|
# Reset all ccache modification dates to a known epoch. This provides a baseline that we can prune against.
|
|
find ${{ inputs.ccache_path }} | tac | xargs touch -a -m -d "2018-10-10T09:53:07Z"
|
|
|
|
CCACHE_DIR=${{ inputs.ccache_path }} ccache -s
|
|
CCACHE_DIR=${{ inputs.ccache_path }} ccache -z
|
|
|
|
- name: Export vcpkg GitHub Actions cache environment variables
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|