diff --git a/.gitea/android-rustc-low-memory.sh b/.gitea/android-rustc-low-memory.sh new file mode 100755 index 0000000..ccb3bef --- /dev/null +++ b/.gitea/android-rustc-low-memory.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# Explicitly authorized Android CI optimization override, not a workspace release default. +set -euo pipefail +compiler="$1" +shift +crate= target= previous= +for argument in "$@"; do + case "$previous" in --crate-name) crate="$argument" ;; --target) target="$argument" ;; esac + previous="$argument" +done +if [[ "$crate" == teamspeach_native && "$target" == aarch64-linux-android ]]; then + exec "$compiler" "$@" -C codegen-units=256 -C lto=off +fi +exec "$compiler" "$@" diff --git a/.gitea/build-android-variant.sh b/.gitea/build-android-variant.sh index 78decc2..c173b43 100644 --- a/.gitea/build-android-variant.sh +++ b/.gitea/build-android-variant.sh @@ -8,6 +8,10 @@ case "$variant" in *) echo "Expected harness or production" >&2; exit 2 ;; esac out="dist/android/$variant" +if [[ "${TEAMSPEACH_ANDROID_LOW_MEMORY:-false}" == true ]]; then + [[ "$TARGET" == aarch64-linux-android ]] || { echo 'Low-memory CI mode is Android ARM64 only' >&2; exit 1; } + export RUSTC_WORKSPACE_WRAPPER="$PWD/.gitea/android-rustc-low-memory.sh" +fi cargo run --locked -p xtask -- build --target "$TARGET" --llvm-dir "$LLVM_HOME" --skia-source "$SKIA_SOURCE_DIR" --test-harness "$harness" --jobs "${CARGO_BUILD_JOBS:-1}" # Explicit online dependency resolution supports a fresh Gradle cache. # Bootstrap still requires the local checksum-pinned zip; SDK downloads stay disabled. @@ -38,5 +42,7 @@ for path in files: for chunk in iter(lambda: source.read(1024 * 1024), b''): digest.update(chunk) hashes[str(path.relative_to(out))] = digest.hexdigest() -(out / 'build-info.json').write_text(json.dumps({'schema': 1, 'revision': revision, 'run_id': os.environ['CI_RUN_ID'], 'target': target, 'testHarness': harness, 'gradleOnline': True, 'deviceAcceptance': 'not exercised', 'publicationAuthorized': False, 'sha256': hashes}, indent=2) + '\n') +low_memory = os.environ.get('TEAMSPEACH_ANDROID_LOW_MEMORY') == 'true' +optimization = {'scope': 'teamspeach_native/aarch64-linux-android', 'codegenUnits': 256, 'lto': 'off'} if low_memory else {'scope': 'workspace release defaults'} +(out / 'build-info.json').write_text(json.dumps({'schema': 1, 'revision': revision, 'run_id': os.environ['CI_RUN_ID'], 'target': target, 'testHarness': harness, 'gradleOnline': True, 'optimization': optimization, 'deviceAcceptance': 'not exercised', 'publicationAuthorized': False, 'sha256': hashes}, indent=2) + '\n') PY diff --git a/.gitea/workflows/android.yml b/.gitea/workflows/android.yml index ccfc746..55948c5 100644 --- a/.gitea/workflows/android.yml +++ b/.gitea/workflows/android.yml @@ -170,6 +170,7 @@ jobs: if: ${{ github.event.inputs.mode != 'inventory' }} run: | set -euo pipefail + export TEAMSPEACH_ANDROID_LOW_MEMORY=true mkdir -p .android-ci/diagnostics bash .gitea/android-memory-report.sh | tee .android-ci/diagnostics/before.txt trap 'status=$?; trap - EXIT; bash .gitea/android-memory-report.sh | tee .android-ci/diagnostics/after.txt; exit "$status"' EXIT diff --git a/CHANGELOG.md b/CHANGELOG.md index 48a2ef1..43b409c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ no automatic releases, production signing or device actions. Local Windows limits remain separate. - Fixed restored Android WebRTC checkpoints: validate and reverse receipt-matched source patches before gclient synchronization, then reapply pinned patches without deleting compiled objects. +- Added explicitly authorized Android CI low-memory native code generation (256 units, LTO off), + scoped to the ARM64 application crate and recorded in build-info; full Skia/WebRTC features retained. - Android onboarding is now a full-screen page with a one-line 48dp nickname field, visible theme choices, errors and Create/Cancel buttons; keyboard insets are handled before profile creation. diff --git a/README.md b/README.md index 146f930..7f49ede 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,11 @@ Four Cargo/Ninja/CMake jobs and a six-hour job deadline bound CI workload; the d one-job memory policy and Windows-only optimization overrides do not apply here. `xtask deps` regenerates dependency provenance; `build/package/verify-package` use the existing full Skia+WebRTC path. Production signing environment is rejected. +After an unpaused CI compilation was killed, the owner explicitly authorized low-memory Android CI +optimization: only `teamspeach_native` for `aarch64-linux-android` gets codegen-units256 and lto=off +through `.gitea/android-rustc-low-memory.sh`. Full features remain enabled; `build-info.json` records +this variant. Other crates/targets and shared release defaults are unchanged. Local builds opt in only +with `TEAMSPEACH_ANDROID_LOW_MEMORY=true`; this is not an implicit Windows setting. Tools/downloads/SDK/Skia/Gradle/Cargo caches live under ignored `.android-ci/`; Actions cache v3 keys include tool pins, Cargo.lock and source SHA, restoring only within the same tool/dependency prefix. diff --git a/docs/mobile-port-progress.md b/docs/mobile-port-progress.md index efe412e..b52b17c 100644 --- a/docs/mobile-port-progress.md +++ b/docs/mobile-port-progress.md @@ -85,6 +85,11 @@ Updated **2026-11-11**. Windows baseline remains `05e8d34bcf0e24a44f76e65220293c in src/buildtools. Added CI-only pre-sync receipt-bound reversal of exact applied_source_diffs; unexpected modifications abort, object files retained, xtask reapplies pinned patches afterward. Real temporary Git fixture passed reversal/output-retention and mismatch-rejection checks. +- Run4857 restored caches and completed deps in2m36s; native rustc again SIGKILL, oom_kill0→1. + User explicitly confirmed **this run was not paused** and authorized a low-memory mode ONLY for + Android CI: teamspeach_native/aarch64-linux-android codegen-units256, lto=off. Added opt-in workspace + rustc wrapper with exact crate/target matching; build-info records optimization. Real wrapper scope + smoke passed for Android native versus Windows native and Android core; no release defaults changed. ## First Android APK build