Skip to content

ci: use explicit arch paths for arm64/x86_64 binaries (skip release/ symlink) - #5165

Merged
m13v merged 1 commit into
mainfrom
fix/lipo-arch-paths
Feb 26, 2026
Merged

m13v merged 1 commit into
mainfrom
fix/lipo-arch-paths

Conversation

@m13v

@m13v m13v commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Root Cause

After xcrun swift build --arch arm64, Desktop/.build/release/Omi Computer does NOT exist (the release/ symlink is not updated by --arch on Codemagic M2). The cp failed silently. The echo showed a false-positive arm64 binary: arm64 because file /tmp/OmiComputer-arm64 (non-existent file) outputs the filepath which contains "arm64", and grep -oE matched it.

Build log evidence (build 69a065cb5f240a649219ee41):

  • Line 200: cp: Desktop/.build/release/Omi Computer: No such file or directory
  • Line 201: arm64 binary: arm64 ← false positive from filename match, not real binary

Fix

Use explicit arch-specific output paths throughout (never use release/ symlink):

  • arm64 binary: Desktop/.build/arm64-apple-macosx/release/$BINARY_NAME
  • x86_64 binary: Desktop/.build/x86_64-apple-macosx/release/$BINARY_NAME
  • Sparkle: x86_64 arch path, fallback to arm64
  • SWIFT_BUILD_DIR: x86_64 arch path, fallback to arm64

Both arch dirs confirmed to exist in build #11 (x86_64-apple-macosx/ created when --arch x86_64 runs after arm64).

🤖 Generated with Claude Code

…symlink)

## Root Cause

After `xcrun swift build --arch arm64`, `Desktop/.build/release/Omi Computer`
does NOT exist (the `release/` symlink is not updated). The `cp` fails silently,
leaving `/tmp/OmiComputer-arm64` empty. The echo showed a false-positive
`arm64 binary: arm64` because `file /tmp/OmiComputer-arm64` (non-existent)
outputs the filepath which contains "arm64", and grep -oE matched it.

## Fix

Use explicit arch-specific output paths throughout:
- arm64: `Desktop/.build/arm64-apple-macosx/release/$BINARY_NAME`
- x86_64: `Desktop/.build/x86_64-apple-macosx/release/$BINARY_NAME`
- Sparkle: x86_64 arch path, fallback to arm64
- SWIFT_BUILD_DIR: x86_64 arch path, fallback to arm64

The `release/` symlink is never used. Both arch dirs exist after build #11
confirmed that --arch x86_64 (run after arm64) creates x86_64-apple-macosx/.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@m13v
m13v force-pushed the fix/lipo-arch-paths branch from e501c5a to cb1eaf2 Compare February 26, 2026 16:03
@m13v
m13v merged commit efb0741 into main Feb 26, 2026
2 checks passed
@m13v
m13v deleted the fix/lipo-arch-paths branch February 26, 2026 16:03
@greptile-apps

greptile-apps Bot commented Feb 26, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Fixed a critical CI issue where the release/ symlink was not updated after architecture-specific Swift builds on Codemagic M2, causing silent cp failures and false-positive build success messages. The fix uses explicit architecture-specific paths (arm64-apple-macosx/release/ and x86_64-apple-macosx/release/) throughout the build pipeline, eliminating reliance on the unreliable symlink.

Key improvements:

  • Added robust error checking for arm64 binary with diagnostic output
  • Both binaries now validated before universal binary creation
  • Sparkle framework and resource bundles use x86_64 path with arm64 fallback
  • All paths properly quoted to handle "Omi Computer" binary name with space

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk - it fixes a critical build failure with a well-tested solution
  • The fix addresses a real, documented issue (silent cp failure) with the correct approach (explicit arch paths instead of symlinks). The implementation includes comprehensive error checking, proper quoting for paths with spaces, and sensible fallback logic. The changes follow Swift Package Manager's standard output structure and are confined to the problematic build workflow.
  • No files require special attention

Important Files Changed

Filename Overview
codemagic.yaml Fixed Swift build paths to use explicit arch-specific directories instead of unreliable release/ symlink, added error checking for arm64 binary, and implemented fallback logic for Sparkle and resource bundles

Last reviewed commit: cb1eaf2

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
…symlink) (BasedHardware#5165)

## Root Cause

After `xcrun swift build --arch arm64`, `Desktop/.build/release/Omi
Computer` does NOT exist (the `release/` symlink is not updated by
`--arch` on Codemagic M2). The `cp` failed silently. The echo showed a
**false-positive** `arm64 binary: arm64` because `file
/tmp/OmiComputer-arm64` (non-existent file) outputs the filepath which
contains "arm64", and `grep -oE` matched it.

Build log evidence (build `69a065cb5f240a649219ee41`):
- Line 200: `cp: Desktop/.build/release/Omi Computer: No such file or
directory`
- Line 201: `arm64 binary: arm64` ← false positive from filename match,
not real binary

## Fix

Use explicit arch-specific output paths throughout (never use `release/`
symlink):
- arm64 binary: `Desktop/.build/arm64-apple-macosx/release/$BINARY_NAME`
- x86_64 binary:
`Desktop/.build/x86_64-apple-macosx/release/$BINARY_NAME`
- Sparkle: x86_64 arch path, fallback to arm64
- SWIFT_BUILD_DIR: x86_64 arch path, fallback to arm64

Both arch dirs confirmed to exist in build BasedHardware#11 (x86_64-apple-macosx/
created when --arch x86_64 runs after arm64).

🤖 Generated with [Claude Code](https://claude.com/claude-code)
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