Skip to content

Commit cf9b787

Browse files
Mike Kuykendallclaude
andcommitted
fix: Add missing rustup targets for cross-compilation
Adds required rustup target installations before cross build commands. This was the root cause of all CI/CD failures - missing cross-compilation targets for Windows, macOS Intel, and macOS ARM platforms. Changes: - Add rustup target add for all 4 platforms - Restore full multi-platform build capability - Fixes error[E0463]: can't find crate for core 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ea05d97 commit cf9b787

1 file changed

Lines changed: 26 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,42 @@ jobs:
4444
echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
4545
fi
4646
47-
- name: Build native Linux binary
47+
- name: Build multi-platform binaries
4848
run: |
4949
mkdir -p release
5050
51-
# Build natively on Ubuntu (fastest, most reliable)
52-
cargo build --release
51+
# Install all required targets for cross-compilation
52+
rustup target add x86_64-unknown-linux-gnu
53+
rustup target add x86_64-pc-windows-gnu
54+
rustup target add x86_64-apple-darwin
55+
rustup target add aarch64-apple-darwin
5356
54-
# Copy binary to release directory
55-
cp target/release/shimmy release/shimmy-linux-amd64
57+
# Install cross for cross-compilation
58+
cargo install cross
59+
60+
# Build fast version (default features, no C++ deps)
61+
cross build --release --target x86_64-unknown-linux-gnu
62+
cross build --release --target x86_64-pc-windows-gnu
63+
cross build --release --target x86_64-apple-darwin
64+
cross build --release --target aarch64-apple-darwin
65+
66+
# Copy binaries to release directory with clean names
67+
cp target/x86_64-unknown-linux-gnu/release/shimmy release/shimmy-linux-amd64
68+
cp target/x86_64-pc-windows-gnu/release/shimmy.exe release/shimmy-windows-amd64.exe
69+
cp target/x86_64-apple-darwin/release/shimmy release/shimmy-darwin-amd64
70+
cp target/aarch64-apple-darwin/release/shimmy release/shimmy-darwin-arm64
5671
5772
- name: Create release archives
5873
run: |
5974
cd release
6075
61-
# Create tar.gz for Linux
76+
# Create tar.gz for Unix platforms
6277
tar -czf shimmy-${{ steps.version.outputs.version }}-linux-amd64.tar.gz shimmy-linux-amd64
78+
tar -czf shimmy-${{ steps.version.outputs.version }}-darwin-amd64.tar.gz shimmy-darwin-amd64
79+
tar -czf shimmy-${{ steps.version.outputs.version }}-darwin-arm64.tar.gz shimmy-darwin-arm64
80+
81+
# Create zip for Windows
82+
zip shimmy-${{ steps.version.outputs.version }}-windows-amd64.zip shimmy-windows-amd64.exe
6383
6484
- name: Create GitHub Release
6585
id: create_release

0 commit comments

Comments
 (0)