Skip to content

test(ci): check if macos build is stable on nix-darwin host#8163

Open
markoburcul wants to merge 2 commits intounstablefrom
test-nix-darwin-host
Open

test(ci): check if macos build is stable on nix-darwin host#8163
markoburcul wants to merge 2 commits intounstablefrom
test-nix-darwin-host

Conversation

@markoburcul
Copy link
Copy Markdown
Contributor

@markoburcul markoburcul commented Mar 24, 2026

Adjustments to the scripts to also work on the MacOS hosts where we configure them using nix-darwin.

Reason for this change is that we are in the process of removing homebrew from our MacOS CI hosts and replacing it with nix-darwin.

Signed-off-by: markoburcul <marko@status.im>
@markoburcul markoburcul self-assigned this Mar 24, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 24, 2026

Unit Test Results

       12 files  ±0    2 488 suites  ±0   57m 21s ⏱️ + 11m 0s
12 978 tests ±0  12 431 ✔️ ±0  547 💤 ±0  0 ±0 
65 612 runs  ±0  64 902 ✔️ ±0  710 💤 ±0  0 ±0 

Results for commit 7fed330. ± Comparison against base commit c4d9528.

♻️ This comment has been updated with latest results.

@markoburcul markoburcul force-pushed the test-nix-darwin-host branch from a6a1f55 to b5f8d69 Compare March 25, 2026 10:06
Check if GNU getopt is available in PATH before falling back to
Homebrew-specific paths. This supports nix-darwin and other package
managers that install GNU getopt outside of Homebrew.

Also updates DYLD_LIBRARY_PATH discovery to check standard
locations before assuming Homebrew.

Signed-off-by: markoburcul <marko@status.im>
@markoburcul markoburcul force-pushed the test-nix-darwin-host branch from b5f8d69 to 7fed330 Compare March 25, 2026 10:37
@markoburcul markoburcul requested review from a team and tersec March 25, 2026 12:24
Comment on lines +34 to +44
if uname | grep -qi darwin; then
# Check if getopt in PATH is GNU getopt (exit code 4 from --test)
getopt_rc=0
getopt --test > /dev/null 2>&1 || getopt_rc=$?
if [ $getopt_rc -eq 4 ]; then
GETOPT_BINARY="getopt"
else
# Fall back to Homebrew paths
GETOPT_BINARY=$(find /opt/homebrew/opt/gnu-getopt/bin/getopt /usr/local/opt/gnu-getopt/bin/getopt 2> /dev/null | head -n1 || true)
[[ -f "$GETOPT_BINARY" ]] || { echo "GNU getopt not installed. Install via 'brew install gnu-getopt' or ensure GNU getopt is in PATH. Aborting."; exit 1; }
fi
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Wouldn't it be simpler to make this into a scripts/getopt-wrapper.sh and use that:

GETOPT_BINARY="${SCRIPTS_DIR}/getopt-wrapper.sh"

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.

2 participants