Skip to content

Commit 346cbfd

Browse files
author
Mike Kuykendall
committed
fix: Improve cross-compilation workflow
- Use cross tool for macOS and Windows builds - Separate binary preparation from release creation - Only create releases on actual tags (not test branches) - Add binary listing for debugging
1 parent b2a75a2 commit 346cbfd

2 files changed

Lines changed: 19 additions & 12 deletions

File tree

.claude/settings.local.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
"deny": [],
5555
"ask": [],
5656
"additionalDirectories": [
57-
"C:\\Users\\micha\\.ollama\\models"
57+
"C:\\Users\\micha\\.ollama\\models",
58+
"C:\\Users\\micha\\repos"
5859
]
5960
}
6061
}

.github/workflows/release.yml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,22 @@ jobs:
2525
- name: Install cross-compilation tools
2626
run: |
2727
sudo apt-get update
28-
sudo apt-get install -y mingw-w64
28+
sudo apt-get install -y gcc-mingw-w64 clang
2929
3030
- name: Build Linux binary
3131
run: cargo build --release --target x86_64-unknown-linux-gnu
3232

33-
- name: Build macOS Intel binary
34-
run: cargo build --release --target x86_64-apple-darwin
35-
36-
- name: Build macOS Apple Silicon binary
37-
run: cargo build --release --target aarch64-apple-darwin
33+
- name: Build macOS binaries (using cross)
34+
run: |
35+
cargo install cross --git https://github.com/cross-rs/cross
36+
cross build --release --target x86_64-apple-darwin
37+
cross build --release --target aarch64-apple-darwin
3838
3939
- name: Build Windows binary
40-
run: cargo build --release --target x86_64-pc-windows-msvc
40+
run: |
41+
cross build --release --target x86_64-pc-windows-msvc
4142
42-
- name: Create release
43-
env:
44-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
- name: Prepare binaries
4544
run: |
4645
# Copy binaries with proper names
4746
cp target/x86_64-unknown-linux-gnu/release/shimmy shimmy-linux-x86_64
@@ -53,7 +52,14 @@ jobs:
5352
cp target/x86_64-unknown-linux-gnu/release/shimmy shimmy
5453
cp target/x86_64-pc-windows-msvc/release/shimmy.exe shimmy.exe
5554
56-
# Create release with all binaries
55+
# List all created files
56+
ls -la shimmy*
57+
58+
- name: Create release (only on tags)
59+
if: startsWith(github.ref, 'refs/tags/')
60+
env:
61+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
run: |
5763
gh release create ${{ github.ref_name }} \
5864
shimmy-linux-x86_64 \
5965
shimmy-macos-intel \

0 commit comments

Comments
 (0)