Skip to content

Commit

Permalink
Distribute prebuilt binary for aarch64 macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Apr 25, 2024
1 parent ae544b8 commit 8c9f917
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/.cspell/project-dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
aarch
cdylib
collada
ctxt
Expand All @@ -8,6 +9,7 @@ highp
libglu
mediump
memoffset
msvc
nalgebra
ncollide
nextage
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,15 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target: x86_64-apple-darwin
os: macos-13
- target: aarch64-apple-darwin
os: macos-14
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand All @@ -46,8 +54,13 @@ jobs:
sudo apt-get update
sudo apt-get install xorg-dev libglu1-mesa-dev
if: startsWith(matrix.os, 'ubuntu')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
if: startsWith(matrix.os, 'windows')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
if: contains(matrix.target, '-windows-msvc')
# https://doc.rust-lang.org/rustc/platform-support.html
- run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >>"${GITHUB_ENV}"
if: matrix.target == 'x86_64-apple-darwin'
- run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >>"${GITHUB_ENV}"
if: matrix.target == 'aarch64-apple-darwin'

- run: cargo fmt --all --check
- run: cargo clippy --all-features --all-targets
Expand Down
21 changes: 17 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,15 @@ jobs:
needs: [create-release]
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-20.04
- target: x86_64-apple-darwin
os: macos-13
- target: aarch64-apple-darwin
os: macos-14
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
timeout-minutes: 60
steps:
Expand All @@ -58,13 +66,18 @@ jobs:
sudo apt-get update
sudo apt-get install xorg-dev libglu1-mesa-dev
if: startsWith(matrix.os, 'ubuntu')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
if: startsWith(matrix.os, 'windows')
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}"
if: contains(matrix.target, '-windows-msvc')
# https://doc.rust-lang.org/rustc/platform-support.html
- run: echo "MACOSX_DEPLOYMENT_TARGET=10.12" >>"${GITHUB_ENV}"
if: matrix.target == 'x86_64-apple-darwin'
- run: echo "MACOSX_DEPLOYMENT_TARGET=11.0" >>"${GITHUB_ENV}"
if: matrix.target == 'aarch64-apple-darwin'

- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: urdf-viz
include: ${{ matrix.include-files }}
target: ${{ matrix.target }}
# TODO: Should we enable assimp feature for pre-built binary?
# all-features: true
env:
Expand Down

0 comments on commit 8c9f917

Please sign in to comment.