mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
ci: Cache Zephyr workspace installation.
Can save several minutes downloading the Zephyr docker image and/or cloning repo from GitHub. Cache keyed on the Zephyr version, which AFAIK is the only determinant for the workspace contents. 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
d10cda66dc
commit
92a5ea51b4
14
tools/ci.sh
14
tools/ci.sh
@@ -747,14 +747,24 @@ ZEPHYR_SDK_VERSION=0.16.8
|
||||
ZEPHYR_VERSION=v3.7.0
|
||||
|
||||
function ci_zephyr_setup {
|
||||
docker pull zephyrprojectrtos/ci:${ZEPHYR_DOCKER_VERSION}
|
||||
IMAGE=zephyrprojectrtos/ci:${ZEPHYR_DOCKER_VERSION}
|
||||
|
||||
docker pull ${IMAGE}
|
||||
|
||||
# Directories cached by GitHub Actions, mounted
|
||||
# into the container
|
||||
ZEPHYRPROJECT_DIR="$(pwd)/zephyrproject"
|
||||
|
||||
mkdir -p "${ZEPHYRPROJECT_DIR}"
|
||||
|
||||
docker run --name zephyr-ci -d -it \
|
||||
-v "$(pwd)":/micropython \
|
||||
-v "${ZEPHYRPROJECT_DIR}":/zephyrproject \
|
||||
-e ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-${ZEPHYR_SDK_VERSION} \
|
||||
-e ZEPHYR_TOOLCHAIN_VARIANT=zephyr \
|
||||
-e ZEPHYR_BASE=/zephyrproject/zephyr \
|
||||
-w /micropython/ports/zephyr \
|
||||
zephyrprojectrtos/ci:${ZEPHYR_DOCKER_VERSION}
|
||||
${IMAGE}
|
||||
docker ps -a
|
||||
|
||||
# qemu-system-arm is needed to run the test suite.
|
||||
|
||||
Reference in New Issue
Block a user