fix(ci): bound and slim Pixel 10 build
Pixel 10 APK / build (push) Failing after 35m20s

This commit is contained in:
Codex
2026-08-10 06:35:51 +02:00
parent 96a0334a71
commit b4afa40c19
+46 -1
View File
@@ -9,6 +9,7 @@ on:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 45
env: env:
KEY_JKS: ${{ secrets.PIXEL10_KEY_JKS }} KEY_JKS: ${{ secrets.PIXEL10_KEY_JKS }}
KEY_PATH: ${{ github.workspace }}/apps/weblibre/pixel10-release.jks KEY_PATH: ${{ github.workspace }}/apps/weblibre/pixel10-release.jks
@@ -139,6 +140,8 @@ jobs:
env: env:
SING_BOX_SOURCE: ${{ runner.temp }}/sing-box SING_BOX_SOURCE: ${{ runner.temp }}/sing-box
IPTPROXY_SOURCE: ${{ runner.temp }}/IPtProxy IPTPROXY_SOURCE: ${{ runner.temp }}/IPtProxy
# Pixel 10 is ARM64-only. Avoid building and storing three unused ABIs.
TARGET: android/arm64
# Go writes verbose compiler progress to stderr. Gitea's act runner # Go writes verbose compiler progress to stderr. Gitea's act runner
# otherwise labels every one of those harmless lines as "ERROR". # otherwise labels every one of those harmless lines as "ERROR".
run: melos run build-go-runtime --no-select 2>&1 run: melos run build-go-runtime --no-select 2>&1
@@ -165,6 +168,8 @@ jobs:
fi fi
- name: Build and verify Pixel 10 APK - name: Build and verify Pixel 10 APK
env: env:
CARGO_BUILD_JOBS: "1"
CARGO_INCREMENTAL: "0"
# Keep the colocated Gitea instance responsive on a small host. # Keep the colocated Gitea instance responsive on a small host.
JAVA_TOOL_OPTIONS: -XX:ActiveProcessorCount=1 JAVA_TOOL_OPTIONS: -XX:ActiveProcessorCount=1
GRADLE_OPTS: >- GRADLE_OPTS: >-
@@ -173,7 +178,47 @@ jobs:
-Dorg.gradle.parallel=false -Dorg.gradle.parallel=false
-Dorg.gradle.daemon=false -Dorg.gradle.daemon=false
-Dkotlin.compiler.execution.strategy=in-process -Dkotlin.compiler.execution.strategy=in-process
run: melos run build-browser-pixel10 --no-select shell: bash
run: |
set -euo pipefail
# A deadlocked native build used to stay alive until act_runner's
# three-hour job container expired. Keep a hard local deadline and
# emit a heartbeat so a stalled or disk-starved build is obvious.
timeout --foreground --signal=TERM --kill-after=1m 30m \
melos run build-browser-pixel10 --no-select &
build_pid=$!
monitor_resources() {
while kill -0 "$build_pid" 2>/dev/null; do
sleep 60
kill -0 "$build_pid" 2>/dev/null || return 0
available_kib="$(df -Pk / | awk 'NR == 2 { print $4 }')"
echo "Pixel 10 build heartbeat: $((available_kib / 1024 / 1024)) GiB disk available"
awk '/MemAvailable:/ { printf "Memory available: %.1f GiB\n", $2 / 1024 / 1024 }' /proc/meminfo
if (( available_kib < 2 * 1024 * 1024 )); then
echo "Stopping Android build before the runner disk is exhausted." >&2
kill -TERM "$build_pid" 2>/dev/null || true
return 1
fi
done
}
monitor_resources &
monitor_pid=$!
cleanup_monitor() {
kill "$monitor_pid" 2>/dev/null || true
wait "$monitor_pid" 2>/dev/null || true
}
trap cleanup_monitor EXIT
set +e
wait "$build_pid"
build_status=$?
set -e
exit "$build_status"
- uses: actions/upload-artifact@v4 - uses: actions/upload-artifact@v4
with: with: