Merged
Conversation
| RUSTFLAGS="-C target-feature=+crt-static" cargo build --release --bin agent-relay-broker --target ${{ matrix.target }} | ||
| strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || \ | ||
| aarch64-linux-musl-strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true | ||
| strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true |
Contributor
There was a problem hiding this comment.
🟡 publish.yml aarch64 binary is never stripped due to missing cross-strip tool
The strip command on line 125 runs the host's x86_64 strip against a cross-compiled aarch64 binary, which silently fails (masked by || true). The old code had a fallback to aarch64-linux-musl-strip, and the companion workflow build-broker-binary.yml:51-53 correctly installs binutils-aarch64-linux-gnu and uses aarch64-linux-gnu-strip for the aarch64 case. The publish workflow omits both the package install and the cross-architecture strip invocation, so the aarch64 binary will be published unstripped (larger file size).
Prompt for agents
In .github/workflows/publish.yml, the aarch64 binary strip is ineffective because the host strip cannot process an ARM binary. To fix:
1. Add a step after the 'Install cross (aarch64)' step (around line 111) to install binutils-aarch64-linux-gnu, similar to what build-broker-binary.yml does at line 53:
- name: Install cross strip tools (aarch64)
if: matrix.target == 'aarch64-unknown-linux-musl'
run: sudo apt-get update && sudo apt-get install -y binutils-aarch64-linux-gnu
2. Update the strip line (currently line 125) to use aarch64-linux-gnu-strip for the aarch64 target, keeping the generic strip for other targets. Change the 'Build broker binary' step's strip command to:
if [[ "${{ matrix.target }}" == "aarch64-unknown-linux-musl" ]]; then
aarch64-linux-gnu-strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true
else
strip target/${{ matrix.target }}/release/agent-relay-broker 2>/dev/null || true
fi
This matches the pattern already used in .github/workflows/build-broker-binary.yml lines 51-66.
Was this helpful? React with 👍 or 👎 to provide feedback.
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.
Summary
Test Plan
Screenshots