Skip to content

Commit 3a58338

Browse files
committed
action: add a ccache-cache-key parameter
Add an explicit ccache-cache-key parameter and suggest how to use it. Signed-off-by: Fabio Baltieri <[email protected]>
1 parent cab4cce commit 3a58338

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

.github/workflows/test.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ jobs:
3939
toolchains: arm-zephyr-eabi:riscv64-zephyr-elf:x86_64-zephyr-elf
4040
west-group-filter: -tools,-bootloader,-babblesim
4141
west-project-filter: -nrf_hw_models
42+
ccache-cache-key: ${{ matrix.os }}-${{ matrix.release }}
4243

4344
- name: Build firmware
4445
working-directory: zephyr

action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ inputs:
3232
required: false
3333
default: true
3434

35+
ccache-cache-key:
36+
description: |
37+
An additional string used in the ccache cache key, use it to identify the
38+
cache in a way that makes sense for compiled object cache reuse between
39+
different build workflows. Default to "default".
40+
required: false
41+
default: default
42+
3543
manifest-file-name:
3644
description: Name of the west workspace manifest file name in "app-path"
3745
required: false
@@ -232,8 +240,8 @@ runs:
232240
uses: actions/cache@v4
233241
with:
234242
path: ${{ env.CCACHE_DIR }}
235-
key: ccache-${{ matrix.os }}-${{ matrix.release }}-${{ env.CCACHE_TIMESTAMP }}
236-
restore-keys: ccache-${{ matrix.os }}-${{ matrix.release }}-
243+
key: ccache-${{ inputs.ccache-cache-key }}-${{ env.CCACHE_TIMESTAMP }}
244+
restore-keys: ccache-${{ inputs.ccache-cache-key }}-
237245

238246
- name: Set up ccache
239247
if: inputs.enable-ccache == 'true' && runner.os != 'Windows'

0 commit comments

Comments
 (0)