Skip to content

ci: do a full cron build every day, and limit builds per push or pr#15839

Merged
slouken merged 3 commits into
libsdl-org:mainfrom
madebr:ci-cron-job
Jun 17, 2026
Merged

ci: do a full cron build every day, and limit builds per push or pr#15839
slouken merged 3 commits into
libsdl-org:mainfrom
madebr:ci-cron-job

Conversation

@madebr

@madebr madebr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

I added a priority key to .github/workflows/create-test-plan.py.
Platforms that have "priority" are built for every commit/pull request.
Platforms that have not are built daily.

By using [sdl-ci-filter ..] in your commit message , you can still force certain platforms in pushes.

  • I confirm that I am the author of this code and release it to the SDL project under the Zlib license. This contribution does not contain code from other sources, including code generated by a Large Language Model ("AI").

Description

Existing Issue(s)

Fixes #6624

@madebr

madebr commented Jun 16, 2026

Copy link
Copy Markdown
Contributor Author

I need feedback on what platforms to build for each push/pull request, and also what time the cron job should run.

@slouken

slouken commented Jun 16, 2026

Copy link
Copy Markdown
Collaborator

I talked with @icculus, and we want to switch the level 1 canary build to "Android (Android.mk)" and move the Haiku build into level 2.

From level 2, these seem like priorities to me and should run on every commit:

  • Windows (MSVC, x64)
  • Windows (MSVC, x86)
  • Steam Linux Runtime 4.0 (x86_64)
  • MacOS (Framework) (arm64)
  • iOS (CMake & xcode)
  • tvOS (CMake & xcode)
  • Emscripten (tests disabled, and the daily build should run with tests enabled)

Everything else can run once a day, and I don't have a strong preference as to when.

@slouken slouken added this to the 3.6.0 milestone Jun 17, 2026
@slouken

slouken commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

If it's complicated to split the Emscripten build into test / no-test, then we can leave it running tests for now.

Comment thread .github/workflows/create-test-plan.py Outdated
if not filters:
if args.priority_only:
filters.extend(spec_id for spec_id, spec in JOB_SPECS.items() if spec.priority)
elif not filters:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this check for filters first before args.priority_only?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. If you add [sdl-ci-filter], you don't need the "priority platforms".

(btw, I'm open to a better naming instead of "priority". It's a bit opinionated.)

@madebr madebr force-pushed the ci-cron-job branch 2 times, most recently from ba8cdf3 to 7e4ed32 Compare June 17, 2026 06:58
@1bsyl

1bsyl commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

totally novice on that,
what the difference between level 1 and 2 ? (it seems both are daily?)

can we have an example of
[sdl-ci-filter ..]
and eventually this written to some new build/README-dev.md ?

thanks,

@madebr

madebr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author
* Emscripten (tests disabled, and the daily build should run with tests enabled)

I disabled building and running the emscripten tests for non-priority emscripten builds.
Not sure if that's what you meant.

By using sdl-ci-filter syntax, you can still force certain platforms.
@madebr

madebr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

totally novice on that, what the difference between level 1 and 2 ? (it seems both are daily?)

level1 contains the smoke test, level2 the rest. It's just a name with gaming in mind.

can we have an example of [sdl-ci-filter ..] and eventually this written to some new build/README-dev.md ?

The options are documented here.
The key is usually the name of the artifact, or the key shown in the "About this job" step:
https://github.com/libsdl-org/SDL/actions/runs/27655867907/job/81790412058#step:4:9

If you want to run ci for all Android platforms, you'd then add the following to your last commit message:
[sdl-ci-filter *android*].
(This does not work on pull requests)

@1bsyl

1bsyl commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

@madebr
sorry still not really clear,

level 1, only android
level 2, 7 platform (ios tvos macos win win steam, emscriptem)
and there are now run on each commit
this is just a name and no difference between level 1 and 2 ?

(I understand that all others (like 50 builds ) are now build only once a day)

You talk about "smoke test", but this is usually a run of executable ?

Could we run automatically run testautomation ? or "./testsprite --quit-after-ms 1000 "

@madebr

madebr commented Jun 17, 2026

Copy link
Copy Markdown
Contributor Author

@madebr sorry still not really clear,

level 1, only android level 2, 7 platform (ios tvos macos win win steam, emscriptem) and there are now run on each commit this is just a name and no difference between level 1 and 2 ?

Indeed, there's no difference.
Every "level" is a job in GitHub workflow parlance, and every platform run is an item in the strategy matrix.

You talk about "smoke test", but this is usually a run of executable ?

In the context of SDL, it means "Can SDL be built? Doesn't the commit contain breaking typos and/or bugs?"

Could we run automatically run testautomation ? or "./testsprite --quit-after-ms 1000 "

ci runs all tests marked as NONINTERACTIVE in test/CMakeLists.txt.
testsprite is currently not part of this, but can be added with the following patch:

--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -461,7 +461,7 @@ if(EMSCRIPTEN)
 endif()
 add_sdl_test_executable(testshape NEEDS_RESOURCES SOURCES testshape.c ${glass_png_header} DEPENDS generate-glass_png_header NAME83 shape)
 add_sdl_test_executable(testsoftwaretransparent SOURCES testsoftwaretransparent.c NAME83 swtransp)
-add_sdl_test_executable(testsprite MAIN_CALLBACKS NEEDS_RESOURCES TESTUTILS SOURCES testsprite.c NAME83 sprite)
+add_sdl_test_executable(testsprite NONINTERACTIVE NONINTERACTIVE_ARGS --quit-after-ms 200 0NONINTERACTIVE_TIMEOUT 4 MAIN_CALLBACKS NEEDS_RESOURCES TESTUTILS SOURCES testsprite.c NAME83 sprite)
 add_sdl_test_executable(testspriteminimal SOURCES testspriteminimal.c ${icon_png_header} DEPENDS generate-icon_png_header NAME83 spritmin)
 add_sdl_test_executable(testspritesurface SOURCES testspritesurface.c ${icon_png_header} DEPENDS generate-icon_png_header NAME83 spritsrf)
 if(CMAKE_CXX_COMPILER)

@slouken

slouken commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator
* Emscripten (tests disabled, and the daily build should run with tests enabled)

I disabled building and running the emscripten tests for non-priority emscripten builds. Not sure if that's what you meant.

I meant the other way. Run tests during the long build including all platforms, skip them in the quick build for every commit.

@slouken

slouken commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

We should also include specific platform builds for changes to platform specific files, e.g. run the Vita build for */vita/* changes if possible.

Edit: this can come in a future PR if everyone thinks it's important. It might not be, since presumably you'll be building and testing the changes for the platform you're working on.

@slouken

slouken commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator
* Emscripten (tests disabled, and the daily build should run with tests enabled)

I disabled building and running the emscripten tests for non-priority emscripten builds. Not sure if that's what you meant.

I meant the other way. Run tests during the long build including all platforms, skip them in the quick build for every commit.

Actually, it looks like you did this, thanks!

Comment thread .github/workflows/create-test-plan.py Outdated
@slouken slouken merged commit 71b9add into libsdl-org:main Jun 17, 2026
9 checks passed
@slouken

slouken commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

Merged, thanks!

@madebr madebr deleted the ci-cron-job branch June 17, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Actions should just build Linux, Mac, Windows per-push and PR

3 participants