Skip to content

ci: build the desktop shell on macOS as well as Linux - #12

Merged
hsusul merged 3 commits into
mainfrom
ci/macos-shell-lane
Aug 22, 2026
Merged

ci: build the desktop shell on macOS as well as Linux#12
hsusul merged 3 commits into
mainfrom
ci/macos-shell-lane

Conversation

@hsusul

@hsusul hsusul commented Aug 22, 2026

Copy link
Copy Markdown
Owner

Stacked on #9#11 — merge those first.

Problem

release.yml builds an Apple Silicon .dmg and nothing else. macOS is the only platform Lore ships. But the desktop-shell CI job ran on ubuntu-latest only, so the shipping target was first compiled at tag time — the worst possible moment to find a macOS-specific break, because the release is already being cut.

Change

desktop-shell becomes a matrix over ubuntu-latest and macos-latest.

  • fail-fast: false — a macOS-only failure shouldn't be hidden behind the faster Linux job finishing first.
  • The apt-get step is gated on runner.os == 'Linux'. macOS needs no equivalent: WebKit ships with the OS and the Xcode command-line tools are preinstalled on the runner image.

Every other step is platform-independent and unchanged. Linux stays in the matrix — it's the cheap lane, and it keeps the non-macOS webview path honest for the eventual Windows/Linux builds on the V1 roadmap.

Verification

I ran the macOS lane's exact steps on an Apple Silicon machine rather than guessing they'd work:

Step Result
npm ci && npm run build pass — 194 kB JS, 25 kB CSS
cargo clippy -p lore-app --all-targets -- -D warnings pass
cargo build --locked -p lore-app pass
cargo test -p lore-app --test no_egress pass
Artifact check target/debug/Lore — Mach-O 64-bit executable arm64

Scope limit

This covers compilation, not bundling. tauri build (the .app/.dmg bundle, release mode) is still only exercised on a tag. I left it out of per-PR CI deliberately — it's a release-mode build on every pull request, which is a large cost for a path that changes rarely.

Worth knowing: release.yml already has workflow_dispatch, so the full bundle can be built on demand from the Actions tab without cutting a release. That's the cheap way to close the remaining gap before shipping.

hsusul added 3 commits August 22, 2026 16:42
`cargo fmt --all -- --check` and `cargo clippy -D warnings` both failed on
main under rustc 1.97.1. No source change caused this: `useless_concat` and
`unneeded_struct_pattern` are recent clippy lints, and CI pins nothing.

Three clippy fixes, all in test code and all semantics-preserving:
  - codex.rs: two single-argument `concat!(..)` calls collapsed to plain
    string literals (clippy::useless_concat).
  - ingest_file.rs: `IngestOutcome::Skipped { .. }` -> `IngestOutcome::Skipped`;
    it is a unit variant (clippy::unneeded_struct_pattern).

Then `cargo fmt --all`, which rewrapped 18 over-width assertion lines across
the two adapters, adapters/common.rs, and four integration tests. Mechanical
line-wrapping at the 100-column limit only.

No production code touched. Verified green: fmt, clippy (lore-core/lore-ipc
and lore-app), cargo test --locked --all-targets (346 pass / 4 ignored),
no_network_in_archive, no_egress, egress-check.sh, IPC bindings in sync,
npm lint/typecheck/test (148 pass).

Follow-up: pinning the toolchain so this cannot recur.
CI ran `dtolnay/rust-toolchain@stable` with `cargo clippy -- -D warnings`, so
any new lint in a stable release broke the build on a commit that changed
nothing. That is not hypothetical: it is exactly how main went red under
1.97.1 (previous commit). Pinning turns a toolchain upgrade into an explicit,
reviewable change.

  - rust-toolchain.toml pins 1.97.1 with rustfmt/clippy and the minimal
    profile. rustup honors it for every cargo invocation, locally and in CI.
  - Both workflows now reference dtolnay/rust-toolchain@1.97.1 rather than
    @stable, so the runner pre-installs the same compiler rustup would fetch
    (the action does not read rust-toolchain.toml — verified against its
    README; @1.97.1 is a valid ref).
  - scripts/toolchain-pin-check.sh fails if the toml channel, the workflow
    action refs, and the active rustc are not all the same version. Wired in
    as the first step of the rust-core job, ahead of fmt/clippy. Verified it
    passes when aligned and fails when the toml and workflows disagree.

This is not the MSRV. `rust-version = "1.90"` in Cargo.toml still declares the
minimum supported compiler; this pins the one we build and lint with.

Verified: pin check, fmt, clippy (both invocations), cargo test --locked
--all-targets (346 pass / 4 ignored), both workflow files parse as YAML.
macOS is the only platform we ship — release.yml builds an Apple Silicon .dmg
and nothing else — but the desktop-shell job ran on ubuntu-latest only. The
shipping target was therefore first compiled at tag time, which is the worst
moment to discover a macOS-specific break: the release is already cut.

desktop-shell becomes a matrix over ubuntu-latest and macos-latest:
  - fail-fast: false, so a macOS-only failure is not hidden behind the faster
    Linux job.
  - The apt-get step is gated on `runner.os == 'Linux'`. macOS needs no
    equivalent — WebKit ships with the OS and the Xcode command-line tools are
    preinstalled on the runner image.

Every other step is platform-independent and unchanged.

Verified by running the macOS lane's exact steps on an Apple Silicon machine:
npm ci/build, `cargo clippy -p lore-app --all-targets -- -D warnings`,
`cargo build --locked -p lore-app`, and `cargo test -p lore-app --test
no_egress` all pass, producing target/debug/Lore as a Mach-O 64-bit arm64
executable.

This covers compilation, not bundling. `tauri build` (.app/.dmg, ~release-mode)
is still only exercised on a tag — though release.yml already has
workflow_dispatch, so it can be run on demand without cutting a release.
@hsusul
hsusul force-pushed the ci/macos-shell-lane branch 2 times, most recently from f0ef10c to 10cd462 Compare August 22, 2026 21:56
@hsusul
hsusul merged commit 1c1d1a1 into main Aug 22, 2026
4 checks passed
@hsusul
hsusul deleted the ci/macos-shell-lane branch August 22, 2026 22:09
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