# Add aarch64-apple-darwin Build Target Support

Added ARM64 macOS (Apple Silicon) build target support to the CI/CD pipeline by:

1. Including `aarch64-apple-darwin` as a new build variant in the build matrix
2. Adding proper exclusion rules to ensure the target only runs on macOS runners
3. Ensuring compatibility with the existing build scripts and packaging process

This change enables native builds for Apple Silicon Macs, improving performance for users with M1/M2/M3/M4 processors while maintaining the same artifact organization and deployment process.
This commit is contained in:
houseme
2025-05-10 00:15:05 +08:00
parent db100a6db9
commit 2a9a60197b
3 changed files with 20 additions and 4 deletions
+8
View File
@@ -6,17 +6,25 @@ inputs:
rust-version:
required: true
default: "stable"
description: "Rust version to use"
cache-shared-key:
required: true
default: ""
description: "Cache key for shared cache"
cache-save-if:
required: true
default: true
description: "Cache save condition"
run-os:
required: true
default: "ubuntu-latest"
description: "Running system"
runs:
using: "composite"
steps:
- name: Install system dependencies
if: inputs.run-os == 'ubuntu-latest'
shell: bash
run: |
sudo apt update
+11 -3
View File
@@ -11,21 +11,29 @@ on:
jobs:
build-rustfs:
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
variant:
# - { profile: dev, target: x86_64-unknown-linux-musl, glibc: "default" }
- { profile: release, target: x86_64-unknown-linux-musl, glibc: "default" }
- { profile: release, target: x86_64-unknown-linux-gnu, glibc: "default" }
# - { profile: release, target: x86_64-unknown-linux-gnu, glibc: "2.31" }
- { profile: release, target: aarch64-apple-darwin, glibc: "default" }
exclude:
- os: macos-latest
variant: { profile: release, target: x86_64-unknown-linux-gnu, glibc: "default" }
- os: ubuntu-latest
variant: { profile: release, target: aarch64-apple-darwin, glibc: "default" }
- os: macos-latest
variant: { profile: release, target: x86_64-unknown-linux-musl, glibc: "default" }
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup
with:
cache-shared-key: rustfs.${{ matrix.variant.profile }}.${{ matrix.variant.target }}.${{ matrix.variant.glibc }}
run-os: ${{ matrix.os }}
- name: Download and Extract Static Assets
run: |