Skip to content

CI: test-python-examples builds the JVM wheel once for each platform - #99

Merged
tae898 merged 1 commit into
mainfrom
examples-build-once
Oct 26, 2026
Merged

tae898 merged 1 commit into
mainfrom
examples-build-once

Conversation

@tae898

@tae898 tae898 commented Oct 26, 2026

Copy link
Copy Markdown
Collaborator

Since #92 the JVM wheel is py3-none-<platform>, the same file for every Python, and test-jvm.yml builds it once for each platform. test-python-examples.yml still built it in each of its legs. This PR gives it the same build job and a per-leg download.

Build count

Event Wheel builds before Wheel builds after
push to main, nightly, dispatch, release 16 (all py3-none, 12 of them identical repeats) 4 (one for each platform)
pull request 4 4 (one new Build wheel for examples (<platform>) job in front of each leg)

On a pull request the number of builds does not change, because the examples already run one Python for each platform there. What changes on a pull request is that the build moves into its own job, so there are 4 more jobs; each leg no longer sets up Java or Docker Buildx, downloads the jars or installs build tools. If the extra job per platform costs more queueing than it saves on pull requests, say so and I will build inline for that event.

What changes

  • download-jars also outputs wheel-matrix (scripts/select_matrix.py examples --event ... --wheels, which already existed).
  • New build job, one leg for each platform: it runs scripts/build.sh, which checks size, licences and tag, then scripts/verify_wheel_tag.py again (as in test-jvm.yml, so the tag shows in the log and summary), and uploads the wheel as examples-wheel-<platform> (1 day). The scripts are called, not copied.
  • Test Python Examples (<platform>, Python <version>) downloads the wheel of its platform and installs it. Leg names, the examples matrix (newest Python on each platform on a pull request, 16 legs on the other events) and the examples that run are unchanged.
  • Examples Test Summary also needs build.
  • The artifact is named examples-wheel-*, not wheel-*: the release calls both workflows in one run, release-jvm.yml downloads wheel-* and expects exactly four wheels, and two uploads of the same name would collide.
  • ci.adoc (one sentence, plus the check counts), the same counts in CLAUDE.md: a pull request runs 28 checks (was 24), the other events 40 (was 36). The counts come from the matrices, not from memory.
  • tests/test_select_matrix.py gets a test for the examples workflow like the one for test-jvm.yml: the --wheels matrix, no Python in the build job, build.sh only there, the wheel download in the leg, and no wheel-* artifact name.

Not done

test-jvm.yml and this workflow each build the same wheel for a commit, so a push to main builds 8 wheels, not 4. Sharing one build between the two workflows would need a reusable workflow or a combined one; I left that out of this change.

Checked

  • Workflow YAML parses; the job graph is download-jars -> build -> test-examples -> test-examples-summary.
  • python3 scripts/check_no_embedded_name.py --root .: ok.
  • tests/test_select_matrix.py, test_check_version.py, test_release_name_guards.py, test_select_native_matrix.py, test_no_embedded_name.py: 109 passed.
  • The workflow file itself changed, so this PR's own run exercises the new path on the four platforms.

🤖 Generated with Claude Code

Since #92 the JVM wheel is py3-none-<platform>, the same file for every Python, but each of the 16 legs of test-python-examples.yml still built it. On push to main, the nightly run, dispatch and the release that was 16 identical builds, 12 of them wasted on macOS, Windows and Linux runners the organisation shares with ArcadeData/arcadedb.

A `build` job now builds the wheel once for each platform (select_matrix.py examples --wheels, the shape of test-jvm.yml), checks the tag, and uploads it as examples-wheel-<platform> (not wheel-<platform>: release-jvm.yml publishes every wheel-* artifact, and the release runs both workflows in one run). Each Test Python Examples leg downloads the wheel of its platform and installs it; it no longer sets up Java or Docker Buildx, downloads the jars, or installs build tools. The leg names, the examples matrix (newest Python on each platform on a pull request, 16 legs otherwise) and the examples run are unchanged. build.sh still checks the size, licences and tag of the wheel; the tag check is repeated in the job as in test-jvm.yml.

Counts in ci.adoc and CLAUDE.md follow: a pull request runs 28 checks (was 24), the other events 40 (was 36). A new test pins the build job, the wheel download and the artifact name.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
@tae898
tae898 merged commit c07ee8f into main Oct 26, 2026
36 checks passed
@tae898
tae898 deleted the examples-build-once branch October 26, 2026 13:59
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.

1 participant