File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+ NJOBS=" ${SLURM_CPUS_ON_NODE:- 24} " ; [ " $NJOBS " -gt 64 ] && NJOBS=64
4+ ./mfc.sh clean
5+ source .github/scripts/retry-build.sh
6+ retry_build ./mfc.sh build --gcov -j 8
7+ ./mfc.sh test --build-coverage-map --gcov -j " $NJOBS "
Original file line number Diff line number Diff line change 1+ # .github/workflows/coverage-health.yml
2+ name : ' Coverage Map Health'
3+ on :
4+ schedule :
5+ - cron : ' 0 7 * * *' # daily; loud if the refresh stopped working
6+ workflow_dispatch :
7+ jobs :
8+ health :
9+ if : github.repository == 'MFlowCode/MFC'
10+ runs-on : ubuntu-latest
11+ steps :
12+ - uses : actions/checkout@v4
13+ - uses : actions/setup-python@v5
14+ with : { python-version: '3.12' }
15+ - name : Initialize MFC
16+ run : ./mfc.sh init
17+ - name : Check coverage map freshness
18+ run : build/venv/bin/python3 .github/scripts/check_coverage_map_health.py
Original file line number Diff line number Diff line change 1+ # .github/workflows/coverage-refresh.yml
2+ name : ' Coverage Map Refresh'
3+ on :
4+ schedule :
5+ - cron : ' 0 6 * * 1' # weekly floor
6+ push :
7+ branches : [master]
8+ paths :
9+ - ' toolchain/mfc/test/cases.py'
10+ - ' src/**/*.fpp'
11+ workflow_dispatch :
12+ concurrency :
13+ group : coverage-refresh
14+ cancel-in-progress : true
15+ jobs :
16+ refresh :
17+ if : github.repository == 'MFlowCode/MFC'
18+ timeout-minutes : 240
19+ runs-on :
20+ group : phoenix
21+ labels : gt
22+ steps :
23+ - uses : actions/checkout@v4
24+ with : { clean: false }
25+ - name : Build + collect coverage map (SLURM)
26+ run : bash .github/scripts/submit-slurm-job.sh .github/workflows/common/coverage-refresh.sh cpu none phoenix
27+ - name : Commit refreshed map
28+ run : |
29+ if ! git diff --quiet tests/coverage_map.json.gz; then
30+ git config user.name "mfc-bot"
31+ git config user.email "mfc-bot@users.noreply.github.com"
32+ git add tests/coverage_map.json.gz
33+ git commit -m "test: refresh coverage map [skip ci]"
34+ git push origin HEAD:master
35+ else
36+ echo "Coverage map unchanged."
37+ fi
You can’t perform that action at this time.
0 commit comments