Skip to content

Commit a97387e

Browse files
8bit-wraithclaude
andcommitted
fix: Skip strip command for cross-compiled binaries in release workflow
- Native strip can't handle ARM64 binaries on x86_64 runners - Only strip native builds, skip cross-compiled ones - Cross-compiled binaries are already optimized by Rust - Fixes 'Unable to recognise the format' error in release builds 🚀 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fe4912f commit a97387e

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

.github/workflows/release.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,21 @@ jobs:
106106
run: cargo test --release --target ${{ matrix.target }}
107107

108108
- name: Strip binary (Linux/macOS) 🗜️
109-
if: matrix.os != 'windows-latest'
109+
if: matrix.os != 'windows-latest' && matrix.cross != true
110110
run: |
111111
strip target/${{ matrix.target }}/release/st
112112
113+
- name: Strip binary (cross-compiled) 🗜️
114+
if: matrix.cross == true
115+
run: |
116+
# For cross-compiled binaries, we need the target-specific strip command
117+
# or skip stripping as it's optional for release builds
118+
echo "Skipping strip for cross-compiled binary ${{ matrix.target }}"
119+
# Alternatively, install and use the correct strip tool:
120+
# For ARM64 Linux: sudo apt-get install -y gcc-aarch64-linux-gnu
121+
# Then use: aarch64-linux-gnu-strip target/${{ matrix.target }}/release/st
122+
# But for simplicity, we'll skip it as Rust already optimizes release builds
123+
113124
- name: Create archive 📦
114125
shell: bash
115126
run: |

0 commit comments

Comments
 (0)