feat(ci): add Windows build alongside Linux #21
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/ci-build-windows"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adds a Windows build alongside the existing Linux build. Cross-compiles
yt.exeon the OpenSUSE runner via mingw, publishes the artifact to the existingyoutrack-cliGeneric Package slug. Naming follows thebuild-<artifact>.ymlprecedent set byda-os(which ships bothbuild-linux.ymlandbuild-windows.yml).New files
.forgejo/workflows/build-windows.yml: same shape asbuild-linux.yml(get-tags viaoci-build/get-tags.nu, latest +vX.Y.Zfan-out, DELETE-then-PUT against the Forgejo Generic Package API).oci-build/Dockerfile.windows: cross-compile chain matching da-os:ghcr.io/niceguyit/rust-builder-glibc-windowsbase image,gcc-mingw-w64-x86-64added at build time, Rust targetx86_64-pc-windows-gnu, dummy-source dependency prime under the target triple,exportstage emitting/yt.exe. SameYOUTRACK_CLI_GIT_HASH/YOUTRACK_CLI_BUILD_DATE/CARGO_BUILD_JOBSbuild args as the Linux Dockerfile sobuild.rsbakes identical metadata into the .exe.Artifact / download URL
yt-windows-x86_64.exe.https://dev.a8n.run/api/packages/<owner>/generic/youtrack-cli/<tag>/yt-windows-x86_64.exe. Parallel to the existing Linux URL.Drive-by tweak
Narrowed
build-linux.yml'spaths:filter fromoci-build/**to the specific files it actually depends on (Dockerfile+get-tags.nu), so aDockerfile.windowsedit no longer redundantly triggers a Linux rebuild and vice versa. Same kind of tightening on the newbuild-windows.yml.Out of scope (called out in CLAUDE.md)
The Linux Dockerfile is still bare
oci-build/Dockerfile. Withoci-build/Dockerfile.windowsnow alongside it, the bare name is asymmetric. Renaming it toDockerfile.linuxis left for a follow-up since it would also touchcompose.yml,justfile, andbuild-linux.yml. Easy to do separately if you want it.Verification
cargo fmt --checkclean.cargo clippy --all-targets -- -D warningsclean.cargo test --all-targets: 160 tests pass (no source changes).docker buildx build --target export --file oci-build/Dockerfile.windows .was NOT exercised locally: the host runner is the only place with therust-builder-glibc-windowsimage pinned, so the first CI run on this branch is the real smoke test.Test plan
mainafter merge: confirm Forgejo Actions UI shows both "Build Linux binary" and "Build Windows binary" running. Both should succeed.https://dev.a8n.run/api/packages/pandoras-box/generic/youtrack-cli/latest/yt-windows-x86_64.exeand download works.yt-windows-x86_64.exe --versionon a Windows host: should print the expected version + git hash + build date.release/v0.1.XPR: confirm both binaries land under the new version path alongsidelatest.