-
Notifications
You must be signed in to change notification settings - Fork 241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem: cross-compiling macos binaries is problematic in recent nixpkgs #1320
Conversation
Solution: - use the github macos-14 arm mac runner to build arm mac binaries
WalkthroughThe recent updates focus on enhancing cross-platform compatibility and efficiency in build and release workflows. By adding macOS 14 to the build matrix and implementing a matrix strategy for macOS releases, the changes ensure broader support. Furthermore, dynamic checksum naming and refined host variable assignments based on the build platform improve the automation's flexibility and accuracy. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (3)
- .github/workflows/build.yml (1 hunks)
- .github/workflows/release.yml (2 hunks)
- scripts/release.sh (1 hunks)
Files skipped from review due to trivial changes (1)
- .github/workflows/build.yml
Additional comments: 4
scripts/release.sh (2)
- 40-41: The update to set
hosts
to "Darwin_x86_64,native" forx86_64-darwin
simplifies the build process for this architecture by removing unnecessary targets. This change should streamline the build process for macOS binaries on x86_64 architecture.- 42-42: Similarly, setting
hosts
to "Darwin_arm64,native" foraarch64-darwin
focuses the build process on the ARM architecture for macOS, aligning with the PR's objective to improve the compilation of macOS binaries for ARM. This change is well-justified given the context of problematic cross-compiling issues..github/workflows/release.yml (2)
- 51-54: The introduction of a matrix strategy for the
release-macos
job, including bothmacos-latest
andmacos-14
runners, is a significant improvement. This change allows for parallel builds on different macOS versions, enhancing the build process's efficiency and compatibility.- 92-96: Dynamically naming the checksum file based on the architecture (
checksums-darwin-$(uname -p).txt
) is a thoughtful addition. It ensures that the checksum files are easily identifiable and aligns with the PR's goal of making the release process more architecture-aware. However, ensure that downstream processes or scripts that rely on the checksum file names are updated to accommodate this change.
Signed-off-by: yihuang <huang@crypto.com>
Solution:
👮🏻👮🏻👮🏻 !!!! REFERENCE THE PROBLEM YOUR ARE SOLVING IN THE PR TITLE AND DESCRIBE YOUR SOLUTION HERE !!!! DO NOT FORGET !!!! 👮🏻👮🏻👮🏻
PR Checklist:
make
)make test
)go fmt
)golangci-lint run
)go list -json -m all | nancy sleuth
)Thank you for your code, it's appreciated! :)
Summary by CodeRabbit
New Features
Refactor