Skip to content

Commit c57cf71

Browse files
committed
Document the SDL-specific custom ci commands
1 parent ea0ab26 commit c57cf71

File tree

3 files changed

+24
-4
lines changed

3 files changed

+24
-4
lines changed

.github/workflows/create-test-plan.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ class SharedLibType(Enum):
158158
@dataclasses.dataclass(slots=True)
159159
class JobDetails:
160160
name: str
161+
key: str
161162
os: str
162163
platform: str
163164
artifact: str
@@ -221,6 +222,7 @@ class JobDetails:
221222
def to_workflow(self, enable_artifacts: bool) -> dict[str, str|bool]:
222223
data = {
223224
"name": self.name,
225+
"key": self.key,
224226
"os": self.os,
225227
"container": self.container if self.container else "",
226228
"platform": self.platform,
@@ -293,9 +295,10 @@ def escape(s):
293295
return " ".join(escape(s))
294296

295297

296-
def spec_to_job(spec: JobSpec, trackmem_symbol_names: bool) -> JobDetails:
298+
def spec_to_job(spec: JobSpec, key: str, trackmem_symbol_names: bool) -> JobDetails:
297299
job = JobDetails(
298300
name=spec.name,
301+
key=key,
299302
os=spec.os.value,
300303
artifact=spec.artifact or "",
301304
container=spec.container or "",
@@ -723,9 +726,9 @@ def tf(b):
723726
return job
724727

725728

726-
def spec_to_platform(spec: JobSpec, enable_artifacts: bool, trackmem_symbol_names: bool) -> dict[str, str|bool]:
729+
def spec_to_platform(spec: JobSpec, key: str, enable_artifacts: bool, trackmem_symbol_names: bool) -> dict[str, str|bool]:
727730
logger.info("spec=%r", spec)
728-
job = spec_to_job(spec, trackmem_symbol_names=trackmem_symbol_names)
731+
job = spec_to_job(spec, key=key, trackmem_symbol_names=trackmem_symbol_names)
729732
logger.info("job=%r", job)
730733
platform = job.to_workflow(enable_artifacts=enable_artifacts)
731734
logger.info("platform=%r", platform)
@@ -773,7 +776,7 @@ def main():
773776

774777
all_level_platforms = {}
775778

776-
all_platforms = {k: spec_to_platform(spec, enable_artifacts=args.enable_artifacts, trackmem_symbol_names=args.trackmem_symbol_names) for k, spec in JOB_SPECS.items()}
779+
all_platforms = {key: spec_to_platform(spec, key=key, enable_artifacts=args.enable_artifacts, trackmem_symbol_names=args.trackmem_symbol_names) for key, spec in JOB_SPECS.items()}
777780

778781
for level_i, level_keys in enumerate(all_level_keys, 1):
779782
level_key = f"level{level_i}"

.github/workflows/generic.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,13 @@ jobs:
3434
${{ (!matrix.platform.msys2-no-perl && format('{0}-perl', matrix.platform.msys2-env)) || '' }}
3535
${{ matrix.platform.msys2-env }}-pkg-config
3636
${{ matrix.platform.msys2-env }}-clang-tools-extra
37+
- name: 'About this job'
38+
run: |
39+
echo "key=${{ matrix.platform.key }}"
40+
echo "name=${{ matrix.platform.name }}"
41+
echo "os=${{ matrix.platform.os }}"
42+
echo ""
43+
echo "Add [sdl-ci-filter ${{ matrix.platform.key }}] to your commit message to reduce the number of jobs."
3744
- uses: actions/checkout@v4
3845
- name: 'Set up ninja'
3946
if: ${{ matrix.platform.setup-ninja }}

docs/README-contributing.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ We appreciate your interest in contributing to SDL, this document will describe
1212
- [Following the style guide](#following-the-style-guide)
1313
- [Running the tests](#running-the-tests)
1414
- [Opening a pull request](#opening-a-pull-request)
15+
- [Continuous integration](#continuous-integration)
1516
- [Contributing to the documentation](#contributing-to-the-documentation)
1617
- [Editing a function documentation](#editing-a-function-documentation)
1718
- [Editing the wiki](#editing-the-wiki)
@@ -86,6 +87,15 @@ Tests allow you to verify if your changes did not break any behaviour, here are
8687
- Fill out the pull request template.
8788
- If any changes are requested, you can add new commits to your fork and they will be automatically added to the pull request.
8889

90+
### Continuous integration
91+
92+
For each push and/or pull request, GitHub Actions will try to build SDL and the test suite on most supported platforms.
93+
94+
Its behaviour can be influenced slightly by including SDL-specific tags in your commit message:
95+
- `[sdl-ci-filter GLOB]` limits the platforms for which to run ci.
96+
- `[sdl-ci-artifacts]` forces SDL artifacts, which can then be downloaded from the summary page.
97+
- `[sdl-ci-trackmem-symbol-names]` makes sure the final report generated by `--trackmem` contains symbol names.
98+
8999
## Contributing to the documentation
90100

91101
### Editing a function documentation

0 commit comments

Comments
 (0)