Skip to content

Debug: add binary diagnostics to find arm64 build output location#5148

Merged
m13v merged 1 commit intomainfrom
fix/arm64-binary-path
Feb 26, 2026
Merged

Debug: add binary diagnostics to find arm64 build output location#5148
m13v merged 1 commit intomainfrom
fix/arm64-binary-path

Conversation

@m13v
Copy link
Copy Markdown
Contributor

@m13v m13v commented Feb 26, 2026

Adds ls of release dirs before binary check so we can see where arm64 binary actually lands on Codemagic mac_mini_m2 Xcode 16.4.

… step

Print BINARY_NAME value and contents of all three release dirs
(release/, arm64-apple-macosx/release/, x86_64-apple-macosx/release/)
before the binary existence check, so we can see exactly where the
built binaries actually land on Codemagic mac_mini_m2.
@m13v m13v merged commit dafc8ec into main Feb 26, 2026
1 check passed
@m13v m13v deleted the fix/arm64-binary-path branch February 26, 2026 03:54
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented Feb 26, 2026

Greptile Summary

Adds diagnostic output to the "Create universal app bundle" step in the Codemagic CI/CD workflow to help debug where arm64 binaries are placed during builds on mac_mini_m2 machines with Xcode 16.4.

  • Logs BINARY_NAME variable and contents of all relevant build directories before binary verification
  • Filters out build artifacts (.build, .o, .d files) and limits output to 30 lines for readability
  • Removes redundant directory listing after error message since diagnostics now show this information earlier
  • No functional changes to build process, purely diagnostic

Confidence Score: 5/5

  • This PR is safe to merge - it only adds diagnostic logging with no functional changes to the build process
  • The changes are purely diagnostic, adding directory listings before binary verification to help debug arm64 binary locations. No build logic is modified, and the diagnostics use appropriate error handling. This is a temporary debugging aid that poses no risk to the build process.
  • No files require special attention

Important Files Changed

Filename Overview
codemagic.yaml Adds diagnostic logging to show directory contents before binary verification, helping debug arm64 binary location on M2 machines

Last reviewed commit: 69fb2ee

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 adds diagnostic commands to a Codemagic workflow to help debug the location of build artifacts. My review focuses on improving the correctness and readability of these new shell commands. I've identified a potential issue where the 'not found' message for missing directories may not be displayed as intended and have suggested a refactoring to fix this.

Comment thread codemagic.yaml
Comment on lines +2009 to +2014
echo "Desktop/.build/release/ contents:"
ls "Desktop/.build/release/" 2>/dev/null | grep -v "\.build\|\.o$\|\.d$" | head -30 || echo " (not found)"
echo "Desktop/.build/arm64-apple-macosx/release/ contents:"
ls "Desktop/.build/arm64-apple-macosx/release/" 2>/dev/null | grep -v "\.build\|\.o$\|\.d$" | head -30 || echo " (not found)"
echo "Desktop/.build/x86_64-apple-macosx/release/ contents:"
ls "Desktop/.build/x86_64-apple-macosx/release/" 2>/dev/null | grep -v "\.build\|\.o$\|\.d$" | head -30 || echo " (not found)"
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.

high

The || echo " (not found)" fallback may not work as expected. The exit code of a pipeline is determined by the last command (head), which exits with 0 even on no input. This prevents the fallback from triggering when a directory is missing.

To make this more robust and correctly report when a directory is not found, it's better to explicitly check for the directory's existence. I've also corrected the grep pattern to use single quotes, which is safer in shell scripts to prevent unintended expansions and correctly pass the pattern to grep.

          echo "Desktop/.build/release/ contents:"
          if [ -d "Desktop/.build/release/" ]; then
            ls "Desktop/.build/release/" | grep -v '\.build\|\.o$\|\.d$' | head -30
          else
            echo "  (not found)"
          fi
          echo "Desktop/.build/arm64-apple-macosx/release/ contents:"
          if [ -d "Desktop/.build/arm64-apple-macosx/release/" ]; then
            ls "Desktop/.build/arm64-apple-macosx/release/" | grep -v '\.build\|\.o$\|\.d$' | head -30
          else
            echo "  (not found)"
          fi
          echo "Desktop/.build/x86_64-apple-macosx/release/ contents:"
          if [ -d "Desktop/.build/x86_64-apple-macosx/release/" ]; then
            ls "Desktop/.build/x86_64-apple-macosx/release/" | grep -v '\.build\|\.o$\|\.d$' | head -30
          else
            echo "  (not found)"
          fi

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

Adds ls of release dirs before binary check so we can see where arm64
binary actually lands on Codemagic mac_mini_m2 Xcode 16.4.
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