Skip to content

Add Windows x86_64 Wheels to Release Workflow#109

Merged
posborne merged 9 commits into
mainfrom
posborne/windows-wheels
Jun 2, 2026
Merged

Add Windows x86_64 Wheels to Release Workflow#109
posborne merged 9 commits into
mainfrom
posborne/windows-wheels

Conversation

@posborne
Copy link
Copy Markdown
Member

@posborne posborne commented Jun 2, 2026

Building CPython for WASI presents a bunch of issues; I ended up following what is done by componentize-py by building CPython target WASI once on Linux and doing the delicate dance to reuse that artifact when rounding out the platform-specific wheel.

I was hoping this might reduce CI times as we avoid having to build CPython more than once; while that is the case, we end up having to rebuild chunks of the dependency graph in both stages, so CI time is increased. Eventually, I think upstream componentize-py might look to reuse prebuilt CPython releases for WASI, but that will require some more work and belongs in upstream.

https://github.com/fastly/compute-sdk-python/actions/runs/26839132628 shows the successful run. I tweaked the triggers on the workflow a bit to make it easier to do manual dispatches. CI will also run the release workflow on PRs that modify the release.yml file as well (but only on tag will we create a pre-release).

posborne added 8 commits June 2, 2026 11:27
Following what is done by componentize-py more closely,
build and store the artifact for our source-built CPython
targeting WASI once on linux.  Then place this CPython
in a place it will be picked up for platform-specific
wheel builds.

This should reduce the total overall CI work, reduce complexity,
and enable us to support Windows where there are issues with
tooling to build CPythong from source for WASI (that we would
rather not have to try to solve).

It _might_ be possible to reduce CI times further in the future
by caching this CPython build, but for now keeping it simple.
`cargo check` will run build.rs (which builds CPython) but
hopefully will reduce other compilation work that we
subsequently discard.
We don't need these and they cause problems on Windows; just
exclude them when creating the archive.
We had diverging ways of doing this path lookup, converting the
path to posix form, etc.  There was also a bug with the path
lookup in the manylinux container.

Make this consistent by having extracting the functionality
to a small helper script based around cargo metadata's json
output.
@posborne posborne requested a review from erikrose June 2, 2026 18:59
@erikrose erikrose changed the title Add Windows x86_64 Wheels to Relase Workflow Add Windows x86_64 Wheels to Release Workflow Jun 2, 2026
Copy link
Copy Markdown
Member

@erikrose erikrose left a comment

Choose a reason for hiding this comment

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

Hooray! Want to push a 0.1.2 pretty soon? I hear some people use Windows.

Comment thread .github/workflows/release.yml Outdated
.github/scripts/setup-nightly.sh ${{ env.RUST_NIGHTLY }}
rustup target add wasm32-unknown-unknown
cargo fetch
MANIFEST_DIR=$(cargo metadata --format-version=1 | jq -r '.packages[] | select(.name == "componentize-py") | .manifest_path' | xargs dirname)
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.

Took me a minute to guess what's going on here. Are you sticking the previously built CPython-for-wasi into the build dir so the Linux build doesn't rebuild it? (Is it smart/dumb enough not to rebuild it?)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yep, that's what's going on. Primarily motivated by Windows not being able to build CPython at all presently (but should be reused for all of the second-pass builds). This is the model used by componentize-py to get windows working and what I ended up adopting here.

@posborne posborne merged commit dfa0d56 into main Jun 2, 2026
11 checks passed
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