Skip to content

Commit 4dd1d93

Browse files
workflow: demonstrate and test ccache configuration
Add steps for demonstrating and testing the ccache configuration performed in the action. Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
1 parent 63dae69 commit 4dd1d93

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

.github/workflows/test.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ jobs:
4040
west-group-filter: -tools,-bootloader,-babblesim
4141
west-project-filter: -nrf_hw_models
4242

43+
- name: Restore ccache
44+
id: ccache-restore
45+
uses: actions/cache/restore@v4
46+
with:
47+
path: ${{ env.CCACHE_DIR }}
48+
key: ${{ runner.os }}-ccache
49+
50+
- name: Set up ccache
51+
run: |
52+
mkdir -p ${{ env.{CCACHE_DIR }}
53+
ccache -p
54+
ccache -z -s -vv
55+
4356
- name: Build firmware
4457
working-directory: zephyr
4558
shell: bash
@@ -65,3 +78,13 @@ jobs:
6578
PLATFORMS_FLAGS+="-p qemu_x86_64"
6679
6780
./scripts/twister --force-color --inline-logs -T samples/hello_world -v $PLATFORMS_FLAGS $EXTRA_TWISTER_FLAGS
81+
82+
- name: Print ccache stats
83+
run: |
84+
ccache -s -vv
85+
86+
- name: Save ccache
87+
uses: actions/cache/save@v4
88+
with:
89+
path: ${{ env.CCACHE_DIR }}
90+
key: ${{ steps.ccache-restore.outputs.cache-primary-key }}

0 commit comments

Comments
 (0)