Skip to content

Commit c9464c9

Browse files
committed
workflow: zephyr: Fix zephyr docker image issues
Does the following: - Uses the zephyr CI base image rather than the full CI image to fix the full image being too large for github, despite nothing having changed in the workflow or docker images - Updates to the zephyr 0.28.4 image using the 0.17.4 zephyr sdk-ng toolchain - Changes to use the zephyr setup action - Changes the runner image to `ubuntu-24.04` rather than `ubuntu-latest` which avoids possible CI breakage if the image gets a major version update and is no longer compatible - Sets python packages up using the zephyr requirements for actions (with hashes for added security) - Enables ccache with 768MiB maximum size to speed up CI jobs - Removes retries from CI runs as these samples are minimal compared to zephyr's CI runs Signed-off-by: Jamie McCrae <[email protected]>
1 parent 3c8e571 commit c9464c9

File tree

1 file changed

+15
-10
lines changed

1 file changed

+15
-10
lines changed

.github/workflows/zephyr_build.yaml

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2022-2023 Nordic Semiconductor ASA
1+
# Copyright (c) 2022-2025 Nordic Semiconductor ASA
22
# SPDX-License-Identifier: Apache-2.0
33

44
name: Build Zephyr samples with Twister
@@ -37,15 +37,13 @@ concurrency:
3737

3838
jobs:
3939
build_zephyr_with_twister:
40-
runs-on: ubuntu-latest
40+
runs-on: ubuntu-24.04
4141
# Docker image from the zephyr upstream. Includes SDK and other required tools
4242
container:
43-
image: zephyrprojectrtos/ci:v0.27.6
43+
image: zephyrprojectrtos/ci-base:v0.28.4
4444
options: '--entrypoint /bin/bash'
4545
volumes:
4646
- /home/runners/zephyrproject:/github/cache/zephyrproject
47-
env:
48-
ZEPHYR_SDK_INSTALL_DIR: /opt/toolchains/zephyr-sdk-0.17.1-rc2
4947

5048
steps:
5149
- name: Set versions when workflow_dispatch
@@ -66,12 +64,19 @@ jobs:
6664
ref: ${{ env.ZEPHYR_VERSION }}
6765
path: 'repos/zephyr'
6866

69-
- name: Setup Zephyr
67+
- name: Setup python requirements
7068
working-directory: repos/zephyr
7169
run: |
72-
west config --system manifest.project-filter -- -.*,+cmsis,+cmsis_6,+hal_nordic,+hal_nxp,+hal_stm32,+libmetal,+littlefs,+mbedtls,+mcuboot,+open-amp,+picolibc,+segger,+tinycrypt,+trusted-firmware-m,+zcbor
73-
west init -l .
74-
west update
70+
pip install -r scripts/requirements-actions.txt --require-hashes
71+
72+
- name: Setup toolchains
73+
uses: zephyrproject-rtos/action-zephyr-setup@c125c5ebeeadbd727fa740b407f862734af1e52a # v1.0.9
74+
with:
75+
base-path: repos/zephyr
76+
toolchains: arm-zephyr-eabi
77+
sdk-version: 0.17.4
78+
west-project-filter: -.*,+cmsis,+cmsis_6,+hal_nordic,+hal_nxp,+hal_stm32,+libmetal,+littlefs,+mbedtls,+mcuboot,+open-amp,+tinycrypt,+trusted-firmware-m,+zcbor
79+
ccache-max-size: 768MB
7580

7681
- name: Checkout MCUBoot
7782
uses: actions/checkout@v2
@@ -93,7 +98,7 @@ jobs:
9398
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
9499
echo "Using Zephyr version: ${{ env.ZEPHYR_VERSION }}"
95100
echo "Using Mcuboot version: ${{ env.MCUBOOT_VERSION }}"
96-
./scripts/twister --inline-logs -v -N -M --integration --overflow-as-errors --retry-failed 2 ${test_paths}
101+
./scripts/twister --inline-logs -v -N -M --integration --overflow-as-errors ${test_paths}
97102
98103
- name: Upload Tests Results
99104
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)