Use all available Android runner CPUs while preserving compatible caches
android-ci / android-arm64 (push) Successful in 12m28s
android-ci / android-arm64 (push) Successful in 12m28s
This commit is contained in:
1 parent
e443f9aebc
commit
cec86d8e3d
5 files changed
+36
-9
No files matched your search
@@ -63,7 +63,7 @@ def compatibility():
|
|||||||
'RUSTUP_HOME', 'HOME', 'LLVM_HOME', 'LIBCLANG_PATH',
|
'RUSTUP_HOME', 'HOME', 'LLVM_HOME', 'LIBCLANG_PATH',
|
||||||
'ANDROID_SDK_ROOT', 'ANDROID_NDK_ROOT', 'ANDROID_API_LEVEL',
|
'ANDROID_SDK_ROOT', 'ANDROID_NDK_ROOT', 'ANDROID_API_LEVEL',
|
||||||
'SKIA_SOURCE_DIR', 'SKIA_GN_COMMAND', 'SKIA_NINJA_COMMAND',
|
'SKIA_SOURCE_DIR', 'SKIA_GN_COMMAND', 'SKIA_NINJA_COMMAND',
|
||||||
'SKIA_FORCE_BUILD', 'CMAKE_BUILD_PARALLEL_LEVEL')}
|
'SKIA_FORCE_BUILD')}
|
||||||
environment.update({name: value for name, value in os.environ.items()
|
environment.update({name: value for name, value in os.environ.items()
|
||||||
if name.startswith(('CARGO_PROFILE_', 'CARGO_TARGET_'))})
|
if name.startswith(('CARGO_PROFILE_', 'CARGO_TARGET_'))})
|
||||||
return {
|
return {
|
||||||
@@ -112,8 +112,13 @@ def load(contract, path=RECEIPT):
|
|||||||
if path == RECEIPT and not path.exists():
|
if path == RECEIPT and not path.exists():
|
||||||
return {'inputs': {}, 'completed_ns': 0}
|
return {'inputs': {}, 'completed_ns': 0}
|
||||||
data = json.loads(path.read_text())
|
data = json.loads(path.read_text())
|
||||||
if (data['schema'] != 2 or data['compatibility'] != contract
|
recorded = data.get('compatibility', {})
|
||||||
or data['identity'] != identity(contract) or data['workspace'] != str(ROOT)):
|
comparable = {**recorded, 'environment': dict(recorded.get('environment', {}))}
|
||||||
|
# Scheduling is not an artifact compatibility boundary. Accept the earlier
|
||||||
|
# explicit four-job receipt only after all actual tool/profile inputs match.
|
||||||
|
comparable['environment'].pop('CMAKE_BUILD_PARALLEL_LEVEL', None)
|
||||||
|
if (data['schema'] != 2 or comparable != contract
|
||||||
|
or data['identity'] != identity(recorded) or data['workspace'] != str(ROOT)):
|
||||||
# v1's opaque content identity cannot prove configuration compatibility
|
# v1's opaque content identity cannot prove configuration compatibility
|
||||||
# after a manifest change. Start a new cache generation, never guess.
|
# after a manifest change. Start a new cache generation, never guess.
|
||||||
raise ValueError('Application cache compatibility/workspace mismatch (requires v2 receipt)')
|
raise ValueError('Application cache compatibility/workspace mismatch (requires v2 receipt)')
|
||||||
@@ -180,6 +185,8 @@ def main():
|
|||||||
if action == 'key':
|
if action == 'key':
|
||||||
with open(os.environ['GITHUB_OUTPUT'], 'a') as out:
|
with open(os.environ['GITHUB_OUTPUT'], 'a') as out:
|
||||||
out.write(f'key={identity(contract)}\n')
|
out.write(f'key={identity(contract)}\n')
|
||||||
|
previous = {**contract, 'environment': {**contract['environment'], 'CMAKE_BUILD_PARALLEL_LEVEL': '4'}}
|
||||||
|
out.write(f'previous-parallelism-key={identity(previous)}\n')
|
||||||
return
|
return
|
||||||
previous = load(contract)
|
previous = load(contract)
|
||||||
if action == 'sources':
|
if action == 'sources':
|
||||||
|
|||||||
@@ -33,10 +33,8 @@ jobs:
|
|||||||
CI_RUN_ID: ${{ github.run_id }}
|
CI_RUN_ID: ${{ github.run_id }}
|
||||||
ANDROID_CI_PROVISION: container
|
ANDROID_CI_PROVISION: container
|
||||||
CARGO_TERM_COLOR: never
|
CARGO_TERM_COLOR: never
|
||||||
CARGO_BUILD_JOBS: "4"
|
|
||||||
TEAMSPEACH_ANDROID_LOW_MEMORY: "false"
|
TEAMSPEACH_ANDROID_LOW_MEMORY: "false"
|
||||||
CARGO_TARGET_DIR: ${{ github.workspace }}/.android-ci/cargo-target
|
CARGO_TARGET_DIR: ${{ github.workspace }}/.android-ci/cargo-target
|
||||||
CMAKE_BUILD_PARALLEL_LEVEL: "4"
|
|
||||||
steps:
|
steps:
|
||||||
- name: Resource gate before checkout, cache restore or tool installation
|
- name: Resource gate before checkout, cache restore or tool installation
|
||||||
id: resources
|
id: resources
|
||||||
@@ -63,6 +61,10 @@ jobs:
|
|||||||
available=0
|
available=0
|
||||||
while read -r key value unit; do if [ "$key" = MemAvailable: ]; then available=$value; fi; done < /proc/meminfo
|
while read -r key value unit; do if [ "$key" = MemAvailable: ]; then available=$value; fi; done < /proc/meminfo
|
||||||
if (( available < 8388608 )); then echo 'BLOCKED: at least 8 GiB available RAM required'; exit 1; fi
|
if (( available < 8388608 )); then echo 'BLOCKED: at least 8 GiB available RAM required'; exit 1; fi
|
||||||
|
jobs=$(nproc)
|
||||||
|
[[ "$jobs" =~ ^[1-9][0-9]*$ ]] || { echo 'Cannot determine available runner CPUs'; exit 1; }
|
||||||
|
printf 'Using all available runner CPUs: %s Cargo/Ninja/CMake jobs\n' "$jobs"
|
||||||
|
printf 'CARGO_BUILD_JOBS=%s\nCMAKE_BUILD_PARALLEL_LEVEL=%s\n' "$jobs" "$jobs" >> "$GITHUB_ENV"
|
||||||
|
|
||||||
- name: Bootstrap utilities inside the disposable job container
|
- name: Bootstrap utilities inside the disposable job container
|
||||||
if: ${{ github.event.inputs.mode != 'inventory' }}
|
if: ${{ github.event.inputs.mode != 'inventory' }}
|
||||||
@@ -124,6 +126,7 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ steps.application-key.outputs.key }}-${{ github.sha }}-
|
${{ steps.application-key.outputs.key }}-${{ github.sha }}-
|
||||||
${{ steps.application-key.outputs.key }}-
|
${{ steps.application-key.outputs.key }}-
|
||||||
|
${{ steps.application-key.outputs.previous-parallelism-key }}-
|
||||||
|
|
||||||
- name: Restore timestamps only for content-matched Cargo source inputs
|
- name: Restore timestamps only for content-matched Cargo source inputs
|
||||||
if: ${{ github.event.inputs.mode != 'inventory' }}
|
if: ${{ github.event.inputs.mode != 'inventory' }}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
|
- Android CI uses all CPUs available to the runner container for Cargo/Ninja/CMake; scheduling changes
|
||||||
|
retain compatible Cargo artifacts without changing optimization or local Windows resource limits.
|
||||||
- Bootstrap creation/recovery now shares validation and worker-owned persistence, preserves committed
|
- Bootstrap creation/recovery now shares validation and worker-owned persistence, preserves committed
|
||||||
identities on retry, acknowledges service initialization failures and publishes revisioned terminal
|
identities on retry, acknowledges service initialization failures and publishes revisioned terminal
|
||||||
errors. UI queue rejection and background snapshots no longer strand or reset pending form state.
|
errors. UI queue rejection and background snapshots no longer strand or reset pending form state.
|
||||||
|
|||||||
@@ -110,12 +110,12 @@ expansion, host installation, privileged Docker socket or deletion of other jobs
|
|||||||
checksummed pinned downloads listed in `.gitea/android-ci-tools.json`: Rust1.96.0, SDK36,
|
checksummed pinned downloads listed in `.gitea/android-ci-tools.json`: Rust1.96.0, SDK36,
|
||||||
build-tools36.0.0, NDK28.2.13676358, Gradle8.14.3, synced Skia m153-0.101.2 and bundletool.
|
build-tools36.0.0, NDK28.2.13676358, Gradle8.14.3, synced Skia m153-0.101.2 and bundletool.
|
||||||
The output environment also supplies full NDK, ANDROID_JAR and Skia inputs needed by the real first build.
|
The output environment also supplies full NDK, ANDROID_JAR and Skia inputs needed by the real first build.
|
||||||
Four Cargo/Ninja/CMake jobs and a six-hour job deadline bound CI workload; the developer PC's
|
CI uses every CPU available to its container (`nproc`) for Cargo/Ninja/CMake, with a six-hour job deadline;
|
||||||
one-job memory policy and Windows-only optimization overrides do not apply here. `xtask deps`
|
the developer PC's one-job memory policy and Windows-only optimization overrides do not apply here. `xtask deps`
|
||||||
regenerates dependency provenance; `build/package/verify-package` use the
|
regenerates dependency provenance; `build/package/verify-package` use the
|
||||||
existing full Skia+WebRTC path. Production signing environment is rejected.
|
existing full Skia+WebRTC path. Production signing environment is rejected.
|
||||||
After moving the runner, Android CI defaults to the normal workspace release optimization with four
|
Android CI uses normal workspace release optimization with runner-wide parallelism.
|
||||||
jobs. Only if a new build demonstrates memory exhaustion may the separately authorized low-memory
|
Only if a new build demonstrates memory exhaustion may the separately authorized low-memory
|
||||||
fallback be enabled: `TEAMSPEACH_ANDROID_LOW_MEMORY=true` selects codegen-units256/lto=off for only
|
fallback be enabled: `TEAMSPEACH_ANDROID_LOW_MEMORY=true` selects codegen-units256/lto=off for only
|
||||||
`teamspeach_native/aarch64-linux-android` through `.gitea/android-rustc-low-memory.sh`. All features stay
|
`teamspeach_native/aarch64-linux-android` through `.gitea/android-rustc-low-memory.sh`. All features stay
|
||||||
enabled and `build-info.json` records the variant. Other targets and Windows settings remain unchanged.
|
enabled and `build-info.json` records the variant. Other targets and Windows settings remain unchanged.
|
||||||
|
|||||||
@@ -214,6 +214,21 @@ Updated **2026-11-11**. Windows baseline remains `05e8d34bcf0e24a44f76e65220293c
|
|||||||
Cold provisioning20m14s included241s Rust download gap and850s gap before Skia sync output;
|
Cold provisioning20m14s included241s Rust download gap and850s gap before Skia sync output;
|
||||||
application build/package10m12s. Starting a documentation-only follow-up to measure compatible warm
|
application build/package10m12s. Starting a documentation-only follow-up to measure compatible warm
|
||||||
cache reuse without changing application sources, manifests or optimization. Phone proof pending.
|
cache reuse without changing application sources, manifests or optimization. Phone proof pending.
|
||||||
|
- Run4869 bundle hashes verified; APK SHA256 `debee000d1d6dd5fd74c55670fac2f64089a193e34271077dd0d628599556f5c`
|
||||||
|
installed on selected TECNO. Real Create(AndroidSmoke) reached main shell; force-stop/cold launch
|
||||||
|
returned to main shell without onboarding. App-scoped logcat contained0 panics/0 verifier-init errors
|
||||||
|
across both inspected PIDs. No microphone grant or TeamSpeak connection performed.
|
||||||
|
- Real gesture-navigation IME proof: Create/Cancel visible above keyboard; dismissal restored full-height
|
||||||
|
onboarding and bottom actions. Evidence `target/desktop-acceptance/android-4869-{onboarding,ime-visible,
|
||||||
|
ime-hidden,created,cold-restart}.png`. Warm validation run4872 on documentation-only `e443f9a` running.
|
||||||
|
- **Warm run4872 SUCCESS (11m17s)**: tools and application cache HIT;832 Cargo build-start stamps
|
||||||
|
preserved exactly,1894/1897 matching inputs restored. Rust release1.63s with no Compiling lines;
|
||||||
|
application/package2m04s versus cold4869's10m12s, provisioning55s versus20m14s. WebRTC restore1m24s
|
||||||
|
plus mandatory deps/provenance3m56s remains. These measurements prove reuse, not full CPU utilization.
|
||||||
|
- Owner explicitly requested all runner resources. Android resource gate now exports `nproc` to
|
||||||
|
Cargo/Ninja/CMake (no fixed4); Windows remains1. Cache contract excludes scheduling count and accepts
|
||||||
|
previous four-job v2 receipt only after checking its full recorded tool/profile/environment identity.
|
||||||
|
Local compatibility fixture passed; full-parallelism CI execution pending.
|
||||||
|
|
||||||
|
|
||||||
## First Android APK build
|
## First Android APK build
|
||||||
|
|||||||
Reference in new issue
Block a user