mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
build: retire Pi Mobile's APK workflow and hook; check apps/p2 instead
Pi Mobile (apps/mobile in pi-private) is replaced by p2 (apps/p2). The Android APK workflow and its pre-commit check go; the hook runs p2's own check when apps/p2 exists (only in pi-private).
This commit is contained in:
parent
da0eadf043
commit
b0ac39687a
2 changed files with 6 additions and 102 deletions
96
.github/workflows/android-apk.yml
vendored
96
.github/workflows/android-apk.yml
vendored
|
|
@ -1,96 +0,0 @@
|
|||
name: Android APK
|
||||
|
||||
# Builds the standalone Pi Mobile APK (apps/mobile/platforms/android). The bundled runtime keeps the monorepo layout
|
||||
# and runs the workspace packages from source, so it needs their generated model data and the pi-env daemons too.
|
||||
# apps/ exists only in pi-private; the jobs do nothing elsewhere.
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [private]
|
||||
paths:
|
||||
- 'apps/mobile/**'
|
||||
- 'packages/ai/**'
|
||||
- 'packages/chord/**'
|
||||
- 'packages/durable/**'
|
||||
- 'packages/env/**'
|
||||
- 'packages/telemetry/**'
|
||||
- 'packages/coding-agent/src/experimental/source-resolver.ts'
|
||||
- 'package.json'
|
||||
- 'package-lock.json'
|
||||
- 'tsconfig.json'
|
||||
- 'tsconfig.base.json'
|
||||
- '.github/workflows/android-apk.yml'
|
||||
- '.github/workflows/env-daemons.yml'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
# The daemon for the phone runs terminals; the others serve remote environments.
|
||||
env-daemons:
|
||||
if: github.repository == 'earendil-works/pi-private'
|
||||
uses: ./.github/workflows/env-daemons.yml
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
apk:
|
||||
needs: env-daemons
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 40
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
with:
|
||||
node-version: '26.4.0'
|
||||
cache: npm
|
||||
- name: Install host check dependencies without lifecycle scripts
|
||||
run: npm ci --ignore-scripts
|
||||
- name: Generate the model data of pi-ai
|
||||
run: npm run hydrate:model-data
|
||||
- name: Check the app (host dependencies)
|
||||
working-directory: apps/mobile
|
||||
run: npm run check
|
||||
- name: Fetch the pi-env daemons
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: pi-env-*
|
||||
path: packages/env/bin
|
||||
- name: Check the pi-env daemons
|
||||
run: |
|
||||
test -s packages/env/bin/pi-env-android-arm64/pi-env
|
||||
chmod +x packages/env/bin/*/pi-env*
|
||||
ls -lR packages/env/bin
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: '21'
|
||||
- uses: android-actions/setup-android@v3
|
||||
with:
|
||||
packages: platform-tools
|
||||
- uses: gradle/actions/setup-gradle@v4
|
||||
- name: Install SDK 35
|
||||
run: sdkmanager 'platforms;android-35' 'build-tools;35.0.0'
|
||||
- name: Test Android archive validation
|
||||
working-directory: apps/mobile
|
||||
run: node --test test/android-installer.test.ts
|
||||
- name: Package Termux ARM64 tools and TLS certificates
|
||||
run: python3 apps/mobile/platforms/android/scripts/package-rootfs.py
|
||||
- name: Stage Android runtime separately and verify native bindings
|
||||
run: python3 apps/mobile/platforms/android/scripts/package-runtime.py
|
||||
- name: Preserve the debug signing key for installable updates
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.android/debug.keystore
|
||||
key: pi-mobile-debug-signing-v1
|
||||
- name: Assemble debug APK
|
||||
working-directory: apps/mobile/platforms/android
|
||||
run: bash ./gradlew --no-daemon assembleDebug
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pi-mobile-debug-arm64
|
||||
path: |
|
||||
apps/mobile/platforms/android/app/build/outputs/apk/debug/*.apk
|
||||
apps/mobile/platforms/android/app/src/main/assets/termux-packages.json
|
||||
apps/mobile/platforms/android/app/src/main/assets/runtime-version
|
||||
if-no-files-found: error
|
||||
retention-days: 14
|
||||
|
|
@ -16,16 +16,16 @@ if [ $? -ne 0 ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
# Pi Mobile has its own check (own biome.json, TypeScript 5.9; apps/ is outside the root Biome and tsc configs).
|
||||
# p2 has its own check (own biome.json, TypeScript 5.9; apps/ is outside the root Biome and tsc configs).
|
||||
# apps/ exists only in pi-private.
|
||||
if [ -d apps/mobile ]; then
|
||||
if [ -d apps/p2 ]; then
|
||||
for file in $STAGED_FILES; do
|
||||
case "$file" in
|
||||
apps/mobile/*|packages/*|package.json|package-lock.json|tsconfig.json|tsconfig.base.json)
|
||||
echo "Checking apps/mobile..."
|
||||
npm --prefix apps/mobile run check
|
||||
apps/p2/*|packages/*|package.json|package-lock.json|tsconfig.json|tsconfig.base.json)
|
||||
echo "Checking apps/p2..."
|
||||
npm --prefix apps/p2 run check
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "❌ apps/mobile checks failed."
|
||||
echo "❌ apps/p2 checks failed."
|
||||
exit 1
|
||||
fi
|
||||
break
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue