Skip to content

Commit 78a6734

Browse files
committed
wip
Signed-off-by: Anas Nashif <[email protected]>
1 parent 0006ba8 commit 78a6734

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

.github/workflows/twister.yaml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- main
77
- v*-branch
88
- collab-*
9+
- topic/ci/upload_results
910
pull_request_target:
1011
branches:
1112
- main
@@ -22,18 +23,15 @@ concurrency:
2223
jobs:
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: ubuntu-22.04
3027
outputs:
3128
subset: ${{ steps.output-services.outputs.subset }}
3229
size: ${{ steps.output-services.outputs.size }}
3330
fullrun: ${{ steps.output-services.outputs.fullrun }}
31+
rundate: ${{ steps.output-services.outputs.rundate }}
3432
env:
3533
MATRIX_SIZE: 10
36-
PUSH_MATRIX_SIZE: 20
34+
PUSH_MATRIX_SIZE: 5
3735
DAILY_MATRIX_SIZE: 80
3836
BSIM_OUT_PATH: /opt/bsim/
3937
BSIM_COMPONENTS_PATH: /opt/bsim/components
@@ -120,6 +118,8 @@ jobs:
120118
else
121119
size=0
122120
fi
121+
run_date=`date --iso-8601=minutes`
122+
echo "rundate=${run_date}" >> $GITHUB_OUTPUT
123123
echo "subset=${subset}" >> $GITHUB_OUTPUT
124124
echo "size=${size}" >> $GITHUB_OUTPUT
125125
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT
@@ -137,6 +137,8 @@ jobs:
137137
matrix:
138138
subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}}
139139
timeout-minutes: 1440
140+
outputs:
141+
rundate: ${{ steps.run_twister.outputs.rundate }}
140142
env:
141143
CCACHE_DIR: /node-cache/ccache-zephyr
142144
CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3"
@@ -230,19 +232,22 @@ jobs:
230232
231233
- if: github.event_name == 'push'
232234
name: Run Tests with Twister (Push)
235+
id: run_twister
233236
run: |
234237
export ZEPHYR_BASE=${PWD}
235238
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
236-
./scripts/twister --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
239+
./scripts/twister -T tests/kernel/threads -p qemu_x86 --subset ${{matrix.subset}}/${{ strategy.job-total }} ${TWISTER_COMMON} ${PUSH_OPTIONS}
237240
if [ "${{matrix.subset}}" = "1" ]; then
238241
./scripts/zephyr_module.py --twister-out module_tests.args
239242
if [ -s module_tests.args ]; then
240243
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS}
241244
fi
242245
fi
246+
echo "rundate=${{needs.twister-build-prep.outputs.rundate}}" >> $GITHUB_OUTPUT
243247
244248
- if: github.event_name == 'pull_request_target'
245249
name: Run Tests with Twister (Pull Request)
250+
id: run_twister_pr
246251
run: |
247252
rm -f testplan.json
248253
export ZEPHYR_BASE=${PWD}
@@ -258,6 +263,7 @@ jobs:
258263
259264
- if: github.event_name == 'schedule'
260265
name: Run Tests with Twister (Daily)
266+
id: run_twister_sched
261267
run: |
262268
export ZEPHYR_BASE=${PWD}
263269
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
@@ -268,6 +274,7 @@ jobs:
268274
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${DAILY_OPTIONS}
269275
fi
270276
fi
277+
echo "rundate=${{needs.twister-build-prep.outputs.rundate}}" >> $GITHUB_OUTPUT
271278
272279
- name: Print ccache stats
273280
if: always()
@@ -309,7 +316,8 @@ jobs:
309316
env:
310317
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
311318
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
312-
needs: twister-build
319+
needs:
320+
- twister-build
313321
runs-on: ubuntu-22.04
314322
# the build-and-test job might be skipped, we don't need to run this job then
315323
if: success() || failure()
@@ -333,12 +341,13 @@ jobs:
333341
run: |
334342
pip3 install elasticsearch
335343
# set run date on upload to get consistent and unified data across the matrix.
336-
run_date=`date --iso-8601=minutes`
337344
if [ "${{github.event_name}}" = "push" ]; then
338-
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
345+
python3 ./scripts/ci/upload_test_results_es.py -r ${{needs.twister-build.outputs.rundate}} \
346+
--run-attempt ${{github.run_attempt}} \
339347
--index zephyr-main-ci-push-1 artifacts/*/*/twister.json
340348
elif [ "${{github.event_name}}" = "schedule" ]; then
341-
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
349+
python3 ./scripts/ci/upload_test_results_es.py -r ${{needs.twister-build.outputs.rundate}} \
350+
--run-attempt ${{github.run_attempt}} \
342351
--index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
343352
fi
344353

0 commit comments

Comments
 (0)