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 <angus@redyak.com.au>
This commit is contained in:
committed by
Angus Gratton
parent
db4b095644
commit
a9945fc528
4
.github/workflows/ports_zephyr.yml
vendored
4
.github/workflows/ports_zephyr.yml
vendored
@@ -42,6 +42,10 @@ jobs:
|
|||||||
# cache the "workspace"
|
# cache the "workspace"
|
||||||
path: ./zephyrproject
|
path: ./zephyrproject
|
||||||
key: zephyr-workspace-${{ steps.versions.outputs.ZEPHYR }}
|
key: zephyr-workspace-${{ steps.versions.outputs.ZEPHYR }}
|
||||||
|
- name: ccache
|
||||||
|
uses: hendrikmuhs/ccache-action@v1.2
|
||||||
|
with:
|
||||||
|
key: zephyr
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: source tools/ci.sh && ci_zephyr_setup
|
run: source tools/ci.sh && ci_zephyr_setup
|
||||||
- name: Install Zephyr
|
- name: Install Zephyr
|
||||||
|
|||||||
@@ -754,12 +754,15 @@ function ci_zephyr_setup {
|
|||||||
# Directories cached by GitHub Actions, mounted
|
# Directories cached by GitHub Actions, mounted
|
||||||
# into the container
|
# into the container
|
||||||
ZEPHYRPROJECT_DIR="$(pwd)/zephyrproject"
|
ZEPHYRPROJECT_DIR="$(pwd)/zephyrproject"
|
||||||
|
CCACHE_DIR="$(pwd)/.ccache"
|
||||||
|
|
||||||
mkdir -p "${ZEPHYRPROJECT_DIR}"
|
mkdir -p "${ZEPHYRPROJECT_DIR}"
|
||||||
|
mkdir -p "${CCACHE_DIR}"
|
||||||
|
|
||||||
docker run --name zephyr-ci -d -it \
|
docker run --name zephyr-ci -d -it \
|
||||||
-v "$(pwd)":/micropython \
|
-v "$(pwd)":/micropython \
|
||||||
-v "${ZEPHYRPROJECT_DIR}":/zephyrproject \
|
-v "${ZEPHYRPROJECT_DIR}":/zephyrproject \
|
||||||
|
-v "${CCACHE_DIR}":/root/.cache/ccache \
|
||||||
-e ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-${ZEPHYR_SDK_VERSION} \
|
-e ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-${ZEPHYR_SDK_VERSION} \
|
||||||
-e ZEPHYR_TOOLCHAIN_VARIANT=zephyr \
|
-e ZEPHYR_TOOLCHAIN_VARIANT=zephyr \
|
||||||
-e ZEPHYR_BASE=/zephyrproject/zephyr \
|
-e ZEPHYR_BASE=/zephyrproject/zephyr \
|
||||||
|
|||||||
Reference in New Issue
Block a user