Skip to content

Build twcore for Windows, and let a release be rehearsed - #124

Merged
fylorn merged 1 commit into
mainfrom
feat/windows-release
Sep 23, 2026
Merged

fylorn merged 1 commit into
mainfrom
feat/windows-release

Conversation

@fylorn

@fylorn fylorn commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

The last piece of phase 1: the release pipeline learns to produce Windows binaries.

Two architectures, both shipped. x64 builds natively; arm64 cross-compiles on the same x64 runner, because standing up an arm64 runner to produce one binary is not worth it when the MSVC ARM64 toolchain is already on the image.

The rehearsal mode is the point of this PR

Whether that cross-compile actually works is a question with only one honest way to ask it — and a tag is far too expensive a way to ask. Once a tag is pushed and the pipeline turns out to be wrong, the tag has to be withdrawn. The lite repo's release workflow carries a comment about exactly that pain, from a real occasion.

So the workflow can now be triggered by hand. It builds and self-checks exactly as it would for a release, and publishes nothing. Every publishing step is gated on github.ref_type == 'tag', and the version-against-tag comparison prints the version instead when there is no tag to compare against.

I dispatched it on this branch before opening this PR: https://github.com/ThinkWatchProject/ThinkWatch-Core/actions/runs/35826585424. That run is what answers the arm64 question, and it answers it without spending a tag.

Checking a binary that cannot be run

The arm64 binary cannot run on the runner that built it, so the check is that it is arm64 — the machine field out of the PE header, which is what file | grep arm64 does on the macOS side.

That is not a formality. Pointing a cross-compile at the wrong target produces an x64 binary sitting in a directory named aarch64-pc-windows-msvc, and nothing downstream would notice: the file exists, the size looks plausible, it uploads fine, and the first person to find out is a user on an ARM laptop.

Small things

The checksum files are written in the same two-column, two-space shape as the macOS ones, so whoever downloads them verifies with the same shasum -c command rather than a different one per platform.

Still to do, deliberately not here

scripts/fetch-core.sh on the lite side still hardcodes twcore-aarch64-apple-darwin as the asset name. That belongs with the desktop work, once there is a Windows release to fetch.

🤖 Generated with Claude Code

@fylorn

fylorn commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Rehearsal run is green: https://github.com/ThinkWatchProject/ThinkWatch-Core/actions/runs/35826585424

The arm64 cross-compile works on the x64 runner, and both binaries are the architecture they claim to be — 0x8664 and 0xAA64 straight out of the PE header. The x64 one runs and reports 0.29.0. Checksums came out in the same two-column shape as the macOS ones.

That is the question this PR existed to answer, answered without spending a tag.

@fylorn
fylorn force-pushed the feat/windows-release branch from 27b883e to b70b58f Compare September 23, 2026 06:39
Two architectures, both shipped. x64 builds natively; arm64 cross-compiles
on the same x64 runner, because standing up an arm64 runner to produce one
binary is not worth it when the MSVC ARM64 toolchain is already on the
image.

Whether that cross-compile actually works is a question with only one
honest way to ask it, and a tag is far too expensive a way: once a tag is
pushed and the pipeline turns out to be wrong, the tag has to be withdrawn.
So the workflow can now be triggered by hand. It builds and self-checks
exactly as it would for a release, and publishes nothing.

The arm64 binary cannot run on the runner that built it, so the check is
that it is arm64 at all -- the machine field out of the PE header, which
is what `file | grep arm64` does on the macOS side. That is not a
formality: pointing a cross-compile at the wrong target produces an x64
binary in a directory named aarch64, and nothing downstream would notice.

The checksum files are written in the same two-column, two-space shape as
the macOS ones, so whoever downloads them verifies with the same command.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@fylorn
fylorn force-pushed the feat/windows-release branch from b70b58f to 23079c5 Compare September 23, 2026 07:59
@fylorn
fylorn merged commit 8462295 into main Sep 23, 2026
2 checks passed
@fylorn
fylorn deleted the feat/windows-release branch September 23, 2026 08:07
@fylorn fylorn mentioned this pull request Sep 23, 2026
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