Add GitHub workflow for cross-compilation and fix build issues for macOS and FreeBSD#636
Open
nohajc wants to merge 3 commits intocontainers:mainfrom
Open
Add GitHub workflow for cross-compilation and fix build issues for macOS and FreeBSD#636nohajc wants to merge 3 commits intocontainers:mainfrom
nohajc wants to merge 3 commits intocontainers:mainfrom
Conversation
Signed-off-by: Jan Noha <nohajc@gmail.com>
Signed-off-by: Jan Noha <nohajc@gmail.com>
nohajc
commented
Apr 14, 2026
Contributor
Author
There was a problem hiding this comment.
The runner configuration lets me run unit tests from VS Code editor.
Signed-off-by: Jan Noha <nohajc@gmail.com>
mtjhrc
reviewed
Apr 15, 2026
nohajc
commented
Apr 15, 2026
| name: Cross-compilation (macOS) | ||
| runs-on: macos-latest | ||
| env: | ||
| DYLD_LIBRARY_PATH: /Library/Developer/CommandLineTools/usr/lib/ |
Contributor
Author
There was a problem hiding this comment.
@slp I had issues building the macOS version which looked like this:
slp/homebrew-krun#14
Setting DYLD_LIBRARY_PATH fixed it for the GitHub action. Maybe the krun_display patch for homebrew is not needed.
mtjhrc
reviewed
Apr 15, 2026
| </plist> | ||
| EOF | ||
|
|
||
| codesign --entitlements "$ENTITLEMENTS" --force -s - "$BINARY" |
Collaborator
There was a problem hiding this comment.
You don't need the temp file, you can just do:
Suggested change
| codesign --entitlements "$ENTITLEMENTS" --force -s - "$BINARY" | |
| codesign --entitlements /dev/stdin --force -s - "$BINARY" << 'EOF' | |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>com.apple.security.hypervisor</key> | |
| <true/> | |
| </dict> | |
| </plist> | |
| EOF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I figured it would be a good idea to run automated builds for our cross-compilation scenarios. So the new pull request workflow tests the following combinations:
Of course I immediately found out my newly merged FreeBSD init port didn't compile, so the fix is included (it was just a broken Makefile rule).
I also tried to fix various issues with building unit tests on macOS which popped up in my VS Code. Most of the changes were suggested by AI with the following explanation: