From 39f30a09c249a96049f2f4a2950c72a793be1986 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 18 Sep 2026 18:49:22 -0400 Subject: [PATCH 1/3] EXPERIMENT ONLY: measure Zephyr CI container pull time on a hosted runner Times pulling the Zephyr ci-base, ci and ci-repo-cache images on a plain runner, and the startup, `west init` and `west update` of a job running inside ci-repo-cache. Added to `IGNORE_BOARD` so the PR does not trigger a board build. Co-Authored-By: Claude Fable 5.1 --- .../workflows/experiment-container-pull.yml | 71 +++++++++++++++++++ tools/ci_set_matrix.py | 1 + 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/experiment-container-pull.yml diff --git a/.github/workflows/experiment-container-pull.yml b/.github/workflows/experiment-container-pull.yml new file mode 100644 index 00000000000..c9a59feed9c --- /dev/null +++ b/.github/workflows/experiment-container-pull.yml @@ -0,0 +1,71 @@ +# SPDX-FileCopyrightText: Copyright (c) 2026 Adafruit Industries LLC +# +# SPDX-License-Identifier: MIT + +# EXPERIMENT ONLY. Measures what a container-based zephyr-cp job would pay on a +# hosted runner: the pull and unpack time of the Zephyr CI images, and the startup +# and module fetch time of a job that runs inside one. + +name: "Experiment: container pull time" + +on: + pull_request: + paths: + - .github/workflows/experiment-container-pull.yml + +env: + ZEPHYR_CI_TAG: v0.29.2.20260422 + +jobs: + pull-times: + runs-on: ubuntu-24.04 + steps: + - name: Runner info + run: | + grep "model name" /proc/cpuinfo | head -1 + docker --version + df -h / | tail -1 + - name: Pull ci-base + run: time docker pull --quiet ghcr.io/zephyrproject-rtos/ci-base:$ZEPHYR_CI_TAG + - name: Pull ci + run: time docker pull --quiet ghcr.io/zephyrproject-rtos/ci:$ZEPHYR_CI_TAG + - name: Pull ci-repo-cache + run: time docker pull --quiet ghcr.io/zephyrproject-rtos/ci-repo-cache:$ZEPHYR_CI_TAG + - name: Image sizes + run: docker image ls --format '{{.Repository}}:{{.Tag}} {{.Size}}' | grep zephyrproject-rtos + + inside-repo-cache-container: + # "Initialize containers" in this job's log is the pull plus start cost that a + # real container job would pay before its first step. + runs-on: ubuntu-24.04 + container: + image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.29.2.20260422 + steps: + - name: Set up repository + uses: actions/checkout@v6 + with: + submodules: false + show-progress: false + fetch-depth: 1 + persist-credentials: false + - name: What the image provides + run: | + west --version || true + ls /opt/toolchains 2>/dev/null || true + du -sh /repo-cache 2>/dev/null || echo "no /repo-cache" + ls /repo-cache 2>/dev/null || true + - name: west init + working-directory: ports/zephyr-cp + run: time west init -l zephyr-config --mf west.yml + - name: west update from the image's repo cache + working-directory: ports/zephyr-cp + run: | + if [ -d /repo-cache/zephyrproject ]; then + time west update -o=--depth=1 -n --path-cache /repo-cache/zephyrproject + else + echo "no repo cache in image; plain update" + time west update -o=--depth=1 -n + fi + - name: Workspace size + working-directory: ports/zephyr-cp + run: du -sh --exclude=.git zephyr modules bootloader tools 2>/dev/null | sort -rh | head -5 diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index 4eef0060af5..a49f12e1058 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -55,6 +55,7 @@ ".github/workflows/run-tests.yml", ".github/workflows/run-zephyr-tests.yml", ".github/workflows/build-board-custom.yml", + ".github/workflows/experiment-container-pull.yml", ".github/workflows/bundle_cron.yml", ".github/workflows/create-website-pr.yml", ".github/workflows/learn_cron.yml", From dbf763627e7108c4331d88a51174cf33978ffde3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 18 Sep 2026 19:05:30 -0400 Subject: [PATCH 2/3] Re-trigger CI From 08ed8205b49d4748a19baf8693108bea7b493ec0 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 18 Sep 2026 22:27:02 -0400 Subject: [PATCH 3/3] EXPERIMENT ONLY: fix image tags and use bash inside the container --- .github/workflows/experiment-container-pull.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/experiment-container-pull.yml b/.github/workflows/experiment-container-pull.yml index c9a59feed9c..5222f64a413 100644 --- a/.github/workflows/experiment-container-pull.yml +++ b/.github/workflows/experiment-container-pull.yml @@ -14,7 +14,9 @@ on: - .github/workflows/experiment-container-pull.yml env: - ZEPHYR_CI_TAG: v0.29.2.20260422 + # ci-base and ci are tagged by version; ci-repo-cache adds the date of its repo snapshot. + ZEPHYR_CI_TAG: v0.29.2 + ZEPHYR_CI_REPO_CACHE_TAG: v0.29.2.20260422 jobs: pull-times: @@ -30,7 +32,7 @@ jobs: - name: Pull ci run: time docker pull --quiet ghcr.io/zephyrproject-rtos/ci:$ZEPHYR_CI_TAG - name: Pull ci-repo-cache - run: time docker pull --quiet ghcr.io/zephyrproject-rtos/ci-repo-cache:$ZEPHYR_CI_TAG + run: time docker pull --quiet ghcr.io/zephyrproject-rtos/ci-repo-cache:$ZEPHYR_CI_REPO_CACHE_TAG - name: Image sizes run: docker image ls --format '{{.Repository}}:{{.Tag}} {{.Size}}' | grep zephyrproject-rtos @@ -56,9 +58,11 @@ jobs: ls /repo-cache 2>/dev/null || true - name: west init working-directory: ports/zephyr-cp + shell: bash run: time west init -l zephyr-config --mf west.yml - name: west update from the image's repo cache working-directory: ports/zephyr-cp + shell: bash run: | if [ -d /repo-cache/zephyrproject ]; then time west update -o=--depth=1 -n --path-cache /repo-cache/zephyrproject