Skip to content

Commit d0b78fb

Browse files
committed
ci: twister: Use zephyr-runner v2
This commit updates the twister workflow to use the new zephyr-runner v2 CI runner deployment. It also updates the workflow to use the `ci-repo-cache` Docker image, which includes the Zephyr repository cache, because the node level repository cache is no longer available in the zephyr-runner v2. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 15e55bd commit d0b78fb

File tree

1 file changed

+10
-18
lines changed

1 file changed

+10
-18
lines changed

.github/workflows/twister.yaml

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@ concurrency:
2222
jobs:
2323
twister-build-prep:
2424
if: github.repository_owner == 'zephyrproject-rtos'
25-
runs-on: zephyr-runner-linux-x64-4xlarge
25+
runs-on:
26+
group: zephyr-runner-v2-linux-x64-4xlarge
2627
container:
27-
image: ghcr.io/zephyrproject-rtos/ci:v0.26.7
28+
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.9.20240223
2829
options: '--entrypoint /bin/bash'
29-
volumes:
30-
- /repo-cache/zephyrproject:/github/cache/zephyrproject
3130
outputs:
3231
subset: ${{ steps.output-services.outputs.subset }}
3332
size: ${{ steps.output-services.outputs.size }}
@@ -62,7 +61,7 @@ jobs:
6261
if: github.event_name == 'pull_request_target'
6362
continue-on-error: true
6463
run: |
65-
git clone --shared /github/cache/zephyrproject/zephyr .
64+
git clone --shared /repo-cache/zephyrproject/zephyr .
6665
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
6766
6867
- name: Checkout
@@ -84,7 +83,7 @@ jobs:
8483
west init -l . || true
8584
west config manifest.group-filter -- +ci,+optional
8685
west config --global update.narrow true
87-
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
86+
west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject)
8887
west forall -c 'git reset --hard HEAD'
8988
9089
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
@@ -127,14 +126,13 @@ jobs:
127126
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT
128127
129128
twister-build:
130-
runs-on: zephyr-runner-linux-x64-4xlarge
129+
runs-on:
130+
group: zephyr-runner-v2-linux-x64-4xlarge
131131
needs: twister-build-prep
132132
if: needs.twister-build-prep.outputs.size != 0
133133
container:
134-
image: ghcr.io/zephyrproject-rtos/ci:v0.26.7
134+
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.26.9.20240223
135135
options: '--entrypoint /bin/bash'
136-
volumes:
137-
- /repo-cache/zephyrproject:/github/cache/zephyrproject
138136
strategy:
139137
fail-fast: false
140138
matrix:
@@ -160,7 +158,7 @@ jobs:
160158
- name: Clone cached Zephyr repository
161159
continue-on-error: true
162160
run: |
163-
git clone --shared /github/cache/zephyrproject/zephyr .
161+
git clone --shared /repo-cache/zephyrproject/zephyr .
164162
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
165163
166164
- name: Checkout
@@ -184,15 +182,9 @@ jobs:
184182
west init -l . || true
185183
west config manifest.group-filter -- +ci,+optional
186184
west config --global update.narrow true
187-
west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /github/cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /github/cache/zephyrproject)
185+
west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || west update --path-cache /repo-cache/zephyrproject 2>&1 1> west.update.log || ( rm -rf ../modules ../bootloader ../tools && west update --path-cache /repo-cache/zephyrproject)
188186
west forall -c 'git reset --hard HEAD'
189187
190-
# Hotfix until we have kitware ninja in the docker image.
191-
# Needed for full functionality of the job server functionality in twister which only works with
192-
# kitware supplied ninja version.
193-
wget -c https://github.com/Kitware/ninja/releases/download/v1.11.1.g95dee.kitware.jobserver-1/ninja-1.11.1.g95dee.kitware.jobserver-1_x86_64-linux-gnu.tar.gz -O - | tar xz --strip-components=1
194-
sudo cp ninja /usr/local/bin
195-
196188
echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
197189
198190
- name: Check Environment

0 commit comments

Comments
 (0)