Skip to content

Commit ee00238

Browse files
ismoilovdevmlclaude
andcommitted
🔧 Fix ARM64 cross-compilation with taiki-e/install-action
- Replace manual cross installation with official taiki-e/install-action@cross - Remove strip step (MUSL binaries are already optimized) - Add CROSS_CONTAINER_IN_CONTAINER env for nested Docker builds - Simplify binary verification steps Fixes: - aarch64-linux-gnu-strip: command not found - GLIBC version mismatch in cross build 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent cd181a2 commit ee00238

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,9 @@ jobs:
8383
sudo apt-get update
8484
sudo apt-get install -y musl-tools
8585
86-
- name: Install cross tool for ARM64 MUSL
87-
if: matrix.cross && matrix.os == 'ubuntu-latest'
88-
run: |
89-
cargo install cross --git https://github.com/cross-rs/cross
86+
- name: Install cross for ARM64 cross-compilation
87+
if: matrix.cross
88+
uses: taiki-e/install-action@cross
9089

9190
- name: Rust Cache
9291
uses: Swatinem/rust-cache@v2
@@ -101,27 +100,22 @@ jobs:
101100

102101
- name: Build release binary (cross-compile)
103102
if: matrix.cross
103+
env:
104+
CROSS_CONTAINER_IN_CONTAINER: true
104105
run: cross build --release --target ${{ matrix.target }}
105106

106-
- name: Strip binary (Linux)
107-
if: matrix.os == 'ubuntu-latest' && !matrix.cross
108-
run: strip target/${{ matrix.target }}/release/rust-strom
109-
110-
- name: Strip binary (Linux ARM64 cross-compile)
111-
if: matrix.cross && matrix.os == 'ubuntu-latest'
112-
run: aarch64-linux-gnu-strip target/${{ matrix.target }}/release/rust-strom
113-
114-
- name: Strip binary (macOS)
115-
if: matrix.os == 'macos-latest'
116-
run: strip target/${{ matrix.target }}/release/rust-strom
117-
118-
- name: Verify binary
107+
- name: Verify binary (native builds only)
119108
if: ${{ !matrix.cross }}
120109
run: |
121110
ls -lh target/${{ matrix.target }}/release/rust-strom
122111
file target/${{ matrix.target }}/release/rust-strom
123112
target/${{ matrix.target }}/release/rust-strom --version || echo "Version check skipped"
124113
114+
- name: Display binary info (all builds)
115+
run: |
116+
ls -lh target/${{ matrix.target }}/release/rust-strom
117+
file target/${{ matrix.target }}/release/rust-strom || true
118+
125119
- name: Prepare binary for upload
126120
run: |
127121
mkdir -p artifacts

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ Thumbs.db
2424
# Temporary files
2525
*.tmp
2626
/tmp/
27+
28+
# Cross-compilation
29+
.cross/

0 commit comments

Comments
 (0)