Repository navigation
Build twcore for Windows, and let a release be rehearsed - #124
Merged
Merged
Conversation
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 — That is the question this PR existed to answer, answered without spending a tag. |
fylorn
force-pushed
the
feat/windows-release
branch
from
September 23, 2026 06:39
27b883e to
b70b58f
Compare
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
force-pushed
the
feat/windows-release
branch
from
September 23, 2026 07:59
b70b58f to
23079c5
Compare
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 arm64does 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 -ccommand rather than a different one per platform.Still to do, deliberately not here
scripts/fetch-core.shon the lite side still hardcodestwcore-aarch64-apple-darwinas the asset name. That belongs with the desktop work, once there is a Windows release to fetch.🤖 Generated with Claude Code