ci: run check + APK build natively on the MacBook runner
Some checks failed
Build & Release APK / check (push) Has been cancelled
Build & Release APK / build (push) Has been cancelled

The desktop runner is gone. Jobs now target label "macbook": a
gitea-runner in host mode on the MacBook Air using Homebrew JDK 21,
the local Android SDK and node 22, so no container or SDK download.
eas.json bumped to 1.22 to match the locally built release.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wmf3K9nCoEsXvvwkmMnuiM
This commit is contained in:
marcuspaico
2026-09-05 17:44:25 +10:00
parent 18a66aba58
commit 26922af997
3 changed files with 26 additions and 36 deletions

View File

@@ -8,17 +8,17 @@ jobs:
check:
# Fast fail: lockfile sync, types, lint — catches in ~2 min what would
# otherwise kill the APK build twenty minutes in.
runs-on: desktop
container:
image: node:22
runs-on: macbook
steps:
- name: Checkout
run: |
git init -q .
git fetch -q --depth 1 "https://git.rehbock.xyz/${{ github.repository }}.git" "${{ github.sha }}"
git checkout -q FETCH_HEAD
git checkout -q -f FETCH_HEAD
git clean -qfd
- name: Lockfile + typecheck + lint
run: |
export PATH="$HOME/.hermes/node/bin:$PATH"
cd app
npm ci --no-audit --no-fund
npx tsc --noEmit
@@ -35,49 +35,38 @@ jobs:
build:
needs: check
# RN/NDK builds starve the 4-core VPS — run on the desktop runner
# (marcusDesktop). Jobs queue while the desktop is off and start when it
# comes online; switch back to ubuntu-latest to build on the VPS.
runs-on: desktop
container:
image: eclipse-temurin:21-jdk
# Runs natively on the MacBook Air (gitea-runner in host mode, label
# "macbook"): Java 21 from Homebrew, the Android SDK from Android Studio,
# node 22 from ~/.hermes. No container, no SDK download.
runs-on: macbook
env:
ANDROID_HOME: /Users/marcus/Library/Android/sdk
JAVA_HOME: /opt/homebrew/opt/openjdk@21/libexec/openjdk.jdk/Contents/Home
steps:
# actions/checkout needs node, which this container lacks — clone directly
- name: Checkout
run: |
apt-get update -qq && apt-get install -y -qq git unzip curl >/dev/null
git init -q .
git fetch -q --depth 1 "https://git.rehbock.xyz/${{ github.repository }}.git" "${{ github.sha }}"
git checkout -q FETCH_HEAD
git checkout -q -f FETCH_HEAD
git clean -qfd
- name: Install Node.js
- name: Toolchain
run: |
curl -fsSL https://deb.nodesource.com/setup_22.x | bash - >/dev/null 2>&1
apt-get install -y -qq nodejs >/dev/null
export PATH="$HOME/.hermes/node/bin:$PATH"
node --version
- name: Install Android SDK
# $HOME/android-sdk is a persistent runner volume — skip when warm.
run: |
if [ ! -d "$HOME/android-sdk/platforms/android-36" ]; then
mkdir -p "$HOME/android-sdk/cmdline-tools"
curl -sLo /tmp/ct.zip https://dl.google.com/android/repository/commandlinetools-linux-11076708_latest.zip
unzip -q /tmp/ct.zip -d /tmp
mv /tmp/cmdline-tools "$HOME/android-sdk/cmdline-tools/latest"
yes | "$HOME/android-sdk/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$HOME/android-sdk" --licenses >/dev/null 2>&1 || true
"$HOME/android-sdk/cmdline-tools/latest/bin/sdkmanager" --sdk_root="$HOME/android-sdk" \
"platform-tools" "platforms;android-36" "build-tools;36.0.0" >/dev/null
else
echo "SDK cache warm — skipping install"
fi
"$JAVA_HOME/bin/java" -version
test -d "$ANDROID_HOME/platforms/android-36"
test -d "$ANDROID_HOME/build-tools/36.0.0"
- name: Install app dependencies
run: cd app && npm ci --no-audit --no-fund
run: |
export PATH="$HOME/.hermes/node/bin:$PATH"
cd app && npm ci --no-audit --no-fund
- name: Decode signing keystore
env:
KEYSTORE_B64: ${{ secrets.KEYSTORE_B64 }}
run: echo "$KEYSTORE_B64" | base64 -d > /tmp/release.jks
run: echo "$KEYSTORE_B64" | base64 --decode > /tmp/release.jks
- name: Build signed release APK
env:
@@ -90,7 +79,7 @@ jobs:
VERSION_CODE: ${{ github.run_number }}
VERSION_NAME: 1.${{ github.run_number }}
run: |
export ANDROID_HOME="$HOME/android-sdk"
export PATH="$HOME/.hermes/node/bin:$PATH"
cd app/android
echo "sdk.dir=$ANDROID_HOME" > local.properties
./gradlew assembleRelease --no-daemon --console=plain