Skip to content

Add build pipeline - #92

Merged
techomancer merged 3 commits into
techomancer:mainfrom
danifunker:add-build-pipeline
Aug 31, 2026
Merged

Add build pipeline#92
techomancer merged 3 commits into
techomancer:mainfrom
danifunker:add-build-pipeline

Conversation

@danifunker

Copy link
Copy Markdown
Collaborator
  • Fixes riscv64, broken on main since 73a10e2 (Cargo.toml). windows-sys sat in the plain [dependencies] table instead of the [target.'cfg(target_os = "windows")'.dependencies] section nine lines below, so Cargo built it for every target. It only defines its structs for architectures Windows runs on, so riscv64gc hit error[E0425]: cannot find type MEMORY_BASIC_INFORMATION once Win32_System_Memory was enabled. Both consumers were already #[cfg(windows)]-gated; Windows keeps the direct edge and all five Win32_* features, every other target drops the crate it was never using.
  • Updates rules/build/dependency-upgrade-gotchas.md — records the above, and corrects a now-stale paragraph that described the dependency as deliberately un-gated.
  • Adds release.yml — manual dispatch, ten build legs (Windows x64/arm64, macOS x64/arm64, Linux AppImage + deb/rpm/pkg x64/arm64, riscv64 cross). Publishing is opt-in per run: unchecked (default) builds everything and verifies the release contents but creates no tag and no release; checked tags v at the built commit and publishes. So it doubles as a full-matrix build check that cannot accidentally ship.
  • Adds appstore.yml — manual dispatch, unchanged from the fork. Opens with a credential preflight (imports both .p12s, checks each identity has its private key, validates the provisioning profile against the signing cert, mints a live App Store Connect JWT) so bad credentials fail in ~1 minute rather than after a full build.
  • Build legs check out the dispatched branch, not a hardcoded main. Every checkout fell back to 'main', so dispatching from a topic branch ran that branch's YAML against main's source — which made a landed fix look like it had not worked. Now falls back to github.ref_name; build_branch still overrides.

Secrets: release.yml needs the five MACOS_* ones (optional — without them macOS is ad-hoc signed and not notarized, other platforms unaffected); appstore.yml needs the eight APP_STORE_* ones (required, and the App Store Connect key must have the App Manager role — Developer authenticates but 403s on upload). All are already set on this repo.

Verified in my fork, there may be bugs/quirks related to secrets which I will sort out (shouldn't need any other code changes, just secrets).

danifunker and others added 3 commits August 31, 2026 07:39
Moves the two pipelines that lived on the fork into this repo, and gates
publishing behind an explicit opt-in.

release.yml is manual-dispatch with a `publish_release` checkbox:

  unchecked (default) — build every artifact on every platform, verify the
    release contents, render the downloads table into the run summary, and
    stop. No tag, no release.
  checked — the same build, then tag v<YYYY-MM-DD-HH-MM> (UTC) at the built
    commit and publish the release with the same body/layout as before.

The version job now also emits the tag and the resolved commit SHA, so a
published tag lands on what was actually built rather than on the ref the
run was dispatched from (they differ whenever build_branch is set). A
pre-flight check refuses to publish onto an existing tag instead of letting
the release action move it.

appstore.yml is unchanged and stays manual-only. sync-upstream.yml is
deliberately not brought over — it syncs a fork from upstream and has no
meaning here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vw17TVNLNCrcnmYUngVPkq
The riscv64 cross leg has failed since 73a10e2 with

  error[E0425]: cannot find type `MEMORY_BASIC_INFORMATION` in this scope
    --> windows-sys-0.61.2/src/Windows/Win32/System/Memory/mod.rs:109

windows-sys was declared in the plain [dependencies] table, so it was built
for every target. Its link! declarations expand anywhere, but the structs they
name are defined only for the architectures Windows runs on. riscv64gc matches
none of them, so once 73a10e2 enabled Win32_System_Memory, VirtualQuery and
VirtualQueryEx referenced a type that never got defined. x64/arm64 Linux and
macOS were unaffected only because their arch happens to be one Windows
supports, and they compiled the crate as dead weight.

Move it to [target.'cfg(target_os = "windows")'.dependencies]. Both consumers
are already gated (thread_affinity.rs behind #[cfg(windows)], ppmem's
map_windows.rs via #[cfg_attr(windows, path = ...)]), so nothing off-Windows
referenced it. The Windows graph keeps the direct edge and all five Win32_*
features; every non-Windows target drops the crate entirely.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vw17TVNLNCrcnmYUngVPkq
Every checkout step fell back to a hardcoded 'main' when build_branch was
empty, so dispatching the workflow from a topic branch ran that branch's YAML
against main's source. Testing a source fix on a branch silently built the
unfixed code, and the run looked like the fix had not worked.

Fall back to github.ref_name instead: dispatching from a topic branch builds
that branch, dispatching from main builds main, and build_branch still
overrides both. Also normalises the remaining `github.event.inputs.*` reads to
`inputs.*`.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Vw17TVNLNCrcnmYUngVPkq
@techomancer
techomancer merged commit 49d77d4 into techomancer:main Aug 31, 2026
1 check 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