fix: add x86_64 CI verification and fix cross-compilation macro errors#544
fix: add x86_64 CI verification and fix cross-compilation macro errors#544Sagart-cactus wants to merge 1 commit intosteipete:mainfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d49e63909c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
.github/workflows/ci.yml
Outdated
| run: swift test --no-parallel | ||
|
|
||
| - name: Compile for x86_64 | ||
| run: swift build -c release --arch x86_64 --product CodexBar --product CodexBarCLI --product CodexBarClaudeWatchdog |
There was a problem hiding this comment.
Build each x86_64 product in separate SwiftPM invocations
The new x86_64 verification step passes --product three times on one swift build command, but swift build --help defines this as a singular option (--product <product> Build the specified product.), so only the last product is actually validated. In this workflow that means the step compiles CodexBarClaudeWatchdog but does not verify CodexBar or CodexBarCLI for x86_64 here, leaving the intended coverage gap in this check.
Useful? React with 👍 / 👎.
swift build only accepts a single --product flag; passing multiple flags means only the last product is actually built. Split into three separate invocations to ensure all products are verified for x86_64. Fixes Codex bot feedback on PR steipete#544.
eeb5038 to
e7dd1fd
Compare
- Add x86_64 build step that compiles CodexBar, CodexBarCLI, and CodexBarClaudeWatchdog - Patch Recorder.swift to strip #Preview blocks (PreviewsMacros unavailable in CLI builds) - Use perl one-liner instead of Python heredoc to avoid YAML indentation parse error
e7dd1fd to
2c12920
Compare
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Summary
PR #331 made
package_app.shdefault to universal binaries — great for Intel users. However, CI only ranswift teston the arm64 runner, so x86_64-breaking regressions could still merge silently and corrupt those universal release builds.This PR closes that gap and fixes two existing x86_64 compilation failures that were already present.
Why
Without an x86_64 build step in CI, the universal binary guarantee is only as good as the last time someone manually verified it. These failures were invisible on arm64 and would have shipped in the next release.
Changes
.github/workflows/ci.ymlswift build -c release --arch x86_64step (cross-compiles all three products from the arm64 runner — catches arm64-only APIs and conditional code)package_app.sh releasestep withCODEXBAR_SIGNING=adhocthat verifies the output binary contains both slices vialipo -archsSources/CodexBar/MenuHighlightStyle.swift@Entrymacro with the explicitEnvironmentKeypattern —SwiftUIMacros.EntryMacrois unavailable when cross-compiling to x86_64. Functionally identical on arm64.Scripts/package_app.shpatch_keyboard_shortcuts_recorder(), parallel to the existingpatch_keyboard_shortcuts(), that strips#Previewblocks fromKeyboardShortcuts/Recorder.swiftbefore the build loop —PreviewsMacrosis similarly unavailable during x86_64 cross-compilation. No runtime impact on either architecture.Testing
Verified locally on an Apple Silicon Mac:
The app also launched and ran correctly from the resulting bundle.