Skip to content

Fix: use .build/release/ for arm64 binary path on Codemagic M2#5149

Merged
m13v merged 3 commits intomainfrom
fix/arm64-use-release-dir
Feb 26, 2026
Merged

Fix: use .build/release/ for arm64 binary path on Codemagic M2#5149
m13v merged 3 commits intomainfrom
fix/arm64-use-release-dir

Conversation

@m13v
Copy link
Copy Markdown
Contributor

@m13v m13v commented Feb 26, 2026

Root Cause

Diagnostic build confirmed: on Codemagic mac_mini_m2 with Xcode 16.4, xcrun swift build --arch arm64 outputs to .build/release/ (native arch path), NOT .build/arm64-apple-macosx/release/. Only the x86_64 cross-compilation uses the arch-specific subdirectory.

Fix

Update three path references in "Create universal app bundle":

  • ARM64_BINARY: .build/release/$BINARY_NAME
  • SPARKLE_FW: .build/release/Sparkle.framework
  • SWIFT_BUILD_DIR: .build/release

Also removes the failed normalization attempt from PR #5147 (copying didn't persist across the x86_64 build step).

github-actions Bot and others added 3 commits February 25, 2026 23:13
Co-Authored-By: Gemini <noreply@google.com>
Diagnostic build confirmed: xcrun swift build --arch arm64 on native
M2 host (Xcode 16.4) outputs to .build/release/ not
.build/arm64-apple-macosx/release/. Only x86_64 cross-compilation
outputs to the arch-specific subdirectory.

Fix all three references in Create universal app bundle:
- ARM64_BINARY: .build/release/$BINARY_NAME
- SPARKLE_FW: .build/release/Sparkle.framework
- SWIFT_BUILD_DIR: .build/release

Also remove the failed normalization attempt from Build Swift app step.
@m13v m13v merged commit e978aa2 into main Feb 26, 2026
1 check passed
@m13v m13v deleted the fix/arm64-use-release-dir branch February 26, 2026 04:13
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request primarily fixes build paths in codemagic.yaml for arm64 builds on Codemagic's M2 runners by updating hardcoded paths to the correct build output directories. The changes appear correct and align with the pull request's description. However, the PR also includes an unrelated change in app/lib/env/env.dart that hardcodes the agentProxyWsUrl. I have raised a critical concern about this change, as it appears to remove support for the omiapi.com domain, which could cause a regression for users in that environment.

Comment thread app/lib/env/env.dart
.replaceFirst('http://api.', 'ws://agent.')
.replaceAll(RegExp(r'/$'), '') +
'/v1/agent/ws';
return 'wss://agent.omi.me/v1/agent/ws';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

This change hardcodes the agentProxyWsUrl to use the omi.me domain, removing support for omiapi.com which was mentioned in the previous implementation's comments. If omiapi.com is a valid production domain, this change introduces a regression by breaking agent proxy connections for that environment. If omiapi.com is still in use, the previous logic for deriving the URL from apiBaseUrl should be restored or adapted to handle multiple production domains.

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 26, 2026

Greptile Summary

This PR fixes the Codemagic M2 build by updating binary paths to match Swift's native arm64 build output location and hardcodes the agent proxy to production.

Key changes:

  • Updated arm64 binary paths from .build/arm64-apple-macosx/release/ to .build/release/ (native M2 output location)
  • Removed failed normalization logic that attempted to copy binaries between build directories
  • Hardcoded agent proxy WebSocket URL to wss://agent.omi.me (agent infrastructure exists only in prod)
  • Simplified error diagnostics in build script

Notes:

  • The agent proxy change means TestFlight builds (which override apiBaseUrl to dev) will still connect to production agent service, which is intentional per the code comment
  • Build script now assumes native arm64 execution on mac_mini_m2; cross-compilation scenarios would need different paths

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The changes are straightforward path corrections based on diagnostic findings, with clear comments documenting the architecture-specific behavior. The agent proxy hardcoding is intentional and preserves the override method for local testing. No syntax errors or logical issues found.
  • No files require special attention

Important Files Changed

Filename Overview
codemagic.yaml Fixed arm64 binary paths to use .build/release/ on native M2, removed failed normalization logic, simplified diagnostics
app/lib/env/env.dart Hardcoded agent proxy WSS to production (wss://agent.omi.me) instead of deriving from apiBaseUrl

Last reviewed commit: 41354d2

Glucksberg pushed a commit to Glucksberg/omi-local that referenced this pull request Apr 28, 2026
…Hardware#5149)

## Root Cause

Diagnostic build confirmed: on Codemagic mac_mini_m2 with Xcode 16.4,
`xcrun swift build --arch arm64` outputs to `.build/release/` (native
arch path), NOT `.build/arm64-apple-macosx/release/`. Only the x86_64
cross-compilation uses the arch-specific subdirectory.

## Fix

Update three path references in "Create universal app bundle":
- `ARM64_BINARY`: `.build/release/$BINARY_NAME` 
- `SPARKLE_FW`: `.build/release/Sparkle.framework`
- `SWIFT_BUILD_DIR`: `.build/release`

Also removes the failed normalization attempt from PR BasedHardware#5147 (copying
didn't persist across the x86_64 build step).
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