Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: cross-compile for Apple Silicon #14

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,15 +104,25 @@ jobs:
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-

- name: Build

- name: Add aarch64 target
run: rustup target add aarch64-apple-darwin

- name: Build whisper_rs_sys for Apple Silicon
run: cargo build --release --target=aarch64-apple-darwin -p whisper_rs_sys

- name: Build for Mac with Intel
run: cargo build --release

- name: Build for Apple Silicon
run: cargo build --release --target=aarch64-apple-darwin

- name: "Move to outputs/ folder"
run: |
mkdir outputs
cp target/release/whisper outputs/whisper-darwin-x86_64

cp target/aarch64-apple-darwin/release/whisper outputs/whisper-darwin-aarch64

- name: Upload to temporary storage
uses: actions/upload-artifact@master
with:
Expand Down