Skip to content

feat: add Intel Mac (x86_64) DMG build support - #24

Open
AzimovS wants to merge 4 commits into
mainfrom
feat/intel-mac-dmg-support
Open

feat: add Intel Mac (x86_64) DMG build support#24
AzimovS wants to merge 4 commits into
mainfrom
feat/intel-mac-dmg-support

Conversation

@AzimovS

@AzimovS AzimovS commented Mar 31, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds separate Intel Mac (x86_64-apple-darwin) DMG build to the CI/CD release pipeline
  • Splits whisper-rs features by architecture: Metal+CoreML for Apple Silicon, CPU-only for Intel
  • Adds latest.json merge step so both macOS architectures appear in the auto-updater manifest
  • Updates all three macOS-related workflows (build.yml, release.yml, build-macos.yml)

Test plan

  • Run build-macos.yml with target x86_64-apple-darwin, signing ON → verify signed DMG is produced
  • Send Intel DMG to customer for testing (install, launch, record, transcribe)
  • If customer confirms it works, bump version and run release.yml
  • Verify latest.json contains both darwin-aarch64 and darwin-x86_64

Local verification done

  • Full release build cross-compiles (cargo build --release --target x86_64-apple-darwin) ✅
  • Binary confirmed x86_64 via file/lipo
  • whisper-rs features: raw-api only on x86_64, raw-api+metal+coreml on aarch64 ✅
  • build.rs reports "CPU-only mode" for Intel ✅
  • YAML syntax validated ✅
  • aarch64 build unaffected (no regression) ✅

🤖 Generated with Claude Code

AzimovS and others added 2 commits March 31, 2026 15:22
- Split whisper-rs macOS deps by architecture: Metal+CoreML for Apple
  Silicon, CPU-only for Intel (Metal Family 7 unsupported by whisper.cpp)
- Fix whisper_engine.rs GPU detection to return false on x86_64
- Fix build.rs to report correct GPU status per architecture
- Update lib.rs debug updater check for darwin-x86_64
- Add x86_64-apple-darwin matrix entry to release.yml
- Add latest.json merge step to prevent overwrite race between builds
- Update build.yml: use matrix target instead of hardcoded aarch64,
  add target to FFmpeg cache key, set CMAKE_OSX_ARCHITECTURES for
  cross-compilation
- Update build-macos.yml with target architecture selector input

Locally verified: full release build cross-compiles successfully,
binary confirmed x86_64 via file/lipo, correct whisper-rs features
resolved per architecture, YAML syntax validated.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
llama-helper's llama.cpp doesn't cross-compile from ARM64 to x86_64
without additional cmake configuration. Since the sidecar is already
skipped for signed macOS builds (not needed yet), apply the same
treatment to Intel builds: skip sidecar build and strip externalBin
from tauri.conf.json.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@AzimovS

AzimovS commented Mar 31, 2026

Copy link
Copy Markdown
Owner Author

Code review

Found 3 issues:

  1. Regex patterns in merge-update-manifest will never match actual tauri-action filenames. The patterns expect filenames containing aarch64-apple-darwin or x86_64-apple-darwin, but tauri-action produces names like meetily_aarch64.app.tar.gz (short arch identifier, no target triple). Verified against the v0.1.14 release assets. The merged latest.json will be missing all macOS (and likely Linux) platform entries, breaking auto-updates.

const repo = "'"${{ github.repository }}"'";
const baseUrl = `https://github/${repo}/releases/download/v${version}`;
// Map platform patterns to Tauri platform keys
const platformMap = [
{ pattern: /aarch64-apple-darwin.*\.app\.tar\.gz$/, key: "darwin-aarch64" },

  1. Signatures are never populated in the merged latest.json. The script finds .sig asset filenames but never downloads or reads their contents. The signature field is left as "" for any platform not already present in the partial latest.json. Tauri's auto-updater requires a non-empty signature to validate downloads -- empty signatures will cause update verification failures. The code comment // Signature will be downloaded separately if needed acknowledges this but the download is never implemented.

{ pattern: /x86_64-apple-darwin.*\.app\.tar\.gz$/, key: "darwin-x86_64" },
{ pattern: /x64.*\.nsis\.zip$|\.exe$/, key: "windows-x86_64" },
{ pattern: /amd64\.AppImage\.tar\.gz$/, key: "linux-x86_64" },
];
for (const asset of assets) {
for (const { pattern, key } of platformMap) {
if (pattern.test(asset)) {
const sigAsset = assets.find(a => a === asset + ".sig");
let signature = "";
// Signature will be downloaded separately if needed
if (manifest.platforms[key]) {
signature = manifest.platforms[key].signature || "";
}
manifest.platforms[key] = {
signature,
url: `https://github.com/${repo}/releases/download/v${version}/${asset}`

  1. Dead baseUrl variable with typo. baseUrl is defined as `https://github/${repo}/...` (missing .com) but is never referenced -- the actual URL is built inline with the correct domain. Should be removed to avoid confusion.

const baseUrl = `https://github/${repo}/releases/download/v${version}`;

🤖 Generated with Claude Code

- If this code review was useful, please react with 👍. Otherwise, react with 👎.

AzimovS and others added 2 commits March 31, 2026 16:21
…pulate signatures

Three bugs fixed in the latest.json merge script:

1. Regex patterns now match actual tauri-action filenames
   (e.g. meetily_aarch64.app.tar.gz, not aarch64-apple-darwin...)
2. .sig files are downloaded and read into the signature field
   (previously found but never read, leaving signatures empty)
3. Removed dead baseUrl variable with typo

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Pass variables via process.env and files instead of shell
  interpolation into inline JS (eliminates injection vector)
- Make empty signature fatal (exit 1) instead of warning
- Validate all 4 expected platforms exist in merged latest.json
- Remove explicit gh api DELETE before --clobber upload
  (--clobber handles replacement atomically, avoids availability gap)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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