Skip to content

Commit

Permalink
chore(ci): build binary for aarch64-macos
Browse files Browse the repository at this point in the history
The tests are conditionally disabled for this target because the x86_64 CI
host is unable to run AArch64 binaries. (There is no officially-supported
reverse Rosetta 2.)
  • Loading branch information
yvt authored and archseer committed Aug 2, 2022
1 parent eef9eff commit 4461090
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,12 @@ jobs:
rust: stable
target: x86_64-pc-windows-msvc
cross: false
# - build: aarch64-macos
# os: macos-latest
# rust: stable
# target: aarch64-apple-darwin
- build: aarch64-macos
os: macos-latest
rust: stable
target: aarch64-apple-darwin
cross: false
skip_tests: true # x86_64 host can't run aarch64 code
# - build: x86_64-win-gnu
# os: windows-2019
# rust: stable-x86_64-gnu
Expand Down Expand Up @@ -100,6 +102,7 @@ jobs:

- name: Run cargo test
uses: actions-rs/cargo@v1
if: "!matrix.skip_tests"
with:
use-cross: ${{ matrix.cross }}
command: test
Expand All @@ -113,7 +116,7 @@ jobs:
args: --release --locked --target ${{ matrix.target }}

- name: Strip release binary (linux and macos)
if: matrix.build == 'x86_64-linux' || matrix.build == 'x86_64-macos'
if: matrix.build == 'x86_64-linux' || matrix.build == 'x86_64-macos' || matrix.build == 'aarch64-macos'
run: strip "target/${{ matrix.target }}/release/hx"

- name: Strip release binary (arm)
Expand Down

0 comments on commit 4461090

Please sign in to comment.