From 26922af9970039879d87e68b5ef0d1428349e53f Mon Sep 17 00:00:00 2001 From: marcuspaico Date: Sat, 5 Sep 2026 17:44:25 +1000 Subject: [PATCH] ci: run check + APK build natively on the MacBook runner 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 Claude-Session: https://claude.ai/code/session_01Wmf3K9nCoEsXvvwkmMnuiM --- .gitea/workflows/release.yml | 57 +++++++++++++++--------------------- app/.gitignore | 1 + app/eas.json | 4 +-- 3 files changed, 26 insertions(+), 36 deletions(-) diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml index 97bc093..d4c2ddd 100644 --- a/.gitea/workflows/release.yml +++ b/.gitea/workflows/release.yml @@ -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 diff --git a/app/.gitignore b/app/.gitignore index 7ad0672..b8b8422 100644 --- a/app/.gitignore +++ b/app/.gitignore @@ -40,3 +40,4 @@ example # generated native folders (android/ is committed — CI builds it) /ios +*.apk diff --git a/app/eas.json b/app/eas.json index a7c0cd2..3c6fefe 100644 --- a/app/eas.json +++ b/app/eas.json @@ -9,8 +9,8 @@ "buildType": "apk" }, "env": { - "VERSION_CODE": "18", - "VERSION_NAME": "1.18" + "VERSION_CODE": "22", + "VERSION_NAME": "1.22" }, "node": "22.20.0" }