Skip to content

[ci] Reduce job count and skip duplicate PR runs - #1444

Merged
Simn merged 2 commits into
masterfrom
ci-reduce-jobs
Oct 30, 2026
Merged

Simn merged 2 commits into
masterfrom
ci-reduce-jobs

Conversation

@Simn

@Simn Simn commented Oct 30, 2026 •

Copy link
Copy Markdown
Member

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 for pull_request). This PR brings it down to 61 (the PR checks list shows 63, since the skipped pull_request run adds two skipped entries).

Skip duplicate runs

Same rule as in Haxe's CI: jobs skip the pull_request event when the head branch belongs to this repository, since the push run 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 on master, so every merge gets a full run).

The seven near-identical platform jobs in main.yml are 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.yml now has four jobs per platform instead of twelve:

Job Contains
runtime tests haxe, std (+ mariadb), native, regression
tooling tests cffi, telemetry (debug + release), debugger, build tool
cppia host and client built once, then run with interp and jit
haxe test suite unchanged

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 -x to 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). The sep input is no longer needed and has been removed.

Trade-offs

  • push runs test the branch head rather than its merge with master.
  • The grouped jobs take longer individually, but should still finish before the test suite job does.

A possible follow-up is setting HXCPP_COMPILE_CACHE per job so tests within a grouped job can share compiled runtime objects.

🤖 Generated with Claude Code

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>
@Simn

Simn commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

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 tobil4sk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Comment thread .github/workflows/test.yml Resolved
Comment thread .github/workflows/test.yml Resolved
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>
@Simn

Simn commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Thanks! Moved the regression test into the runtime tests job in d44fad5.

🤖 Generated with Claude Code

@Simn

Simn commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

I'll merge this once it's green because it looks good to me now. We can always fine-tune it later.

@Simn

Simn commented Oct 30, 2026

Copy link
Copy Markdown
Member Author

Eh, it's green enough. Mac runners have been busy all morning.

@Simn
Simn merged commit d3d6dea into master Oct 30, 2026
63 checks passed
@Simn
Simn deleted the ci-reduce-jobs branch October 30, 2026 10:06
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.

2 participants