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

Support Apple silicon #902

Closed
wants to merge 6 commits into from
Closed
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
15 changes: 12 additions & 3 deletions .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,16 @@ jobs:
id: release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
with:
tag_name: ${{ env.RELEASE_VERSION }}
release_name: ${{ env.RELEASE_VERSION }}
body_path: notes-${{ env.RELEASE_VERSION }}.md
build-release:
name: build-release
needs: create-release
strategy:
fail-fast: false
matrix:
build: [linux, macos, win-msvc]
include:
- build: linux
os: ubuntu-20.04
Expand All @@ -69,6 +67,10 @@ jobs:
os: macos-latest
rust: stable
target: x86_64-apple-darwin
- build: macos-aarch64
os: macos-latest
rust: stable
target: aarch64-apple-darwin
- build: win-msvc
os: windows-2019
rust: stable
Expand All @@ -89,6 +91,13 @@ jobs:
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- name: Set up Apple silicon support
if: matrix.target == 'aarch64-apple-darwin'
shell: bash
run: |
rustup target add aarch64-apple-darwin
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't the rust-toolchain step above take care of this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I do not know.
I have zero knowledge of Rust environments.

echo "SDKROOT=$(xcrun --sdk macosx13.1 --show-sdk-path)" >> "${GITHUB_ENV}"
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun --sdk macosx13.1 --show-sdk-platform-version)" >> "${GITHUB_ENV}"
- name: Build release binary
run: cargo build --target ${{ matrix.target }} --verbose --release
- name: Build archive
Expand Down
Loading