Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a5a01dc97 | ||
|
|
01dcb4705d | ||
|
|
6508dfa8a7 | ||
|
|
ac4a267d30 | ||
|
|
b4afa40c19 | ||
|
|
96a0334a71 |
@@ -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,10 +140,11 @@ 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
|
||||||
|
|
||||||
- name: Reclaim disk before Android build
|
- name: Reclaim disk before Android build
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -164,19 +166,69 @@ jobs:
|
|||||||
echo "At least 8 GiB of free runner disk is required before the Android build; only $((available_kib / 1024 / 1024)) GiB is available." >&2
|
echo "At least 8 GiB of free runner disk is required before the Android build; only $((available_kib / 1024 / 1024)) GiB is available." >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Build and verify Pixel 10 APK
|
- name: Build and verify Pixel 10 APK
|
||||||
env:
|
env:
|
||||||
|
CARGO_BUILD_JOBS: "2"
|
||||||
|
CARGO_INCREMENTAL: "0"
|
||||||
|
# The previous measured run kept about 16 GiB RAM free. GeckoView's
|
||||||
|
# Jetifier transform needs more than a 1 GiB heap, while two workers
|
||||||
|
# still leave ample headroom for the colocated Gitea instance.
|
||||||
|
JAVA_TOOL_OPTIONS: -XX:ActiveProcessorCount=2
|
||||||
GRADLE_OPTS: >-
|
GRADLE_OPTS: >-
|
||||||
-Dorg.gradle.jvmargs=-Xmx2G
|
-Dorg.gradle.jvmargs=-Xmx4G
|
||||||
-Dorg.gradle.workers.max=2
|
-Dorg.gradle.workers.max=2
|
||||||
|
-Dorg.gradle.parallel=false
|
||||||
-Dorg.gradle.daemon=false
|
-Dorg.gradle.daemon=false
|
||||||
run: melos run build-browser-pixel10 --no-select
|
-Dkotlin.compiler.execution.strategy=in-process
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
- uses: actions/upload-artifact@v4
|
# 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"
|
||||||
|
|
||||||
|
# Gitea's artifact service implements the v3 protocol. The v4 action
|
||||||
|
# rejects non-GitHub servers with GHESNotSupportedError before upload.
|
||||||
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: mrbweblibre-pixel10
|
name: mrbweblibre-pixel10
|
||||||
path: apps/weblibre/build/app/outputs/flutter-apk/app-pixel10-release.apk
|
path: apps/weblibre/build/app/outputs/flutter-apk/app-pixel10-release.apk
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Remove release key
|
- name: Remove release key
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
+2
-1
@@ -32,7 +32,8 @@ the generated assets and native runtime, then run:
|
|||||||
melos run build-browser-pixel10 --no-select
|
melos run build-browser-pixel10 --no-select
|
||||||
```
|
```
|
||||||
|
|
||||||
The command produces:
|
The command asks Flutter for a split ARM64 artifact, verifies that no other
|
||||||
|
ABI is packaged, and publishes it under the stable path:
|
||||||
|
|
||||||
```text
|
```text
|
||||||
apps/weblibre/build/app/outputs/flutter-apk/app-pixel10-release.apk
|
apps/weblibre/build/app/outputs/flutter-apk/app-pixel10-release.apk
|
||||||
|
|||||||
@@ -74,17 +74,15 @@ android {
|
|||||||
manifestPlaceholders = [appName: "WebLibre Alpha (Legacy)", enableImpeller: "false"]
|
manifestPlaceholders = [appName: "WebLibre Alpha (Legacy)", enableImpeller: "false"]
|
||||||
}
|
}
|
||||||
// Pixel 10 devices are 64-bit only and ship a 120 Hz display. Keep a
|
// Pixel 10 devices are 64-bit only and ship a 120 Hz display. Keep a
|
||||||
// separate, side-by-side installable identity for the optimized fork,
|
// separate, side-by-side installable identity for the optimized fork
|
||||||
// retain Impeller, and prevent transitive dependencies from packaging
|
// and retain Impeller. The Pixel 10 build script selects android-arm64
|
||||||
// unused 32-bit native libraries.
|
// with Flutter's ABI split; Gradle forbids combining that split with a
|
||||||
|
// second ndk.abiFilters declaration here.
|
||||||
pixel10 {
|
pixel10 {
|
||||||
dimension "track"
|
dimension "track"
|
||||||
applicationId "cc.mrblake.mrbweblibre"
|
applicationId "cc.mrblake.mrbweblibre"
|
||||||
versionNameSuffix "-pixel10"
|
versionNameSuffix "-pixel10"
|
||||||
manifestPlaceholders = [appName: "MrbWebLibre", enableImpeller: "true"]
|
manifestPlaceholders = [appName: "MrbWebLibre", enableImpeller: "true"]
|
||||||
ndk {
|
|
||||||
abiFilters "arm64-v8a"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+4
-1
@@ -111,5 +111,8 @@ melos:
|
|||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
cd apps/weblibre
|
cd apps/weblibre
|
||||||
flutter build apk --release --flavor pixel10 --target-platform android-arm64 --no-tree-shake-icons
|
flutter build apk --release --flavor pixel10 --target-platform android-arm64 --split-per-abi --no-tree-shake-icons
|
||||||
|
arm64_apk="$(find build/app/outputs/flutter-apk -maxdepth 1 -type f -name '*pixel10*' -name '*arm64-v8a*' -name '*release.apk' -print -quit)"
|
||||||
|
test -n "$arm64_apk"
|
||||||
|
mv "$arm64_apk" build/app/outputs/flutter-apk/app-pixel10-release.apk
|
||||||
../../scripts/verify-pixel10-apk.sh build/app/outputs/flutter-apk/app-pixel10-release.apk
|
../../scripts/verify-pixel10-apk.sh build/app/outputs/flutter-apk/app-pixel10-release.apk
|
||||||
|
|||||||
Reference in New Issue
Block a user