Fix macOS CI build and add macOS build instructions
Some checks failed
Build App / build-windows (push) Has started running
Build App / build-linux (push) Has been cancelled
Build App / build-macos (push) Has been cancelled

The macOS Gitea runner lacks Node.js, causing actions/checkout@v4
(a JS action) to fail with "Cannot find: node in PATH". Fixed by
installing Node.js via Homebrew before checkout and replacing all
JS-based actions (setup-node, rust-toolchain, rust-cache) with
shell equivalents.

Also adds macOS section to BUILDING.md covering Xcode CLI tools,
universal binary targets, and Gatekeeper bypass instructions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-01 17:00:48 -08:00
parent ba4cb4176d
commit 946ea03956
2 changed files with 77 additions and 14 deletions

View File

@@ -122,6 +122,18 @@ jobs:
build-macos:
runs-on: macos-latest
steps:
- name: Install Node.js
run: |
if command -v node &>/dev/null; then
echo "Node.js already installed: $(node --version)"
else
echo "Installing Node.js 22 via Homebrew..."
brew install node@22
brew link --overwrite node@22
fi
node --version
npm --version
- name: Checkout
uses: actions/checkout@v4
with:
@@ -144,19 +156,17 @@ jobs:
echo "Patched version to ${VERSION}"
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
with:
targets: aarch64-apple-darwin,x86_64-apple-darwin
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./app/src-tauri -> target"
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
run: |
if command -v rustup &>/dev/null; then
rustup update stable
rustup default stable
else
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
. "$HOME/.cargo/env"
fi
rustup target add aarch64-apple-darwin x86_64-apple-darwin
rustc --version
cargo --version
- name: Install frontend dependencies
working-directory: ./app
@@ -168,6 +178,8 @@ jobs:
- name: Build Tauri app (universal)
working-directory: ./app
env:
PATH: ${{ format('{0}/.cargo/bin:{1}', env.HOME, env.PATH) }}
run: npx tauri build --target universal-apple-darwin
- name: Collect artifacts