12
12
- " boards/posix/**"
13
13
- " soc/posix/**"
14
14
- " arch/posix/**"
15
+ - " include/zephyr/arch/posix/**"
16
+ - " scripts/native_simulator/**"
15
17
- " samples/net/sockets/echo_*/**"
16
18
- " modules/openthread/**"
17
19
- " subsys/net/l2/openthread/**"
18
20
- " include/zephyr/net/openthread.h"
19
21
- " drivers/ieee802154/**"
20
22
- " include/zephyr/net/ieee802154*"
23
+ - " drivers/serial/*nrfx*"
24
+ - " tests/drivers/uart/**"
21
25
22
26
concurrency :
23
27
group : ${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.ref }}
@@ -26,20 +30,21 @@ concurrency:
26
30
jobs :
27
31
bsim-test :
28
32
if : github.repository_owner == 'zephyrproject-rtos'
29
- runs-on : zephyr-runner-linux-x64-4xlarge
33
+ runs-on :
34
+ group : zephyr-runner-v2-linux-x64-4xlarge
30
35
container :
31
- image : ghcr.io/zephyrproject-rtos/ci:v0.26.4
36
+ image : ghcr.io/zephyrproject-rtos/ci-repo-cache :v0.26.9.20240223
32
37
options : ' --entrypoint /bin/bash'
33
- volumes :
34
- - /repo-cache/zephyrproject:/github/cache/zephyrproject
35
38
env :
36
39
ZEPHYR_TOOLCHAIN_VARIANT : zephyr
37
- ZEPHYR_SDK_INSTALL_DIR : /opt/toolchains/zephyr-sdk-0.16.1
38
40
BSIM_OUT_PATH : /opt/bsim/
39
41
BSIM_COMPONENTS_PATH : /opt/bsim/components
40
42
EDTT_PATH : ../tools/edtt
41
- bsim_bluetooth_test_results_file : ./bsim_bluetooth/bsim_results.xml
42
- bsim_networking_test_results_file : ./bsim_net/bsim_results.xml
43
+ bsim_bt_52_test_results_file : ./bsim_bt/52_bsim_results.xml
44
+ bsim_bt_53_test_results_file : ./bsim_bt/53_bsim_results.xml
45
+ bsim_bt_53split_test_results_file : ./bsim_bt/53_bsim_split_results.xml
46
+ bsim_net_52_test_results_file : ./bsim_net/52_bsim_results.xml
47
+ bsim_uart_test_results_file : ./bsim_uart/uart_bsim_results.xml
43
48
steps :
44
49
- name : Apply container owner mismatch workaround
45
50
run : |
@@ -49,14 +54,20 @@ jobs:
49
54
# GitHub comes up with a fundamental fix for this problem.
50
55
git config --global --add safe.directory ${GITHUB_WORKSPACE}
51
56
57
+ - name : Print cloud service information
58
+ run : |
59
+ echo "ZEPHYR_RUNNER_CLOUD_PROVIDER = ${ZEPHYR_RUNNER_CLOUD_PROVIDER}"
60
+ echo "ZEPHYR_RUNNER_CLOUD_NODE = ${ZEPHYR_RUNNER_CLOUD_NODE}"
61
+ echo "ZEPHYR_RUNNER_CLOUD_POD = ${ZEPHYR_RUNNER_CLOUD_POD}"
62
+
52
63
- name : Clone cached Zephyr repository
53
64
continue-on-error : true
54
65
run : |
55
- git clone --shared /github/ cache/zephyrproject/zephyr .
66
+ git clone --shared /repo- cache/zephyrproject/zephyr .
56
67
git remote set-url origin ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
57
68
58
69
- name : Checkout
59
- uses : actions/checkout@v3
70
+ uses : actions/checkout@v4
60
71
with :
61
72
fetch-depth : 0
62
73
@@ -72,11 +83,13 @@ jobs:
72
83
west init -l . || true
73
84
west config manifest.group-filter -- +ci
74
85
west config --global update.narrow true
75
- 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)
76
87
west forall -c 'git reset --hard HEAD'
77
88
89
+ echo "ZEPHYR_SDK_INSTALL_DIR=/opt/toolchains/zephyr-sdk-$( cat SDK_VERSION )" >> $GITHUB_ENV
90
+
78
91
- name : Check common triggering files
79
- uses : tj-actions/changed-files@v35
92
+ uses : tj-actions/changed-files@v41
80
93
id : check-common-files
81
94
with :
82
95
files : |
@@ -86,10 +99,12 @@ jobs:
86
99
boards/posix/**
87
100
soc/posix/**
88
101
arch/posix/**
102
+ include/zephyr/arch/posix/**
103
+ scripts/native_simulator/**
89
104
tests/bsim/*
90
105
91
106
- name : Check if Bluethooth files changed
92
- uses : tj-actions/changed-files@v35
107
+ uses : tj-actions/changed-files@v41
93
108
id : check-bluetooth-files
94
109
with :
95
110
files : |
98
113
subsys/bluetooth/**
99
114
100
115
- name : Check if Networking files changed
101
- uses : tj-actions/changed-files@v35
116
+ uses : tj-actions/changed-files@v41
102
117
id : check-networking-files
103
118
with :
104
119
files : |
@@ -110,51 +125,93 @@ jobs:
110
125
drivers/ieee802154/**
111
126
include/zephyr/net/ieee802154*
112
127
128
+ - name : Check if UART files changed
129
+ uses : tj-actions/changed-files@v41
130
+ id : check-uart-files
131
+ with :
132
+ files : |
133
+ tests/bsim/drivers/uart/**
134
+ drivers/serial/*nrfx*
135
+ tests/drivers/uart/**
136
+
113
137
- name : Update BabbleSim to manifest revision
114
138
if : >
115
139
steps.check-bluetooth-files.outputs.any_changed == 'true'
116
140
|| steps.check-networking-files.outputs.any_changed == 'true'
141
+ || steps.check-uart-files.outputs.any_changed == 'true'
117
142
|| steps.check-common-files.outputs.any_changed == 'true'
118
143
run : |
119
144
export BSIM_VERSION=$( west list bsim -f {revision} )
120
145
echo "Manifest points to bsim sha $BSIM_VERSION"
121
146
cd /opt/bsim_west/bsim
122
147
git fetch -n origin ${BSIM_VERSION}
123
- git config --global advice.detachedHead false
124
- git checkout ${BSIM_VERSION}
148
+ git -c advice.detachedHead=false checkout ${BSIM_VERSION}
125
149
west update
126
150
make everything -s -j 8
127
151
128
152
- name : Run Bluetooth Tests with BSIM
129
153
if : steps.check-bluetooth-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
130
154
run : |
131
155
export ZEPHYR_BASE=${PWD}
132
- WORK_DIR=${ZEPHYR_BASE}/bsim_bluetooth tests/bsim/bluetooth/compile.sh
133
- RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bluetooth_test_results_file} \
134
- SEARCH_PATH=tests/bsim/bluetooth/ tests/bsim/run_parallel.sh
156
+ export WORK_DIR=${ZEPHYR_BASE}/bsim_bt
157
+ # Build and run the BT tests for nrf52_bsim:
158
+ nice tests/bsim/bluetooth/compile.sh
159
+ RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_52_test_results_file} \
160
+ TESTS_FILE=tests/bsim/bluetooth/tests.nrf52bsim.txt tests/bsim/run_parallel.sh
161
+ # Build and run the BT controller tests also for the nrf5340bsim_nrf5340_cpunet
162
+ BOARD=nrf5340bsim_nrf5340_cpunet \
163
+ nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpunet.sh
164
+ BOARD=nrf5340bsim_nrf5340_cpunet \
165
+ RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53_test_results_file} \
166
+ TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpunet.txt \
167
+ tests/bsim/run_parallel.sh
168
+ # Build and run the nrf5340 split stack tests set
169
+ BOARD=nrf5340bsim_nrf5340_cpuapp \
170
+ nice tests/bsim/bluetooth/compile.nrf5340bsim_nrf5340_cpuapp.sh
171
+ BOARD=nrf5340bsim_nrf5340_cpuapp \
172
+ RESULTS_FILE=${ZEPHYR_BASE}/${bsim_bt_53split_test_results_file} \
173
+ TESTS_FILE=tests/bsim/bluetooth/tests.nrf5340bsim_nrf5340_cpuapp.txt \
174
+ tests/bsim/run_parallel.sh
135
175
136
176
- name : Run Networking Tests with BSIM
137
177
if : steps.check-networking-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
138
178
run : |
139
179
export ZEPHYR_BASE=${PWD}
140
- WORK_DIR=${ZEPHYR_BASE}/bsim_net tests/bsim/net/compile.sh
141
- RESULTS_FILE=${ZEPHYR_BASE}/${bsim_networking_test_results_file } \
180
+ WORK_DIR=${ZEPHYR_BASE}/bsim_net nice tests/bsim/net/compile.sh
181
+ RESULTS_FILE=${ZEPHYR_BASE}/${bsim_net_52_test_results_file } \
142
182
SEARCH_PATH=tests/bsim/net/ tests/bsim/run_parallel.sh
143
183
184
+ - name : Run UART Tests with BSIM
185
+ if : steps.check-uart-files.outputs.any_changed == 'true' || steps.check-common-files.outputs.any_changed == 'true'
186
+ run : |
187
+ echo "UART: Single device tests"
188
+ ./scripts/twister -T tests/drivers/uart/ --force-color --inline-logs -v -M -p nrf52_bsim \
189
+ --fixture gpio_loopback -- -uart0_loopback
190
+ echo "UART: Multi device tests"
191
+ export ZEPHYR_BASE=${PWD}
192
+ WORK_DIR=${ZEPHYR_BASE}/bsim_uart nice tests/bsim/drivers/uart/compile.sh
193
+ RESULTS_FILE=${ZEPHYR_BASE}/${bsim_uart_test_results_file} \
194
+ SEARCH_PATH=tests/bsim/drivers/uart/ tests/bsim/run_parallel.sh
195
+
144
196
- name : Upload Test Results
145
197
if : always()
146
- uses : actions/upload-artifact@v3
198
+ uses : actions/upload-artifact@v4
147
199
with :
148
200
name : bsim-test-results
149
201
path : |
150
- ./bsim_bluetooth/bsim_results.xml
151
- ./bsim_net/bsim_results.xml
202
+ ./bsim_bt/52_bsim_results.xml
203
+ ./bsim_bt/53_bsim_results.xml
204
+ ./bsim_bt/53_bsim_split_results.xml
205
+ ./bsim_net/52_bsim_results.xml
206
+ ./bsim_uart/uart_bsim_results.xml
207
+ ./twister-out/twister.xml
208
+ ./twister-out/twister.json
152
209
${{ github.event_path }}
153
210
if-no-files-found : warn
154
211
155
212
- name : Upload Event Details
156
213
if : always()
157
- uses : actions/upload-artifact@v3
214
+ uses : actions/upload-artifact@v4
158
215
with :
159
216
name : event
160
217
path : |
0 commit comments