Compare commits

..

2 Commits

Author SHA1 Message Date
19d4cbce27 Use shell-based check-before-install for all build jobs
Some checks failed
Build App / build-macos (push) Successful in 2m34s
Build App / build-windows (push) Successful in 2m33s
Build App / build-linux (push) Failing after 3m40s
Replace JS-based GitHub Actions (dtolnay/rust-toolchain,
actions/setup-node) in the Linux job with shell commands that
check if Rust and Node.js are already present before installing.
All three jobs (Linux, macOS, Windows) now use the same pattern:
skip installation if the tool is already available on the runner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-01 17:03:17 -08:00
946ea03956 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>
2026-03-01 17:00:48 -08:00
2 changed files with 98 additions and 23 deletions

View File

@@ -61,17 +61,29 @@ jobs:
xdg-utils
- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable
- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./app/src-tauri -> target"
run: |
if command -v rustup &>/dev/null; then
echo "Rust already installed: $(rustc --version)"
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
rustc --version
cargo --version
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
run: |
if command -v node &>/dev/null; then
echo "Node.js already installed: $(node --version)"
else
echo "Installing Node.js 22..."
curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -
sudo apt-get install -y nodejs
fi
node --version
npm --version
- name: Install frontend dependencies
working-directory: ./app
@@ -122,6 +134,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 +168,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 +190,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

View File

@@ -1,6 +1,6 @@
# Building Triple-C
Triple-C is a Tauri v2 desktop application with a React/TypeScript frontend and a Rust backend. This guide covers building the app from source on Linux and Windows.
Triple-C is a Tauri v2 desktop application with a React/TypeScript frontend and a Rust backend. This guide covers building the app from source on Linux, macOS, and Windows.
## Prerequisites (All Platforms)
@@ -79,6 +79,57 @@ Build artifacts are located in `app/src-tauri/target/release/bundle/`:
| Debian pkg | `deb/*.deb` |
| RPM pkg | `rpm/*.rpm` |
## macOS
### 1. Install prerequisites
- **Xcode Command Line Tools** — required for the C/C++ toolchain and system headers:
```bash
xcode-select --install
```
No additional system libraries are needed — macOS includes WebKit natively.
### 2. Install Rust targets (universal binary)
To build a universal binary that runs on both Apple Silicon and Intel Macs:
```bash
rustup target add aarch64-apple-darwin x86_64-apple-darwin
```
### 3. Install frontend dependencies
```bash
cd app
npm ci
```
### 4. Build
For a universal binary (recommended for distribution):
```bash
npx tauri build --target universal-apple-darwin
```
For the current architecture only (faster, for local development):
```bash
npx tauri build
```
Build artifacts are located in `app/src-tauri/target/universal-apple-darwin/release/bundle/` (or `target/release/bundle/` for single-arch builds):
| Format | Path |
|--------|------|
| DMG | `dmg/*.dmg` |
| macOS App | `macos/*.app` |
| macOS App (compressed) | `macos/*.app.tar.gz` |
> **Note:** The app is not signed or notarized. On first launch, macOS Gatekeeper may block it. Right-click the app and select "Open" to bypass, or remove the quarantine attribute: `xattr -cr /Applications/Triple-C.app`
## Windows
### 1. Install prerequisites