diff --git a/.github/scripts/gradle-test-events.gradle b/.github/scripts/gradle-test-events.gradle index 039af4bd..106c8413 100644 --- a/.github/scripts/gradle-test-events.gradle +++ b/.github/scripts/gradle-test-events.gradle @@ -1,4 +1,4 @@ -// CI (the apk-macos job of .github/workflows/release.yml): `./gradlew --init-script test` prints every unit +// CI (the apk and apk-macos jobs of .github/workflows/release.yml): `./gradlew --init-script test` prints every unit // test as it starts and ends, with the whole exception of a failure, so that a test that hangs is the last // "STARTED" line of the log and a failure shows its message without the report. Changes nothing else of the build. allprojects { diff --git a/.github/workflows/gpu-patch-check.yml b/.github/workflows/gpu-patch-check.yml index fbbfe8c0..5d0cf89e 100644 --- a/.github/workflows/gpu-patch-check.yml +++ b/.github/workflows/gpu-patch-check.yml @@ -21,7 +21,9 @@ jobs: pin=$(awk '$1=="metal2vulkan" {print $3}' scripts/setup/get-references.sh) echo "pin=$pin" >> "$GITHUB_OUTPUT" - name: Restore executable bits (an upload drops them) - run: git ls-files -z | xargs -0 grep -lZI '^#!' 2>/dev/null | xargs -0 -r chmod +x + # git grep -z: macOS's grep has no -Z, so the old ls-files|xargs grep pipeline handed chmod one + # newline-joined name and the step failed on every runner. + run: git grep -zIl -e '^#!' | xargs -0 -r chmod +x - name: metal2vulkan at the pin run: | set -euo pipefail diff --git a/.github/workflows/metal-plugin.yml b/.github/workflows/metal-plugin.yml new file mode 100644 index 00000000..fbdb6a73 --- /dev/null +++ b/.github/workflows/metal-plugin.yml @@ -0,0 +1,165 @@ +# Build the Metal plug-in (NativeAdrenoMetal.bundle) on a macOS runner: Xcode's iPhoneOS SDK, the pins' +# public sources, this tree's patches — no Apple image, no shared cache (the link uses the SDK's .tbd +# stubs; the plug-in's shared-cache addresses come from userland/metal/hooks/-.json, which +# is committed). Manual run only; download the artifact and stage it on the phone. +# +# Actions -> metal-plugin -> Run workflow, target "iPhone18,2 24A446" +# +# What it builds, and why the flags: docs/gpu.md section 7, userland/metal/build.sh. The bundle's +# oneios-target must be the guest's (the image set's build id), or `oneios-tool image tweaks` will not +# place it; the GPU addon is the same bundle as a kernelkc.gpuaddon sidecar (oneios-tool phone addon). +name: metal-plugin +on: + workflow_dispatch: + inputs: + target: + description: 'The guest to build for: " " (userland/metal/hooks/-.json)' + required: true + default: 'iPhone18,2 24A446' +permissions: + contents: read +jobs: + build: + # xcode-27 is the image that carries the toolchain and SDK this plug-in is built for (iOS 27, arm64e); the + # generic macos-15 label only has Xcode 26 and its queue was starved ("The job was not acquired by Runner of + # type hosted even after multiple attempts"), so two runs in a row built nothing at all. + runs-on: xcode-27 + timeout-minutes: 180 + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + - name: Restore executable bits (an upload drops them) + # git grep -z: macOS's grep has no -Z, so the old ls-files|xargs grep pipeline handed chmod one + # newline-joined name and the step failed on every runner. + run: git grep -zIl -e '^#!' | xargs -0 -r chmod +x + - name: Validate the requested guest target before fetching toolchains + env: + ONEIOS_METAL_TARGET: ${{ inputs.target }} + run: | + set -euo pipefail + target_slug=${ONEIOS_METAL_TARGET/ /-} + case "$target_slug" in + ''|*..*|*[!A-Za-z0-9,._-]*) echo "::error::Invalid Metal target: $ONEIOS_METAL_TARGET"; exit 1 ;; + esac + if [[ "$ONEIOS_METAL_TARGET" != *" "* || "${ONEIOS_METAL_TARGET#* }" == *" "* ]]; then + echo "::error::Target must be ' ': $ONEIOS_METAL_TARGET" + exit 1 + fi + hooks="userland/metal/hooks/$target_slug.json" + [ -s "$hooks" ] || { echo "::error::No checked-in shared-cache hooks for $ONEIOS_METAL_TARGET ($hooks)"; exit 1; } + echo "Using target $ONEIOS_METAL_TARGET with $hooks" + - name: Xcode with the iPhoneOS SDK + timeout-minutes: 5 + run: | + set -euo pipefail + # The newest Xcode the runner has; the build only needs its clang, ld and iPhoneOS SDK. + pick=$(ls -d /Applications/Xcode*.app 2>/dev/null | sort -V | tail -1 || true) + if [ -n "$pick" ]; then sudo xcode-select -s "$pick/Contents/Developer"; fi + xcodebuild -version + sdk=$(xcrun --sdk iphoneos --show-sdk-path) + echo "iPhoneOS SDK: $sdk" + # The plug-in's deployment target: 27.0 when the SDK is 27 or newer, else the SDK's own. + ver=$(sed -n 's/.*"Version" *: *"\([0-9.]*\)".*/\1/p' "$sdk/SDKSettings.json" | head -1) + case "$ver" in + 2[7-9]*|[3-9][0-9]*) min=27.0 ;; + *) min=${ver%.*} ; [ -n "$min" ] || min=26.0 ;; + esac + echo "SDK $ver, the plug-in's deployment target $min" + echo "IOS_MIN=$min" >> "$GITHUB_ENV" + echo "IOS_TARGET=arm64e-apple-ios$min" >> "$GITHUB_ENV" + - name: Homebrew's build tools + timeout-minutes: 20 + run: brew install ninja glslang shaderc spirv-tools bison llvm uv + - name: Build dependencies for the pinned sources + timeout-minutes: 15 + run: | + set -euo pipefail + # Keep the pinned builders' Python dependencies isolated from the runner image. + uv venv --python 3.12 "$RUNNER_TEMP/py" + uv pip install --python "$RUNNER_TEMP/py/bin/python" meson mako pyyaml packaging + echo "$RUNNER_TEMP/py/bin" >> "$GITHUB_PATH" + - name: Rust 1.98.0 with rust-src (the bridge builds std for the guest) + timeout-minutes: 15 + run: | + set -euo pipefail + rustup toolchain install 1.98.0 --profile minimal + rustup +1.98.0 component add rust-src + cargo +1.98.0 --version + - name: The pinned sources + timeout-minutes: 45 + run: | + set -euo pipefail + # The kernel base (Droid-VM-UniXNU, the plug-in's build scripts), then the six the plug-in compiles. + kernel/fetch.sh Droid-VM-UniXNU + scripts/setup/get-references.sh NativeMetal NativeAdreno NativeMobileDisplay AdrenoPM4 metal2vulkan mesa-droidvm + scripts/setup/get-references.sh -l + - name: Check the toolchain (the image's custom stubs are optional) + timeout-minutes: 5 + run: | + set -euo pipefail + if report=$(scripts/setup/ios-toolchain.sh 2>&1); then + printf '%s\n' "$report" + elif [[ "$report" == "ios toolchain: missing: the iOS 27 stubs in "*" (scripts/setup/ios-toolchain.sh --tbd, after the image set is built)" ]]; then + printf '%s\n' "$report" + echo "Using Xcode SDK stubs; this workflow has no guest image-set input." + else + printf '%s\n' "$report" >&2 + echo "::error::The iOS linker toolchain check failed." + exit 1 + fi + - name: Build the bundle and the GPU addon + timeout-minutes: 120 + env: + ONEIOS_METAL_TARGET: ${{ inputs.target }} + JOBS: '6' + run: | + set -euo pipefail + userland/metal/build.sh all 2>&1 | tee metal-build.log + - name: Verify the target-tagged bundle and GPU addon + env: + ONEIOS_METAL_TARGET: ${{ inputs.target }} + run: | + set -euo pipefail + bundle=out/userland/NativeAdrenoMetal.bundle + addon=out/userland/NativeAdrenoMetal.gpuaddon + record=out/userland/NativeAdrenoMetal.build.json + check=out/userland/NativeAdrenoMetal.check.txt + runtime=out/userland/NativeAdrenoMetal.runtime + for file in "$bundle/NativeAdrenoMetal" "$bundle/libvulkan_freedreno.dylib" "$bundle/oneios-target" "$addon" "$record" "$check" "$runtime"; do + [ -s "$file" ] || { echo "::error::Required Metal build output is missing or empty: $file"; exit 1; } + done + [ "$(cat "$bundle/oneios-target")" = "$ONEIOS_METAL_TARGET" ] || { echo "::error::Bundle target does not match $ONEIOS_METAL_TARGET"; exit 1; } + grep -Fq "\"target\": \"$ONEIOS_METAL_TARGET\"" "$record" || { echo "::error::Build record target does not match $ONEIOS_METAL_TARGET"; exit 1; } + grep -Fq '"arch": "arm64e"' "$record" || { echo "::error::Build record does not identify arm64e binaries"; exit 1; } + grep -Fq 'ios macho-check passed' "$record" || { echo "::error::Build record does not confirm the Mach-O check"; exit 1; } + manifest=out/userland/NativeAdrenoMetal.sha256 + find "$bundle" -type f -print0 | xargs -0 shasum -a 256 > "$manifest" + shasum -a 256 "$addon" "$record" "$check" "$runtime" >> "$manifest" + cat "$manifest" + { + echo "### Metal plug-in outputs verified" + echo "- Target: \`$ONEIOS_METAL_TARGET\`" + echo "- Bridge runtime: \`$(cat "$runtime")\`" + echo "- Bundle, arm64e binaries, Mach-O check, build record, and NGPUADD2 sidecar are present." + echo "- SHA-256 manifest: \`out/userland/NativeAdrenoMetal.sha256\`" + } >> "$GITHUB_STEP_SUMMARY" + - name: What was built + if: always() + timeout-minutes: 2 + run: | + set -euo pipefail + { ls -l out/userland 2>/dev/null || true; cat out/userland/NativeAdrenoMetal.build.json 2>/dev/null || true; } | tee -a metal-build.log + - uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 + if: always() + timeout-minutes: 10 + with: + name: NativeAdrenoMetal + if-no-files-found: error + retention-days: 14 + path: | + out/userland/NativeAdrenoMetal.bundle + out/userland/NativeAdrenoMetal.gpuaddon + out/userland/NativeAdrenoMetal.build.json + out/userland/NativeAdrenoMetal.check.txt + out/userland/NativeAdrenoMetal.runtime + out/userland/NativeAdrenoMetal.sha256 + metal-build.log diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bd7fa7b4..615e2451 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ # │ phone and oneios-tool-VERSION-android-arm64 beside the package # ├── apk (ubuntu-24.04) app/ at the head of the fork's branch, JDK 21, tribalfs' packages, # │ ./gradlew test assembleFullDebug, the APK's assets checked -# ├── apk-macos (macos-15) ./gradlew test of the same checkout on a Mac (core:root's script tests) +# ├── apk-macos (xcode-27) ./gradlew test of the same checkout on a Mac (core:root's script tests) # └──────────────── release needs runtime and apk; a tag v* or a dispatch only # # Triggers: a pull request or a push to main builds both and releases nothing. A tag vN.N.N[-suffix] on main builds @@ -96,12 +96,12 @@ jobs: steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Cache the pinned NDK (setup-build.sh's sdkmanager install becomes a restore after the first run) - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 (Node 24) with: path: /usr/local/lib/android/sdk/ndk/28.2.13676358 key: ci-ndk-28.2.13676358 - name: Cache the Rust toolchain and cargo (the warm builds of the tool and of the runtime ride in their target dirs) - uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 + uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0 (Node 24) with: path: | ~/.rustup @@ -179,8 +179,8 @@ jobs: d=$(mktemp -d); zstd -dc out/release/oneios-runtime-$VERSION-arm64.tar.zst | tar -x -C "$d" runtime/package/elf-check.sh "$d" - name: The package holds the runtime's own folders only - # runtime.json, NOTICE, LICENSE, bin/, lib/, scripts/, kernel/xnu.macho and its record: nothing of the - # fork's tree (app/) or any other part of the checkout. + # runtime.json, NOTICE, LICENSE, bin/, lib/, scripts/, kernel/xnu.macho and its record, kernel/gpuaddon and its + # CDHashes: nothing of the fork's tree (app/) or any other part of the checkout. run: | set -euo pipefail a=out/release/oneios-runtime-$VERSION-arm64.tar.zst @@ -271,8 +271,9 @@ jobs: - name: mksh for the script tests run: sudo apt-get install -y --no-install-recommends mksh || echo "::warning::mksh could not be installed; the script tests run under dash only" - name: Unit tests and the debug APK (full edition, no packed sets) + timeout-minutes: 55 working-directory: app/app-android - run: ./gradlew --max-workers=3 test assembleFullDebug + run: timeout --signal=TERM --kill-after=30s 50m ./gradlew --max-workers=3 --console=plain --init-script "$GITHUB_WORKSPACE/.github/scripts/gradle-test-events.gradle" test assembleFullDebug - name: Name the APK, its version id: apk run: | @@ -325,10 +326,14 @@ jobs: # macOS. Homebrew's folders are taken off PATH for the tests, so core:root's harness uses its own stand-ins for # GNU stat, sha256sum, timeout and tac over macOS's own tools (the fork's docs/oneios.md): the case of a Mac without # coreutils. Not a release gate: the release needs runtime and apk only. + # + # xcode-27, not macos-15: both are arm64 macOS images with the Android SDK and JDK 21, but the 3-core macos-15 pool + # was starved ("The job was not acquired by Runner of type hosted even after multiple attempts") and GitHub + # cancelled the job after ~15 minutes, turning every push red while plan/runtime/apk had passed. apk-macos: needs: plan if: needs.plan.outputs.apk == 'true' - runs-on: macos-15 + runs-on: xcode-27 timeout-minutes: 60 permissions: contents: read @@ -360,37 +365,23 @@ jobs: "$sdkmanager" "platforms;android-37.0" "build-tools;37.0.0" - name: Guest app run: app/scripts/build-guest-manager.sh --debug + - name: GNU coreutils for a bounded test run + run: brew install coreutils - name: Unit tests on macOS (./gradlew test, core:root's script tests among them) + timeout-minutes: 55 working-directory: app/app-android - env: - # 45, not 30 (2026-11-23): a good run of the fork's tests took 28 min 54 s on main (707 tests), and two runs - # on a slower macos-15 runner were still passing tests at 30 min (680 and 675 done, a different test each - # time) when the watchdog stopped them. The job's own limit is 60 min; setup takes about 8. - WATCHDOG_MIN: 45 run: | set -euo pipefail + brew_bin=$(command -v brew) + timeout_bin=$("$brew_bin" --prefix coreutils)/bin/gtimeout + [ -x "$timeout_bin" ] || { echo "::error::GNU timeout is missing at $timeout_bin"; exit 1; } PATH=$(printf '%s' "$PATH" | tr ':' '\n' | grep -Ev '^(/opt/homebrew|/usr/local)(/|$)' | paste -sd: -) export PATH for t in gstat gsha256sum gtimeout gtac gsed; do command -v "$t" > /dev/null && echo "note: $t is still on PATH: $(command -v "$t")"; done echo "macOS $(sw_vers -productVersion), sh: $(ls -l /bin/sh | awk '{print $NF}'), stat: $(command -v stat)" - # Every test's start and end in the log (.github/scripts/gradle-test-events.gradle). The watchdog: a run - # that is not done after WATCHDOG_MIN minutes prints the processes and the test JVMs' threads (where it - # hangs), then stops Gradle, so that the failed tests and the reports below still come out (the first - # runs, 2026-11-15, hung in :core:root:testDebugUnitTest until the job's limit cancelled everything). - ./gradlew --max-workers=3 --continue --init-script "$GITHUB_WORKSPACE/.github/scripts/gradle-test-events.gradle" test & - g=$! - s=0 - while kill -0 "$g" 2>/dev/null; do - sleep 10; s=$((s + 10)) - if [ "$s" -ge $((WATCHDOG_MIN * 60)) ]; then - echo "::error::./gradlew test is still running after $WATCHDOG_MIN minutes: the processes and the test JVMs' threads follow, then Gradle is stopped" - ps -axww -o pid,ppid,etime,state,command | grep -Ev ' (/System/|/usr/libexec/|/usr/sbin/|/sbin/launchd)' | cut -c1-400 - for p in $(jps -l | awk '/Gradle Test Executor|GradleWorkerMain/ { print $1 }'); do echo "=== jstack $p"; jstack "$p" | awk '/^"/ { keep = /Test worker|main/ } keep'; done - ./gradlew --stop || true; kill "$g" 2>/dev/null || true - exit 1 - fi - done - wait "$g" + # Plain per-test events identify the last test reached; GNU timeout bounds the process group without an + # unbounded jstack/Gradle-stop diagnostic path. The step leaves five minutes for summaries and artifacts. + "$timeout_bin" --signal=TERM --kill-after=30s 50m ./gradlew --max-workers=3 --console=plain --continue --init-script "$GITHUB_WORKSPACE/.github/scripts/gradle-test-events.gradle" test - name: Failed tests if: failure() working-directory: app/app-android diff --git a/docs/building.md b/docs/building.md index 06659552..090df3a1 100644 --- a/docs/building.md +++ b/docs/building.md @@ -1112,8 +1112,8 @@ second time). ## 8. Releases A tag `vN.N.N` on `main` (or a dispatch with a version) runs `.github/workflows/release.yml`, which builds the -runtime package with the pinned NDK and the fork's APK (submodule `app/`, the head of `oneios`) on two runners at -once, and attaches both with their `.sha256` to the release. No kernel, no image, no package set. See +S24 Ultra Metal and camera plug-ins with Xcode 27.2, then packages them into the runtime alongside the pinned kernel; +the fork's APK (submodule `app/`, the head of `oneios`) builds in parallel. No image or package set is released. See [releases.md](releases.md). Since 2026-11-25 a release takes each plug-in build (the Metal plug-in of 27.0.1 and of 27.2.1, the capture plug-in, the A56's) from `out/release-cache/NAME/KEY/` when its inputs (the git trees it reads, the reference checkouts' commits, the diff --git a/docs/gpu.md b/docs/gpu.md index 8a94d0b2..80b6bf5b 100644 --- a/docs/gpu.md +++ b/docs/gpu.md @@ -1574,7 +1574,7 @@ conf keeps it too. Test: `ios16_coreimage_fixup_is_left_out_only_with_the_a56_gl ## 7. The Metal plug-in (`userland/metal`) -**Build notes (2026-11-23, integration-switches; docs/switches.md "Found while building the Metal plug-in").** +**Build notes (2026-11-23, integration-switches; shader fixes enabled 2026-11-24).** `build.sh turnip` removes `build/mesa-tu-ios27` when the inputs of its cross file changed (the SDK, the compilers, the base script), since an existing directory only gets `meson configure`. The `9xxx` copies of `patches/metal2vulkan`: since 2026-11-25 90101, 90102 and the switch 90110 are in the bridge's list (`ios diff --git a/docs/releases.md b/docs/releases.md index af437d2b..2aa31b3b 100644 --- a/docs/releases.md +++ b/docs/releases.md @@ -204,28 +204,38 @@ runtime/package.sh 0.1.7-dev # -> out/release/oneios-r ## CI and releases -One workflow, `.github/workflows/release.yml` ("build and release"; `ci.yml` and the runtime-only `release.yml` of -before 2026-11-15 were merged into it). Its jobs: +The "build and release" workflow, `.github/workflows/release.yml`, builds the runtime and app. A separate, +manual-only `.github/workflows/metal-plugin.yml` builds the Metal plug-in for a selected target. The jobs in +"build and release" are: ``` plan ──┬── runtime ubuntu-24.04 the runtime package and its checks ├── apk ubuntu-24.04 the OneOS app (submodule app/) and its checks - ├── apk-macos macos-15 ./gradlew test of the same app on a Mac + ├── apk-macos xcode-27 ./gradlew test of the same app on a Mac └───────────── release needs runtime and apk; a tag or a dispatch only ``` -`runtime`, `apk` and `apk-macos` start together after `plan` and run on their own runners. +`runtime`, `apk` and `apk-macos` start together after `plan`. The runtime job does not build or download the optional +guest plug-ins. | Trigger | Builds | Releases | |---|---|---| -| a pull request, a push to `main` | runtime, apk, apk-macos | nothing (the runtime package and the APK are artifacts for 14 days) | -| a tag `vN.N.N` or `vN.N.N-suffix` on `main` | all three | the runtime and the APK on the release of the tag | -| a dispatch on `main` (Actions, "build and release", Run workflow; inputs `version` and `both` / `runtime only` / `apk only`) | what was asked (apk-macos with the APK) | the release `v`, its tag made at the dispatched commit when missing | +| a pull request, a push to `main` | runtime, apk, apk-macos | nothing (the runtime package and APK are Actions artifacts) | +| a tag `vN.N.N` or `vN.N.N-suffix` on `main` | all three build jobs | the runtime and the APK on the release of the tag | +| a dispatch on `main` (Actions, "build and release", Run workflow; inputs `version` and `both` / `runtime only` / `apk only`) | runtime and/or apk as selected; apk-macos with apk | the release `v`, its tag made at the dispatched commit when missing | +| a dispatch of `metal-plugin` (Actions; input `target`, default `iPhone18,2 24A446`) | the selected Metal plug-in on `xcode-27` | no release; a separate Actions artifact | - **plan**: whether the run releases, the version (`0.0.0-ci` when not), what it builds. A release's version must be `N.N.N[-suffix]` and its commit on `main`. A tag whose release exists already (published from a build machine by `scripts/release/release.sh`, "Releasing from a build machine" below) does not release again: its run builds and tests only. +- **metal-plugin**: manual-only Xcode 27 build on `xcode-27`. It fetches the pinned public sources, builds + `NativeAdrenoMetal.bundle` and its `.gpuaddon` sidecar for the selected target, and uploads the bundle, build record, + check report and build log as a separate artifact. It has no guest image-set input, so it accepts the absence of the + image-specific linker stubs and uses Xcode's SDK stubs; missing Xcode SDK or linker requirements fail before the build. + The target must have a checked-in hooks file before any toolchain fetch; a successful run verifies the target marker, + arm64e binaries, Mach-O check, build record and sidecar, and uploads a SHA-256 manifest. Missing build outputs fail the + job. It does not publish a release or feed the runtime job. - **runtime**: what `ci.yml` and the old `release.yml` did, on every build. `app/` must be an empty submodule folder (this job never checks the fork out); no firmware and no Python in git (`check-tracked-files.sh`: a tracked `*.py`, or an executable with a python shebang, fails it since 2026-11-21); `bash -n`, `shellcheck -S error`; NDK 28.2.13676358, Rust and @@ -239,8 +249,10 @@ plan ──┬── runtime ubuntu-24.04 the runtime package and its check --self-test`; every executable `*/tests/host.sh` of another area, among them `runtime/tests/host.sh`: the Rust workspace's `cargo test`, `cargo fmt --check`, `cargo clippy -D warnings` and `runtime/xnuhost/check-arm64.sh smoke check`); the pinned kernel when - `kernel/release-kernel.txt` names one; `runtime/package.sh ` (the Apple-file refusal and the elf-check of - the stage, and `bin/oneios-tool` built for the phone); the drm2kgsl check and `runtime/package/elf-check.sh` on + `kernel/release-kernel.txt` names one (fetched from `akshaynexus/OneiOS`, where `kernel/publish.sh` publishes it); + `runtime/package.sh ` (the Apple-file refusal and elf-check of the stage, plus `bin/oneios-tool` built for + the phone; optional plug-ins are included only when their directories are supplied); the drm2kgsl check and + `runtime/package/elf-check.sh` on the unpacked archive; the members check (above); `.github/scripts/check-phone-tool.sh ` ("oneios-tool for the phone", below). Artifact `oneios-runtime`: the `.tar.zst`, its `.sha256`, `.runtime.json`, and `oneios-tool--android-arm64` with its `.sha256`. Its limit is 45 min (the tool's Android build comes on @@ -251,7 +263,8 @@ plan ──┬── runtime ubuntu-24.04 the runtime package and its check cache); Android SDK platform 37 and build-tools 37.0.0; the debug key of the secret `ONEIOS_DEBUG_KEYSTORE_B64` (set since 2026-11-22: the key of `secrets/oneios-debug.keystore`, "The debug key" below; without the secret a key of the run's own); `app/scripts/build-guest-manager.sh --debug`; mksh; - `./gradlew --max-workers=3 test assembleFullDebug` in `app/app-android` (what `oneios-tool app build` runs); the + `./gradlew --max-workers=3 test assembleFullDebug` in `app/app-android` (what `oneios-tool app build` runs), with + plain per-test start/end logs and a 50-minute process-group timeout (the step is capped at 55 minutes); the APK's versionName and versionCode from `aapt2 dump badging` (the versionCode must be `app/build.gradle.kts`'s); `check-apk.sh` (above). Artifact `oneos-apk`: `OneOS-oneios--debug.apk` and its `.sha256`. The commit recorded for `app/` is `ff2e4a6` (2026-11-23: fork branch `sm8850-support` on `5568231`, for `oneios`: the tribalfs packages from their three GitHub Packages registries with the environment's token first, JitPack never asked for them (YMGPwcca/OneOS `ab28274`, `590b4a6`); an early return writes the shmem THP mode back too, which the switch now writes only under its stop lock (part of their `403d8b4`); the Galaxy S26 Ultra warned with what is known, not refused (their refusal not taken: `docs/s26.md`); Gradle tests on the build laptop (:core:model:test :core:safety:test :core:root:testDebugUnitTest): 706, 0 failures) on `5568231` (2026-11-23: fork branch `s928w-support` on `726b66a`, for `oneios`: every S24 Ultra model number, the Canadian SM-S928W with its US bootloader and vendor model too, gets the SM-S928B's iOS 27 card, gate and switch, host-tested in `OneiosTest`, `ProfilesTest` and `OneiosScriptTest`; Gradle tests on the build laptop (:core:model:test :core:safety:test :core:root:testDebugUnitTest): 703, 0 failures) on `726b66a` (2026-11-23: fork `oneios` with `0cd45ad`, the boot screen's bar, and `2ef79b6`, CI signs with the shared key, merged into the upstream merge; the merged tree's Gradle tests on the build laptop: 701, 0 failures) on `6abbf5b` (2026-11-22: upstream OneOS 0.5.32 to 0.5.35 merged into `oneios` (`925a978`: Debloat, PixelOS 17, the Z Fold8's One UI 9.5 files, Bring apps search, Wireless debugging paired in a guest; no iOS script, root verb, stage path or session ABI changed), then the core:root tests' `head` stand-in for `head -c 0` on a Mac (`6abbf5b`); version 0.5.65 (194); on the Mac `./gradlew test assembleFullDebug` built 0.5.64 (193) at `925a978`, 700 tests, 1 failure (that `head`), then `:core:root` 320 tests, 0 failures, 6 skipped; not run on the phone; before it `43fc1b3`: a check that another job blocks waits visibly and starts by itself, the button spins only while a job runs; before it `bc837b4`: status quick by the files' ids, its steps and seconds shown, 20 s without an answer from su is "Root didn't answer", the setup steps on iOS 27's page, clearer runtime and image choices, live hardware-check output, debug builds signed with the shared key; 689 tests, 0 failures, 76 skipped; before it `5ffc71c`, the CI doc on the key, and `84b0ba5`: the pairing files without XnuPrelink's Python sources, kb @@ -261,14 +274,16 @@ plan ──┬── runtime ubuntu-24.04 the runtime package and its check on the phone (`53abb04`). Tested on the Linux PC: `./gradlew test` 679 tests, 0 failures, 75 skipped (the shell-script suites, which need dash, busybox or mksh, and one test gated on a real tool) and `assembleFullDebug`; not run on the phone. -- **apk-macos**: the same checkout, token, JDK, SDK and guest app on `macos-15`, then `./gradlew --continue test` +- **apk-macos**: the same checkout, token, JDK, SDK and guest app on `xcode-27`, then `./gradlew --continue test` with Homebrew's folders taken off `PATH`, so that core:root's script tests use the harness's stand-ins over - macOS's own `stat`, `shasum`, `perl` and `awk` (a Mac without coreutils). Every test's start and end is in the - log (`--init-script .github/scripts/gradle-test-events.gradle`, failures with their whole exception). A watchdog - stops Gradle after 45 minutes (30 until 2026-11-23: a good run takes about 29 on main, and slower runners were - still passing tests at 30) and first prints the processes and the test JVMs' threads (`jstack`), so a hung - test is named and the reports still come out. On a failure the job summary lists the failed tests; the reports - and results are the artifact `oneos-tests-macos`. Not a gate of the release. The macOS results are in + macOS's own `stat`, `shasum`, `perl` and `awk` (a Mac without coreutils). GNU `timeout` is invoked by its absolute + Homebrew path, not added to the test `PATH`. Every test's start and end is in the log + (`--init-script .github/scripts/gradle-test-events.gradle`, failures with their whole exception); the last `STARTED` + event identifies a test that stalls. GNU `timeout` sends TERM to the Gradle process group after 50 minutes and KILL + after a 30-second grace period; the step limit is 55 minutes within the 60-minute job. This bounded process-group + timeout replaces the old watchdog, whose unbounded `jstack`/Gradle-stop diagnostics could themselves stall. On a + failure the job summary lists the failed tests; the reports and results are the artifact `oneos-tests-macos`. + Not a gate of the release. The macOS results are in "macOS: the fork's unit tests" below. - **release**: needs runtime and apk (each a success, or skipped because the dispatch asked for the other only). Checks the commit is on `main` and that the tag, when it exists, is at the built commit (a tag is never moved); diff --git a/docs/s25.md b/docs/s25.md index c47d0a4c..86c5788d 100644 --- a/docs/s25.md +++ b/docs/s25.md @@ -110,7 +110,7 @@ A community kernel tree (6.6.77) is not this 6.6.127 build and does not replace | Display | **In the s25ver snapshot, not in this tree as such** (that snapshot made 1080x2340 the default of every fallback, which would change the S24 Ultra's). Here (2026-11-21): xnuhost takes the panel's mode from the display helper's report or the DRM panel, so an S25 session gets 1080x2340 without a setting; only where no panel is read does it assume a size, and `--set panel-fallback=1080x2340@120` (or `panel-fallback=` in the image set's `xnuhost.conf`) makes that the S25's instead of the S24's 1440x3120 (same aspect ratio, 1.78x the pixels, scaled down every frame; [booter.md](booter.md) 2.8). The display helper's last fallback is its existing `--logical 1080x2340` (passed by the OneOS fork's switch script, not here); `displayctl test --size 1080x2340` for the bench; the guest profile `userland/config/device-iphone18,2.toml` stays 1440x3120 (it only feeds `oneios-mg`'s expectations, which then report `identity=differs` on a 1080 panel: a log line, nothing waits on it). With the S25's panel the UI scale stays 3: **360x780 points**, the pixel grid of the iPhone 12 mini / 13 mini; `--scale 2` gives 540x1170. A point is 1/139 inch (the iPhone's 1/153): 44-point targets are 8.0 mm. The artwork set stays the Pro Max's (`artwork-device-subtype` 2868, its assets are certainly in the image); the 12/13 mini's subtype (2340) is an untested alternative [I]. `test_xnuhost` and `test_display_mode` cover `panel-fallback=`. At 1080x2340 a frame is 10.1 MB (18 MB before). | | CPU plan (`runtime/bridges/cpu/topology.rs`; `topology.c` then) | Oryon has no little cores. The old rule (lowest capacity = E) would have made the six performance cores an E cluster and left iOS two P cores. Now a Qualcomm core (MIDR implementer 0x51) is never E, and a host whose cores are all P but of different speeds **lends** its slowest cores to the guest as E vCPUs (one in four vCPUs, at least one; 8 vCPUs: 2 E + 6 P), because XNU's AMP scheduler and the iPhone's boot CPU want both kinds. Hosts with all-alike cores and the S24's A520 cores behave as before. Tests with an SM8750-shaped fixture (made-up capacities and frequencies, the real shape): `runtime/bridges/tests/test_bridges.c`, 210 checks. | | Phone gate in the OneOS fork | The fork only offered iOS on the S24 Ultra, in two places: `OneiosSystem.PROFILE_IDS` (Kotlin) and the preflight of `switcher/assets/oneios_switch.sh`. Both now accept `SM-S931*` / `pa1q` / `SM8750` as well (the fork already has the S25 profile `s-8750`). Its tests and the refusal texts follow. The fork's tests were not run here (Gradle); the workflow `oneos-apk.yml` runs them. | -| Metal translation | `userland/metal/patches/metal2vulkan/` holds the Adreno-generic shader-translation fixes of hakios-arm64e-dada (see below), rebased on the pin; `userland/metal/build.sh` stages them as `9xxx` patches after the base's own. | +| Metal translation | `userland/metal/patches/metal2vulkan/` holds the Adreno-generic shader-translation fixes of hakios-arm64e-dada, rebased on the pin; 0101/0102 are included in the Metal bridge, while 0103 remains staged pending a safe per-process allocation policy. | | Phone probe | `tools/probe/s25-probe.sh`: read-only; writes `/data/local/tmp/oneios-s25-probe-