Skip to content

ci: build the release matrix from the frameworks input - #917

Open
yinlin09 wants to merge 9 commits into
mainfrom
yinlin/release-workflow-matrix
Open

yinlin09 wants to merge 9 commits into
mainfrom
yinlin/release-workflow-matrix

Conversation

@yinlin09

@yinlin09 yinlin09 commented Sep 13, 2026

Copy link
Copy Markdown
Collaborator

Makes the nightly and release workflows actually run, and makes the scheduled nightly publish to PyPI.

  • The release workflow's build job filtered its matrix with a job-level condition that referenced the matrix context, which GitHub does not allow there, so the workflow failed to parse. The verify job now turns the frameworks input into the list of wheels to build (both on a tag push, the named ones on a dispatch) and the build job takes its matrix from that list.
  • The wheel build script copied the wheel out of a hard-coded path in the Bazel output base, which is empty on the runners after a successful build. It now reads the wheel through the bazel-bin symlink build.sh leaves in the workspace.
  • The exit-gate publish job moves into a reusable workflow, publish_pypi.yml. The scheduled nightly run calls it too and publishes its .dev wheels to PyPI as pre-releases, skipping any wheel above the PyPI file limit; a release still refuses to publish half of itself. The RAIDEN_NIGHTLY_TORCH_ABIS repository variable keeps the scheduled torch wheel single-ABI while the limit is 100 MB.

Validation: actionlint accepts the three workflows and reproduces GitHub's error on the previous form; the build-script change passes a container build locally; the wheel selection and manifest steps run against fake 61 MB and 104 MB wheels, keeping the small one and listing the large one as skipped. End-to-end runs from this branch are linked in the comments: a torch-only release dry run, and a nightly run that uploads to the registry and publishes to PyPI.

@yinlin09
yinlin09 force-pushed the yinlin/release-workflow-matrix branch 2 times, most recently from 624348d to b537ac3 Compare September 13, 2026 09:32
Nightly wheels only reached the Artifact Registry; PyPI got releases and
manual publishes. The scheduled nightly run now also publishes its .dev
wheels to PyPI as pre-releases, and the release workflow shares the same
exit-gate publish job (publish_pypi.yml). A nightly skips wheels above the
PyPI file limit instead of failing, so the registry keeps every wheel and
PyPI gets the ones that fit; a release still refuses to publish half of
itself. The RAIDEN_NIGHTLY_TORCH_ABIS repository variable keeps the
scheduled torch wheel single-ABI while the limit is 100 MB.

Validated: actionlint accepts the three workflows; the wheel selection and
manifest steps run against fake 61 MB and 104 MB wheels, keeping the small
one and listing the large one as skipped.
Installing the pinned torch_tpu wheel from the torch_tpu registry needs a
Google Cloud identity; without one pip stopped at a username prompt and the
build job hung until its five-hour timeout. The script now writes the
environment's access token into a netrc entry for the registry host, from
Python so the token stays out of the shell trace, and runs pip with
--no-input so a missing credential fails immediately.
The virtual registry is not readable by the build's identity, and pip's
quiet mode hid the reason behind 'no matching distribution'. The pinned
torch_tpu wheel now comes from the testing registry the nightlies are
published to, and pip's normal output is kept so an access failure shows
as such.
pip reports a refused index as 'no matching distribution', which hides the
cause. The script now requests the index page with the same token first and
fails with the HTTP status and the identity it used when the read is
refused.
The testing registry refuses the same identity, so the switch bought
nothing; the virtual registry is the index torch_tpu documents for users
and the one the build identity is being granted.
@yinlin09
yinlin09 force-pushed the yinlin/release-workflow-matrix branch from 5165ef6 to 7c8b963 Compare September 14, 2026 17:58
The release workflow's build job filtered its matrix with a job-level
condition that referenced the matrix context, which GitHub does not allow
there. The workflow failed to parse, so neither a tag push nor a manual
dispatch could run it.

The verify job now turns the frameworks input into the list of wheels to
build (both on a tag push, the named ones on a dispatch) and the build job
takes its matrix from that list. Unknown names fail the run up front.

Validated: actionlint accepts the workflow; the previous form fails with
the same error GitHub reported.
The wheel build script copied the wheel out of a path it composed from the
Bazel output base. build.sh already reads its own outputs through the
bazel-bin symlink it leaves in the workspace, so the script now uses the
same path; there is one place that knows where Bazel put the wheel.
Container jobs on the runner fleet execute run steps with sh unless a
shell is declared, so the bash conditional that applies the torch release
list was skipped and every torch wheel came out multi-ABI. The build steps
now declare bash. Artifact Registry rejects twine's --skip-existing, which
failed the registry upload; the flag is gone from both upload steps, and a
re-run of an already uploaded version now fails on the duplicate instead.
The jax wheel's three extensions each embed a static copy of the runtime,
and with default symbol visibility their export tables alone push the
wheel to 104 MB, above PyPI's 100 MB file limit, so the nightly never
published it. Compiling the jax wheel with hidden visibility keeps only
the module entry points exported and brings the wheel to 31 MB.

Validated: container build of the jax wheel is 31.1 MB with the three
modules at 26 to 29 MB each, each exporting its PyInit entry point; the
jax test suite ran identically on TPU with and without the flag.
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