Skip to content

ci: share one platform matrix and deploy snapshots once - #306

Merged
devopvoid merged 3 commits into
ci/pipeline-cleanupfrom
ci/pipeline-consolidate
Sep 29, 2026
Merged

devopvoid merged 3 commits into
ci/pipeline-cleanupfrom
ci/pipeline-consolidate

Conversation

@devopvoid

@devopvoid devopvoid commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

Stacked on #304, which is stacked on #302. It targets #304's branch and should be retargeted to main once both merge.

Why

The seven platform builds were defined twice, in build.yml and in release.yml, and ran through four composite actions that were copies of each other: build and release, each with a macOS Intel variant. A cache key or runner change had to be made in up to six places. On main, each of the seven jobs also deployed the whole reactor as a snapshot, racing on the snapshot metadata.

Changes

  • platforms.yml (new, reusable) holds the only 7-platform matrix. build.yml calls it for pushes and PRs. release.yml calls it with the tag it releases.
  • test-natives tests all 7 platforms, each on a runner of its own OS and architecture, against the natives the build job uploaded. Those are exactly the ones that get published. The macOS Intel natives now run on macos-15-intel, a real Intel runner, instead of under Rosetta on the Apple Silicon runner that cross compiles them. Before, only the 3 ARM platforms were tested this way, and the other 4 ran their tests inside the build job.
  • actions/build is now the only build action.
    • The Maven profile is a matrix column, replacing the if/elif chains and the separate macOS actions.
    • It only builds. It uploads natives-<platform> and natives-media-<platform> on every platform, runs no tests, and no longer deploys.
    • actions/release, actions/build-macos-x86_64 and actions/release-macos-x86_64 are deleted.
  • actions/publish (new) downloads the natives of all platforms, checks that all 7 are there, installs the host jar and runs mvn deploy -pl .,webrtc,webrtc-java-media -Dnatives.dir=…. Both publishing jobs use it.
  • deploy-snapshot (new, in build.yml) makes one snapshot deployment from main with every platform's natives attached. It runs after every platform has been built and tested, the same way publish-central publishes a release. It fails if main isn't at a SNAPSHOT version.

Behavior changes

  • Releases now test every platform on its own hardware before publishing. Before, release natives for the ARM platforms were never tested on ARM hardware.
  • The x64 tests start after all 7 builds finish, instead of inside their own build job, so a run takes a few minutes longer.
  • macos-15-intel is GitHub's last Intel macOS image, so that lane will need a new home when GitHub retires it.
  • Snapshots are deployed only from main. A manually started Build of another branch no longer deploys.
  • Check names change, for example platforms / build (linux_arm). main has no required checks, so nothing breaks.

Testing

  • The workflows pass actionlint 1.7.12, which also checks the inputs passed to the reusable workflow. All YAML parses.
  • The first commit passed a dispatched Build (36489940026) and dry-run Release (36489944490). A second pair, dispatched after the test change, covers the 7 test lanes and the release publish path. deploy-snapshot only runs on main, so it's first exercised by the first push after merge.

The seven platform builds were defined twice, in build.yml and in
release.yml, and ran through four composite actions that were copies of
each other: build and release, each with a macOS Intel variant. A cache
key or runner change had to be made in up to six places.

Move the matrix into the reusable platforms.yml, which both workflows
call, and fold the four actions into one build action. The macOS Intel
cross build becomes a matrix entry with its own JDK architectures, and the
if/elif chains that mapped platforms to profiles become a matrix column.
Releases now also run the ARM tests in test-natives before publishing.

Every platform uploads its natives, and the build no longer deploys. On
main, one deploy-snapshot job attaches the natives of all platforms to a
single deployment once every platform has been built and tested, the way
release.yml publishes a release. The seven jobs that each deployed the
whole reactor raced on the snapshot metadata. Snapshots are deployed only
from main, no longer from a manually dispatched build of another branch.

The download, check and deploy steps shared by both publishing jobs move
into a publish action.
test-natives tested only the three ARM platforms, the ones cross compiled
for a runner that could not load them. The other four ran their tests in
the build job, and the macOS Intel natives only under Rosetta, on the Apple
Silicon runner that cross compiled them.

Test all seven platforms in test-natives instead, each on a runner of its
own OS and architecture and against the natives the build job uploaded,
which are the ones that get published. The macOS Intel natives are now
tested on an Intel runner. The build job only builds, so it no longer sets
up a second JDK or runs the tests.
The macOS test lanes installed the natives as webrtc-java::<classifier>,
without a version, and then could not resolve them. The version came from
sed's 0,/re/ address, which only GNU sed knows; the Linux and Windows
runners have GNU sed, macOS has BSD sed. Take the first <version> of the
root pom with plain sed and head instead, and fail right there when it
comes out empty.

Also drop the step that downloaded Maven when a runner had none. Every
runner test-natives uses ships with Maven, the ARM partner images
included, and none of them took that branch.
@devopvoid
devopvoid added this pull request to stack #305 September 29, 2026 10:42
Comment thread .github/workflows/platforms.yml Dismissed
Comment thread .github/workflows/platforms.yml Dismissed
Comment thread .github/workflows/platforms.yml Dismissed
Comment thread .github/workflows/platforms.yml Dismissed
Comment thread .github/workflows/platforms.yml Dismissed
@devopvoid
devopvoid merged commit 0387aa9 into main Sep 29, 2026
54 checks passed
@devopvoid
devopvoid deleted the ci/pipeline-consolidate branch September 29, 2026 15:43
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