Skip to content

Commit a9945fc

Browse files
committed
ci: Add caching of ccache for Zephyr.
Similar to the ESP32 builds, but needs additional step to pass the ccache directory through to the Zephyr container. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <[email protected]>
1 parent db4b095 commit a9945fc

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/ports_zephyr.yml

+4
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,10 @@ jobs:
4242
# cache the "workspace"
4343
path: ./zephyrproject
4444
key: zephyr-workspace-${{ steps.versions.outputs.ZEPHYR }}
45+
- name: ccache
46+
uses: hendrikmuhs/[email protected]
47+
with:
48+
key: zephyr
4549
- name: Install packages
4650
run: source tools/ci.sh && ci_zephyr_setup
4751
- name: Install Zephyr

tools/ci.sh

+3
Original file line numberDiff line numberDiff line change
@@ -754,12 +754,15 @@ function ci_zephyr_setup {
754754
# Directories cached by GitHub Actions, mounted
755755
# into the container
756756
ZEPHYRPROJECT_DIR="$(pwd)/zephyrproject"
757+
CCACHE_DIR="$(pwd)/.ccache"
757758

758759
mkdir -p "${ZEPHYRPROJECT_DIR}"
760+
mkdir -p "${CCACHE_DIR}"
759761

760762
docker run --name zephyr-ci -d -it \
761763
-v "$(pwd)":/micropython \
762764
-v "${ZEPHYRPROJECT_DIR}":/zephyrproject \
765+
-v "${CCACHE_DIR}":/root/.cache/ccache \
763766
-e ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-${ZEPHYR_SDK_VERSION} \
764767
-e ZEPHYR_TOOLCHAIN_VARIANT=zephyr \
765768
-e ZEPHYR_BASE=/zephyrproject/zephyr \

0 commit comments

Comments
 (0)