Split the macOS and Windows jobs into a PR set, a full set, and a nightly set
The 19 macOS and 32 Windows jobs ran on every push to every pull request. They now use the same sets as the Ubuntu jobs: - PR set (16): four Visual Studio 2022 and two Visual Studio 2026 configurations, ARM64 Debug, Clang 20.1.8 with MinGW, MinGW x86, the C++20 module test, Xcode 16.0, 16.4, 26.3 and 26.6, C++14 on the latest Xcode, and the Swift Package Manager check. - full set (34): every other Visual Studio configuration, Clang version, clang-cl, Xcode version and C++ standard. - nightly set (1): 64-bit MinGW, which takes about 68 minutes. A failed nightly run opens or updates an issue. No configuration is removed: tools/ci_jobs/ci_jobs.py --compare lists 157 configurations before and after, and all jobs keep their runner, steps and environment. ci_jobs.py now checks all three workflows and expands matrices that consist only of include entries correctly. Signed-off-by: Niels Lohmann <mail@nlohmann.me>
This commit is contained in:
5 files changed
+301
-68
No files matched your search
@@ -1,6 +1,8 @@
|
||||
# ci_jobs
|
||||
|
||||
The compiler jobs of [`ubuntu.yml`](../../.github/workflows/ubuntu.yml) are split into three sets, chosen by each job's
|
||||
The jobs of the compiler workflows [`ubuntu.yml`](../../.github/workflows/ubuntu.yml),
|
||||
[`macos.yml`](../../.github/workflows/macos.yml), and [`windows.yml`](../../.github/workflows/windows.yml) are split into
|
||||
three sets, chosen by each job's
|
||||
`if:` condition (see [How CI runs](https://json.nlohmann.me/community/quality_assurance/#how-ci-runs)):
|
||||
|
||||
- **PR set**: every push to a pull request, and every push to `develop`, `master`, and `release/*`;
|
||||
@@ -12,8 +14,9 @@ A matrix whose entries belong to different sets is split into one job per set: t
|
||||
|
||||
[`ci_jobs.py`](ci_jobs.py) checks that
|
||||
|
||||
- every job of `ubuntu.yml` has the `if:` condition of exactly one set (the conditions are in `SETS`),
|
||||
- every full-set job waits for (`needs:`) exactly the PR set, and `nightly_report` for exactly the nightly set, and
|
||||
- every job has the `if:` condition of exactly one set (the conditions are in `SETS`),
|
||||
- every full-set job waits for (`needs:`) exactly the PR set of its workflow, and `nightly_report` for exactly the
|
||||
nightly set, and
|
||||
- the job table in [`quality_assurance.md`](../../docs/mkdocs/docs/community/quality_assurance.md) is up to date.
|
||||
|
||||
```shell
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/env python3
|
||||
"""List and check the jobs of the compiler workflows and the set each job belongs to.
|
||||
|
||||
The jobs of a tiered workflow (ubuntu.yml) belong to one of three sets, chosen
|
||||
by the job's `if:` condition:
|
||||
The jobs of the compiler workflows belong to one of three sets, chosen by the
|
||||
job's `if:` condition:
|
||||
|
||||
- PR set: every pull request push and every push,
|
||||
- full set: after the PR set passed, on pushes and on pull requests with the
|
||||
@@ -10,11 +10,9 @@ by the job's `if:` condition:
|
||||
- nightly set: nightly on develop, on pushes to master and release/*, and when
|
||||
started by hand.
|
||||
|
||||
The jobs of the other workflows run on every push and pull request.
|
||||
|
||||
The script checks that every job of a tiered workflow belongs to exactly one
|
||||
set, that the full set waits for the whole PR set, that the nightly report
|
||||
waits for the whole nightly set, and that the job table in
|
||||
The script checks that every job belongs to exactly one set, that the full set
|
||||
of a workflow waits for its whole PR set, that the nightly report waits for the
|
||||
whole nightly set, and that the job table in
|
||||
docs/mkdocs/docs/community/quality_assurance.md is up to date.
|
||||
|
||||
--markdown print the job table for the documentation
|
||||
@@ -37,7 +35,7 @@ DOCS = 'docs/mkdocs/docs/community/quality_assurance.md'
|
||||
BEGIN, END = '<!-- ci_jobs: begin -->', '<!-- ci_jobs: end -->'
|
||||
|
||||
WORKFLOWS = ['.github/workflows/ubuntu.yml', '.github/workflows/macos.yml', '.github/workflows/windows.yml']
|
||||
TIERED = ['.github/workflows/ubuntu.yml']
|
||||
TIERED = WORKFLOWS
|
||||
# --compare also counts the jobs of these workflows, so a job moved between workflows is not a removed one
|
||||
COMPARED = WORKFLOWS + ['.github/workflows/repository_checks.yml', '.github/workflows/check_amalgamation.yml']
|
||||
|
||||
@@ -80,7 +78,10 @@ def expand(matrix):
|
||||
if not matrix:
|
||||
return [{}]
|
||||
keys = [k for k in matrix if k not in ('include', 'exclude')]
|
||||
combos = [dict(zip(keys, values)) for values in itertools.product(*(matrix[k] for k in keys))] if keys else []
|
||||
if not keys:
|
||||
# a matrix of only include entries runs each entry
|
||||
return [dict(inc) for inc in matrix.get('include') or []]
|
||||
combos = [dict(zip(keys, values)) for values in itertools.product(*(matrix[k] for k in keys))]
|
||||
for ex in matrix.get('exclude') or []:
|
||||
combos = [c for c in combos if any(c.get(k) != v for k, v in ex.items())]
|
||||
for inc in matrix.get('include') or []:
|
||||
|
||||
Reference in new issue
Block a user