Skip to content

Commit 5128fdb

Browse files
committed
xxx
Signed-off-by: Anas Nashif <[email protected]>
1 parent 1153b80 commit 5128fdb

File tree

1 file changed

+13
-23
lines changed

1 file changed

+13
-23
lines changed

.github/workflows/twister.yaml

Lines changed: 13 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,14 @@ jobs:
2424
twister-build-prep:
2525
if: github.repository_owner == 'zephyrproject-rtos'
2626
runs-on: ubuntu-22.04
27-
container:
28-
image: ghcr.io/zephyrproject-rtos/ci-repo-cache:v0.27.4.20241026
29-
options: '--entrypoint /bin/bash'
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
@@ -101,21 +99,6 @@ jobs:
10199
fi
102100
rm -f testplan.json .testplan
103101
104-
- name: Provide rundate to runners
105-
id: test-plan-rundate
106-
run: |
107-
run_date=`date --iso-8601=minutes`
108-
echo "RUNDATE=${run_date}" > testplan.txt
109-
110-
- name: Upload Testplans
111-
if: always()
112-
uses: actions/upload-artifact@v4
113-
with:
114-
name: Testplans
115-
if-no-files-found: ignore
116-
path: |
117-
testplan.txt
118-
119102
- name: Determine matrix size
120103
id: output-services
121104
run: |
@@ -135,6 +118,8 @@ jobs:
135118
else
136119
size=0
137120
fi
121+
run_date=`date --iso-8601=minutes`
122+
echo "rundate=${run_date}" >> $GITHUB_OUTPUT
138123
echo "subset=${subset}" >> $GITHUB_OUTPUT
139124
echo "size=${size}" >> $GITHUB_OUTPUT
140125
echo "fullrun=${TWISTER_FULL}" >> $GITHUB_OUTPUT
@@ -152,6 +137,8 @@ jobs:
152137
matrix:
153138
subset: ${{fromJSON(needs.twister-build-prep.outputs.subset)}}
154139
timeout-minutes: 1440
140+
outputs:
141+
rundate: ${{ steps.run_twister.outputs.rundate }}
155142
env:
156143
CCACHE_DIR: /node-cache/ccache-zephyr
157144
CCACHE_REMOTE_STORAGE: "redis://cache-*.keydb-cache.svc.cluster.local|shards=1,2,3"
@@ -245,6 +232,7 @@ jobs:
245232
246233
- if: github.event_name == 'push'
247234
name: Run Tests with Twister (Push)
235+
id: run_twister
248236
run: |
249237
export ZEPHYR_BASE=${PWD}
250238
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
@@ -255,9 +243,11 @@ jobs:
255243
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${PUSH_OPTIONS}
256244
fi
257245
fi
246+
echo "rundate=${{needs.twister-build-prep.outputs.rundate}}" >> $GITHUB_OUTPUT
258247
259248
- if: github.event_name == 'pull_request_target'
260249
name: Run Tests with Twister (Pull Request)
250+
id: run_twister
261251
run: |
262252
rm -f testplan.json
263253
export ZEPHYR_BASE=${PWD}
@@ -273,6 +263,7 @@ jobs:
273263
274264
- if: github.event_name == 'schedule'
275265
name: Run Tests with Twister (Daily)
266+
id: run_twister
276267
run: |
277268
export ZEPHYR_BASE=${PWD}
278269
export ZEPHYR_TOOLCHAIN_VARIANT=zephyr
@@ -283,6 +274,7 @@ jobs:
283274
./scripts/twister +module_tests.args --outdir module_tests ${TWISTER_COMMON} ${DAILY_OPTIONS}
284275
fi
285276
fi
277+
echo "rundate=${{needs.twister-build-prep.outputs.rundate}}" >> $GITHUB_OUTPUT
286278
287279
- name: Print ccache stats
288280
if: always()
@@ -325,7 +317,6 @@ jobs:
325317
ELASTICSEARCH_KEY: ${{ secrets.ELASTICSEARCH_KEY }}
326318
ELASTICSEARCH_SERVER: "https://elasticsearch.zephyrproject.io:443"
327319
needs:
328-
- twister-build-prep
329320
- twister-build
330321
runs-on: ubuntu-22.04
331322
# the build-and-test job might be skipped, we don't need to run this job then
@@ -350,12 +341,11 @@ jobs:
350341
run: |
351342
pip3 install elasticsearch
352343
# set run date on upload to get consistent and unified data across the matrix.
353-
run_date=`date --iso-8601=minutes`
354344
if [ "${{github.event_name}}" = "push" ]; then
355-
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}} \
356346
--index zephyr-main-ci-push-1 artifacts/*/*/twister.json
357347
elif [ "${{github.event_name}}" = "schedule" ]; then
358-
python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \
348+
python3 ./scripts/ci/upload_test_results_es.py -r ${{needs.twister-build-prep.outputs.rundate}} \
359349
--index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json
360350
fi
361351

0 commit comments

Comments
 (0)