Skip to content

Commit d5abef9

Browse files
committed
ci: twister: Run Linux jobs inside container
The GitHub Actions runner may occasionally lose communication with the server (i.e. get denial-of-service'ed) when running twister directly on the runner host. To work around this, run twister inside a container, which is isolated from the GitHub Actions runner pod, as does the Zephyr main CI twister workflow. Signed-off-by: Stephanos Ioannidis <[email protected]>
1 parent 6277ba7 commit d5abef9

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

.github/workflows/twister.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,23 @@ jobs:
7373
run: |
7474
# Resolve runner type
7575
case "${{ github.event.inputs.host }}" in
76-
linux-x86_64) runner="zephyr-runner-v2-linux-x64-4xlarge";;
77-
linux-aarch64) runner="zephyr-runner-v2-linux-arm64-4xlarge";;
78-
macos-x86_64) runner="zephyr-runner-v2-macos-arm64-2xlarge";;
79-
macos-aarch64) runner="zephyr-runner-v2-macos-arm64-2xlarge";;
80-
windows-x86_64) runner="zephyr-runner-v2-windows-x64-2xlarge";;
76+
linux-x86_64)
77+
runner="zephyr-runner-v2-linux-x64-4xlarge"
78+
container="ghcr.io/zephyrproject-rtos/sdk-build:v1.3.9"
79+
;;
80+
linux-aarch64)
81+
runner="zephyr-runner-v2-linux-arm64-4xlarge"
82+
container="ghcr.io/zephyrproject-rtos/sdk-build:v1.3.9"
83+
;;
84+
macos-x86_64)
85+
runner="zephyr-runner-v2-macos-arm64-2xlarge"
86+
;;
87+
macos-aarch64)
88+
runner="zephyr-runner-v2-macos-arm64-2xlarge"
89+
;;
90+
windows-x86_64)
91+
runner="zephyr-runner-v2-windows-x64-2xlarge"
92+
;;
8193
esac
8294
8395
# Resolve subset count
@@ -94,6 +106,7 @@ jobs:
94106
95107
# Export output variables
96108
echo "runner=${runner}" >> $GITHUB_OUTPUT
109+
echo "container=${container}" >> $GITHUB_OUTPUT
97110
echo "subset=${subset}" >> $GITHUB_OUTPUT
98111
echo "size=${size}" >> $GITHUB_OUTPUT
99112
@@ -102,6 +115,7 @@ jobs:
102115
needs: [ prep ]
103116
runs-on:
104117
group: ${{ needs.prep.outputs.runner }}
118+
container: ${{ needs.prep.outputs.container }}
105119

106120
strategy:
107121
fail-fast: false

0 commit comments

Comments
 (0)