Skip to content

Commit 6f36a2d

Browse files
timabellclaude
andcommitted
feat: Add macOS aarch64 build + support older MacOSX 10.7
Add an aarch64-apple-darwin (Apple Silicon) build target to the CI matrix alongside the existing x86_64-apple-darwin target, so releases include binaries for both Intel and Apple Silicon Macs. The x86_64 build is cross-compiled on the arm64 runner since macos-latest now uses Apple Silicon hardware. Set MACOSX_DEPLOYMENT_TARGET=10.7 for macOS builds so binaries only depend on system features present in OS X 10.7 and older, maximizing compatibility. Update _release.yml to download and publish both macOS artifacts with checksums. Fixes #240 Prompts: - [update macOS ci image · Issue #240 · timabell/gitopolis](#240) - hang on, don't we need to provide for both arch's now there are two cpu arch's on different age macs? - On macOS, we can set MACOSX_DEPLOYMENT_TARGET to 10.7 to only depend on system features present in versions 10.7 and older. ~ https://rust-cli.github.io/book/tutorial/packaging.html#building-binary-releases-on-ci - commit Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent e84ba00 commit 6f36a2d

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/_ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ jobs:
6868
target: x86_64-apple-darwin
6969
artifact_name: gitopolis-macos-x86_64
7070
binary_name: gitopolis
71+
- os: macos-latest
72+
target: aarch64-apple-darwin
73+
artifact_name: gitopolis-macos-aarch64
74+
binary_name: gitopolis
7175
runs-on: ${{ matrix.os }}
7276
steps:
7377
- uses: actions/checkout@v6
@@ -125,6 +129,9 @@ jobs:
125129
VERSION="${VERSION#v}"
126130
sed -i '' "s/0\\.0\\.0-git/$VERSION/" Cargo.toml
127131
sed -i '' "s/0\\.0\\.0-git/$VERSION/" Cargo.lock
132+
- name: Set macOS deployment target
133+
if: runner.os == 'macOS'
134+
run: echo "MACOSX_DEPLOYMENT_TARGET=10.7" >> $GITHUB_ENV
128135
- name: Build
129136
run: cargo build --target ${{ matrix.target }} --release
130137
- name: Test

.github/workflows/_release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,19 @@ jobs:
3939
with:
4040
name: gitopolis-windows-x86_64
4141

42-
- name: Download macOS Build
42+
- name: Download macOS x86_64 Build
4343
uses: actions/download-artifact@v8
4444
with:
4545
name: gitopolis-macos-x86_64
4646

47+
- name: Download macOS aarch64 Build
48+
uses: actions/download-artifact@v8
49+
with:
50+
name: gitopolis-macos-aarch64
51+
4752
- name: Generate SHA256 Checksums
4853
run: |
49-
sha256sum gitopolis-linux-x86_64.tar.gz gitopolis-windows-x86_64.zip gitopolis-macos-x86_64.tar.gz > SHA256SUMS.txt
54+
sha256sum gitopolis-linux-x86_64.tar.gz gitopolis-windows-x86_64.zip gitopolis-macos-x86_64.tar.gz gitopolis-macos-aarch64.tar.gz > SHA256SUMS.txt
5055
5156
- name: Create Release
5257
uses: softprops/action-gh-release@v2
@@ -58,6 +63,7 @@ jobs:
5863
gitopolis-linux-x86_64.tar.gz
5964
gitopolis-windows-x86_64.zip
6065
gitopolis-macos-x86_64.tar.gz
66+
gitopolis-macos-aarch64.tar.gz
6167
SHA256SUMS.txt
6268
6369
- name: Update Version for crates.io

0 commit comments

Comments
 (0)