mirror of
https://github.com/rustfs/rustfs.git
synced 2026-01-17 01:30:33 +00:00
# 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:
8
.github/actions/setup/action.yml
vendored
8
.github/actions/setup/action.yml
vendored
@@ -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
|
||||
|
||||
14
.github/workflows/build.yml
vendored
14
.github/workflows/build.yml
vendored
@@ -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: |
|
||||
|
||||
@@ -34,7 +34,7 @@ def main(args: CliArgs):
|
||||
use_zigbuild = True
|
||||
use_old_glibc = True
|
||||
|
||||
if args.target and args.target == "x86_64-unknown-linux-musl":
|
||||
if args.target and args.target != "x86_64-unknown-linux-gnu":
|
||||
shell("rustup target add " + args.target)
|
||||
|
||||
cmd = ["cargo", "build"]
|
||||
|
||||
Reference in New Issue
Block a user