Skip to content

Commit 627a52b

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 627a52b

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

.github/workflows/twister.yml

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464

6565
outputs:
6666
runner: ${{ steps.plan.outputs.runner }}
67+
container: ${{ steps.plan.outputs.container }}
6768
subset: ${{ steps.plan.outputs.subset }}
6869
size: ${{ steps.plan.outputs.size }}
6970

@@ -73,11 +74,23 @@ jobs:
7374
run: |
7475
# Resolve runner type
7576
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";;
77+
linux-x86_64)
78+
runner="zephyr-runner-v2-linux-x64-4xlarge"
79+
container="ghcr.io/zephyrproject-rtos/sdk-build:v1.3.9"
80+
;;
81+
linux-aarch64)
82+
runner="zephyr-runner-v2-linux-arm64-4xlarge"
83+
container="ghcr.io/zephyrproject-rtos/sdk-build:v1.3.9"
84+
;;
85+
macos-x86_64)
86+
runner="zephyr-runner-v2-macos-arm64-2xlarge"
87+
;;
88+
macos-aarch64)
89+
runner="zephyr-runner-v2-macos-arm64-2xlarge"
90+
;;
91+
windows-x86_64)
92+
runner="zephyr-runner-v2-windows-x64-2xlarge"
93+
;;
8194
esac
8295
8396
# Resolve subset count
@@ -94,6 +107,7 @@ jobs:
94107
95108
# Export output variables
96109
echo "runner=${runner}" >> $GITHUB_OUTPUT
110+
echo "container=${container}" >> $GITHUB_OUTPUT
97111
echo "subset=${subset}" >> $GITHUB_OUTPUT
98112
echo "size=${size}" >> $GITHUB_OUTPUT
99113
@@ -102,6 +116,7 @@ jobs:
102116
needs: [ prep ]
103117
runs-on:
104118
group: ${{ needs.prep.outputs.runner }}
119+
container: "${{ needs.prep.outputs.container }}"
105120

106121
strategy:
107122
fail-fast: false

0 commit comments

Comments
 (0)