Repository navigation
[ci] Reduce job count and skip duplicate PR runs - #1444
Conversation
PRs from branches of this repository are already tested by the push event, so skip the pull_request run for them, and cancel superseded runs on non-master branches. Group the per-platform tests into four jobs (runtime, tooling, cppia, haxe test suite) instead of twelve, and build the cppia host only once for both the interp and jit runs. Within a grouped job, every test still runs if an earlier one fails. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
This is a bit difficult to review, but I'd like to do something here because currently any hxcpp CI activity puts a major dent in our test resources across other repos. Or at least that's what it feels like... |
tobil4sk
left a comment
There was a problem hiding this comment.
I think this is a sensible step in general, I was also thinking to merge some of the jobs.
tooling tests cffi, telemetry (debug + release), debugger, build tool, regression
Currently the only regression test is verifying a runtime behaviour, so maybe it makes more sense in that category.
Job-level run defaults replace the workflow-level ones, so the cppia and suite
jobs ran with PowerShell on Windows and $HXCPP_ARCH_FLAG expanded to nothing.
Use ${{ env.HXCPP_ARCH_FLAG }} everywhere, and set bash for those jobs too.
Also trace commands in multi-command steps and move the regression test to the
runtime tests job.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks! Moved the regression test into the runtime tests job in d44fad5. 🤖 Generated with Claude Code |
|
I'll merge this once it's green because it looks good to me now. We can always fine-tune it later. |
|
Eh, it's green enough. Mac runners have been busy all morning. |
CI currently starts 362 jobs for a PR opened from a branch of this repository: 12 test jobs × 15 platform/Haxe combinations plus the header check is 181, and every same-repo PR runs that twice (once for
push, once forpull_request). This PR brings it down to 61 (the PR checks list shows 63, since the skippedpull_requestrun adds two skipped entries).Skip duplicate runs
Same rule as in Haxe's CI: jobs skip the
pull_requestevent when the head branch belongs to this repository, since thepushrun already tests the same commit. PRs from forks are unaffected. A new push to a branch now also cancels the in-progress run for it (not onmaster, so every merge gets a full run).The seven near-identical platform jobs in
main.ymlare folded into one matrix job, so the condition only appears once. Check names stay the same (e.g. "Test Linux (64bit) (latest) / ...").Group tests per platform
Most jobs ran for 1–3 minutes, much of it setup, while the Haxe test suite takes up to 16 minutes and sets the wall-clock time anyway.
test.ymlnow has four jobs per platform instead of twelve:In the grouped jobs every test step runs as long as setup succeeded, so one failing test doesn't hide the others. Each test's build and run commands are a single step (with
set -xto show which command failed), and run steps now use bash on all OSes so a multi-line step fails on the first error (PowerShell doesn't stop on failing native commands). Thesepinput is no longer needed and has been removed.Trade-offs
pushruns test the branch head rather than its merge withmaster.A possible follow-up is setting
HXCPP_COMPILE_CACHEper job so tests within a grouped job can share compiled runtime objects.🤖 Generated with Claude Code