66 - main
77 - v*-branch
88 - collab-*
9+ - topic/ci/upload_results
910 pull_request_target:
1011 branches:
1112 - main
@@ -22,11 +23,11 @@ concurrency:
2223jobs :
2324 twister-build-prep:
2425 if: github.repository_owner == 'zephyrproject-rtos'
25- runs-on :
26- group : zephyr-runner-v2-linux-x64-4xlarge
27- container :
28- image : ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
29- options : ' --entrypoint /bin/bash'
26+ runs-on:
27+ group: zephyr-runner-v2-linux-x64-4xlarge
28+ container:
29+ image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
30+ options: '--entrypoint /bin/bash'
3031 outputs:
3132 subset: ${{ steps.output-services.outputs.subset }}
3233 size: ${{ steps.output-services.outputs.size }}
@@ -230,11 +231,12 @@ jobs:
230231
231232 - if: github.event_name == 'push'
232233 name: Run Tests with Twister (Push)
234+ id: run_twister
233235 run: |
234236 export ZEPHYR_BASE=${PWD}
235237 export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
236- ./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
237- if [ "${{matrix.subset}}" = "1 " ]; then
238+ ./scripts/twister -T tests/kernel/threads -p qemu_x86 - -subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
239+ if [ "${{matrix.subset}}" = "11 " ]; then
238240 ./scripts/zephyr_module.py --twister-out module_tests.args
239241 if [ -s module_tests.args ]; then
240242 ./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS}
@@ -243,6 +245,7 @@ jobs:
243245
244246 - if: github.event_name == 'pull_request_target'
245247 name: Run Tests with Twister (Pull Request)
248+ id: run_twister_pr
246249 run: |
247250 rm -f testplan.json
248251 export ZEPHYR_BASE=${PWD}
@@ -258,6 +261,7 @@ jobs:
258261
259262 - if: github.event_name == 'schedule'
260263 name: Run Tests with Twister (Daily)
264+ id: run_twister_sched
261265 run: |
262266 export ZEPHYR_BASE=${PWD}
263267 export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
@@ -306,42 +310,18 @@ jobs:
306310
307311 twister-test-results:
308312 name: "Publish Unit Tests Results"
309- env :
310- ELASTICSEARCH_KEY : ${{ secrets.ELASTICSEARCH_KEY }}
311- ELASTICSEARCH_SERVER : " https://elasticsearch.zephyrproject.io:443"
312- needs : twister-build
313+ needs:
314+ - twister-build
313315 runs-on: ubuntu-22.04
314316 # the build-and-test job might be skipped, we don't need to run this job then
315317 if: success() || failure()
316318
317319 steps:
318- # Needed for elasticearch and upload script
319- - if : github.event_name == 'push' || github.event_name == 'schedule'
320- name : Checkout
321- uses : actions/checkout@v4
322- with :
323- fetch-depth : 0
324- persist-credentials : false
325-
326320 - name: Download Artifacts
327321 uses: actions/download-artifact@v4
328322 with:
329323 path: artifacts
330324
331- - if : github.event_name == 'push' || github.event_name == 'schedule'
332- name : Upload to elasticsearch
333- run : |
334- pip3 install elasticsearch
335- # set run date on upload to get consistent and unified data across the matrix.
336- run_date=`date --iso-8601=minutes`
337- if [ "${{github.event_name}}" = "push" ]; then
338- python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
339- --index zephyr-main-ci-push-1 artifacts/*/*/twister.json
340- elif [ "${{github.event_name}}" = "schedule" ]; then
341- python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
342- --index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
343- fi
344-
345325 - name: Merge Test Results
346326 run: |
347327 pip3 install junitparser junit2html
0 commit comments