Skip to content

Commit e530d79

Browse files
authored
Merge pull request #8 from fogtape/upgrade/node26.11-mobile-lite
升级 Node 26.11.0 官方 PR 快照,沿用已约定的 lite 裁剪
2 parents eea389e + b95aa64 commit e530d79

42 files changed

Lines changed: 1117 additions & 227 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.github/actions/materialize/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ runs:
3333
set -euo pipefail
3434
UP="$RUNNER_TEMP/upstream-$BASE_TAG"
3535
if [ ! -d "$UP/.git" ]; then
36-
git clone --depth 1 --branch "$BASE_TAG" https://github.com/nodejs/node.git "$UP"
36+
scripts/clone-upstream.sh https://github.com/nodejs/node.git "$BASE_TAG" "$UP"
3737
fi
3838
# file:// so git treats the shallow cache as a proper transport.
3939
UPSTREAM_REPO="file://$UP" scripts/prepare.sh "$RUNNER_TEMP/matsrc"
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Upload diagnostic test logs
2+
description: >
3+
Upload test logs with one retry for transient artifact-service failures.
4+
Logs are best effort; the test step remains the required pass/fail gate.
5+
inputs:
6+
name:
7+
description: Artifact name
8+
required: true
9+
path:
10+
description: Log paths, one per line
11+
required: true
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Upload logs
16+
id: upload
17+
continue-on-error: true
18+
uses: actions/upload-artifact@v7
19+
with:
20+
name: ${{ inputs.name }}
21+
path: ${{ inputs.path }}
22+
if-no-files-found: ignore
23+
24+
- name: Wait before retrying the artifact service
25+
if: always() && steps.upload.outcome == 'failure'
26+
shell: bash
27+
run: sleep 15
28+
29+
- name: Retry log upload
30+
id: retry
31+
if: always() && steps.upload.outcome == 'failure'
32+
continue-on-error: true
33+
uses: actions/upload-artifact@v7
34+
with:
35+
# A failed response can still leave an artifact on the service. A
36+
# distinct name avoids conflicts without deleting the first upload.
37+
name: ${{ inputs.name }}-retry
38+
path: ${{ inputs.path }}
39+
if-no-files-found: ignore
40+
41+
- name: Report unavailable log artifact
42+
if: always() && steps.upload.outcome == 'failure' && steps.retry.outcome == 'failure'
43+
shell: bash
44+
run: |
45+
echo '::warning::Test log upload failed twice; use the live job log and test summary. The test verdict is unchanged.'
46+
echo 'Test log artifact unavailable after two upload attempts. See the live job log and the test summary above.' >> "$GITHUB_STEP_SUMMARY"

‎.github/workflows/build.yml‎

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ permissions:
7070

7171
jobs:
7272
package-preview:
73-
if: github.ref == 'refs/heads/recipe-v26'
74-
needs: [ci-required, curated-tests-android, curated-tests-ios]
73+
if: github.ref == 'refs/heads/recipe-v26' || (github.event_name == 'pull_request' && needs.upgrade-check.outputs.upgrade == 'true')
74+
needs: [release-check, upgrade-check, ci-required, curated-tests-android, curated-tests-ios]
7575
runs-on: ubuntu-24.04
7676
permissions:
7777
contents: read
@@ -86,17 +86,18 @@ jobs:
8686
run: python3 scripts/package-preview.py preview-input preview-packages
8787
- uses: actions/upload-artifact@v7
8888
with:
89-
name: nodejs-mobile-26.10.0-0-preview
89+
name: nodejs-mobile-${{ needs.release-check.outputs.version }}-preview
9090
path: preview-packages
9191
retention-days: 90
9292
if-no-files-found: error
9393

9494
# Flavor matrices are inline expressions, not a helper job (a full VM boot
9595
# to echo two constants earns nothing). Android always runs both flavors
9696
# (ubuntu+KVM is 1x-billed and plentiful); iOS drops to full-only on
97-
# pull_request because hosted macOS concurrency is capped far below Linux
97+
# ordinary pull_request because hosted macOS concurrency is capped far below Linux
9898
# and two PRs running the complete iOS matrix could queue the release
99-
# pipeline behind them. What the lite iOS leg uniquely catches —
99+
# pipeline behind them. Upstream upgrades build and smoke both iOS flavors.
100+
# What the lite iOS leg uniquely catches —
100101
# lite-specific configure/link breakage — is still caught at compile time
101102
# on the merge run. Pushes and releases run both. See docs/TESTING.md,
102103
# "Flavors, and what's required to merge".
@@ -319,11 +320,11 @@ jobs:
319320
path: out_android
320321

321322
build-ios:
322-
needs: release-check
323+
needs: [release-check, upgrade-check]
323324
strategy:
324325
fail-fast: false
325326
matrix:
326-
flavor: ${{ github.event_name == 'pull_request' && fromJSON('["full"]') || fromJSON('["full","lite"]') }}
327+
flavor: ${{ github.event_name == 'pull_request' && needs.upgrade-check.outputs.upgrade != 'true' && fromJSON('["full"]') || fromJSON('["full","lite"]') }}
327328
config:
328329
# x86_64 (Intel Mac) simulator support was dropped for v24 — Intel
329330
# Macs are EOL.
@@ -567,9 +568,9 @@ jobs:
567568
strategy:
568569
fail-fast: false
569570
matrix:
570-
flavor: ${{ github.event_name == 'pull_request' && fromJSON('["full"]') || fromJSON('["full","lite"]') }}
571+
flavor: ${{ github.event_name == 'pull_request' && needs.upgrade-check.outputs.upgrade != 'true' && fromJSON('["full"]') || fromJSON('["full","lite"]') }}
571572
runs-on: macos-26
572-
needs: [build-ios]
573+
needs: [build-ios, upgrade-check]
573574
env:
574575
NODEJS_MOBILE_FLAVOR: ${{ matrix.flavor }}
575576
FLAVOR_SUFFIX: ${{ matrix.flavor == 'lite' && '-lite' || '' }}
@@ -696,11 +697,11 @@ jobs:
696697
# Boot smoke for iOS: install the testnode app on a booted simulator and run a
697698
# console.log via the freshly built NodeMobile.xcframework.
698699
smoke-ios:
699-
needs: [combine-ios]
700+
needs: [combine-ios, upgrade-check]
700701
strategy:
701702
fail-fast: false
702703
matrix:
703-
flavor: ${{ github.event_name == 'pull_request' && fromJSON('["full"]') || fromJSON('["full","lite"]') }}
704+
flavor: ${{ github.event_name == 'pull_request' && needs.upgrade-check.outputs.upgrade != 'true' && fromJSON('["full"]') || fromJSON('["full","lite"]') }}
704705
runs-on: macos-26
705706
env:
706707
NODEJS_MOBILE_FLAVOR: ${{ matrix.flavor }}
@@ -1223,13 +1224,23 @@ jobs:
12231224
fetch-depth: 1
12241225

12251226
- name: Check the pinned upstream base is on this fork
1227+
env:
1228+
GH_TOKEN: ${{ github.token }}
12261229
run: |
12271230
set -euo pipefail
12281231
# || true: grep exits 1 on a comments-only file, which under pipefail
12291232
# would kill the step before the message below ever prints.
12301233
BASE=$(grep -Ev '^\s*(#|$)' upstream-base.txt | head -n1 | tr -d '[:space:]' || true)
12311234
[ -n "$BASE" ] || { echo "::error::no base in upstream-base.txt"; exit 1; }
12321235
1236+
if [[ "$BASE" =~ ^[0-9a-f]{40}$ ]]; then
1237+
WANT=$(gh api "repos/nodejs/node/commits/$BASE" --jq .sha)
1238+
[ "$WANT" = "$BASE" ] || { echo "::error::upstream snapshot SHA mismatch"; exit 1; }
1239+
echo "Verified upstream PR snapshot $BASE; no release ancestry ref is required."
1240+
# release-control.py rejects Cut release/publication for SHA bases.
1241+
exit 0
1242+
fi
1243+
12331244
# Each major keeps an independent upstream ancestry ref.
12341245
MAJOR=${BASE#v}; MAJOR=${MAJOR%%.*}
12351246
BASE_REF=upstream-base

‎.github/workflows/full-device-suite.yml‎

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# The full device suite: everything test/parallel + test/sequential that
2-
# .status does not skip, on an Android emulator and an iOS simulator, in 4
3-
# round-robin shards per platform (test.py --run=n,4).
2+
# .status does not skip, on an Android emulator and an iOS simulator, in
3+
# round-robin shards (16 Android, 4 iOS).
44
#
55
# The curated gate (build.yml) is the fast PR allow-list; this job is the
66
# complement: a test upstream adds is picked up automatically, and excluding
@@ -97,10 +97,15 @@ jobs:
9797
if: needs.precheck.outputs.skip != 'true' && inputs.platform != 'ios'
9898
strategy:
9999
fail-fast: false
100-
# Keep in step with the ,4 in --run below: a matrix of a different
101-
# length would drop or double-run tests rather than fail.
100+
# Two Node 26.11 runs lost runners after ~470-560 app launches, with
101+
# QEMU hangs and no failing test. Shorter emulator sessions retain all
102+
# test coverage; bound concurrency to the previous four Android jobs.
103+
max-parallel: 4
102104
matrix:
103-
shard: [0, 1, 2, 3]
105+
shard: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
106+
env:
107+
# The denominator and matrix length are checked by the integrity gate.
108+
ANDROID_SUITE_SHARDS: 16
104109
runs-on: ubuntu-24.04
105110
timeout-minutes: 90
106111
steps:
@@ -149,25 +154,30 @@ jobs:
149154
api-level: ${{ env.EMULATOR_API_LEVEL }}
150155
target: default
151156
arch: x86_64
157+
ram-size: 2048M
158+
heap-size: 256M
152159
force-avd-creation: false
153160
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
154161
disable-animations: true
155162
script: |
156163
adb wait-for-device
157164
./tools/mobile-test/android/prepare-android-test.sh
158-
bash -o pipefail -c "./tools/test.py -j 1 --flaky-tests=skip --timeout=300 --arch android --run=${{ matrix.shard }},4 parallel sequential 2>&1 | tee shard.log"
165+
./tools/mobile-test/android/run-suite-shard.sh ${{ matrix.shard }} "$ANDROID_SUITE_SHARDS"
159166
160167
- name: Summarize shard ${{ matrix.shard }}
161168
if: always()
162169
run: |
163170
./tools/mobile-test/summarize-suite-run.sh shard.log "android shard ${{ matrix.shard }}"
164171
165-
- uses: actions/upload-artifact@v7
172+
# Log transport must not change the device-test verdict. Binary uploads
173+
# in Build remain required; only these diagnostic logs are best effort.
174+
- uses: ./.github/actions/upload-test-log
166175
if: always()
167176
with:
168177
name: full-suite-android-shard-${{ matrix.shard }}
169-
path: shard.log
170-
if-no-files-found: ignore
178+
path: |
179+
shard.log
180+
shard-resources.log
171181
172182
ios:
173183
needs: precheck
@@ -225,12 +235,11 @@ jobs:
225235
run: |
226236
./tools/mobile-test/summarize-suite-run.sh shard.log "ios shard ${{ matrix.shard }}"
227237
228-
- uses: actions/upload-artifact@v7
238+
- uses: ./.github/actions/upload-test-log
229239
if: always()
230240
with:
231241
name: full-suite-ios-shard-${{ matrix.shard }}
232242
path: shard.log
233-
if-no-files-found: ignore
234243

235244
- name: Shutdown simulator
236245
if: always()

‎.github/workflows/verify-patches.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ jobs:
8484
- name: Reconstruct + verify
8585
run: scripts/prepare.sh out
8686

87+
- name: Check immutable upstream clones and cache transport
88+
run: python3 scripts/test-upstream-clone.py
89+
8790
- uses: actions/setup-node@v6
8891
with:
8992
node-version: '24'
@@ -107,6 +110,9 @@ jobs:
107110
- name: Check mobile verdict isolation and final output
108111
run: python3 scripts/test-mobile-verdicts.py out
109112

113+
- name: Check Android full-suite coverage and failure propagation
114+
run: python3 scripts/test-android-suite.py out
115+
110116
- name: Check manual prerelease version selection and guards
111117
run: python3 scripts/test-release-control.py
112118

@@ -286,7 +292,7 @@ jobs:
286292
run: |
287293
set -euo pipefail
288294
BASE=$(grep -Ev '^\s*(#|$)' upstream-base.txt | head -n1 | tr -d '[:space:]')
289-
git clone --depth 1 --branch "$BASE" https://github.com/nodejs/node.git src
295+
scripts/clone-upstream.sh https://github.com/nodejs/node.git "$BASE" src
290296
git -C src config user.name ci
291297
git -C src config user.email ci@invalid
292298
while IFS= read -r p; do

‎README.md‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,16 @@ in-app, with npm modules and N-API native addons.
99
| Android | `libnode.so` + headers | `arm64-v8a`, `armeabi-v7a`, `x86_64` (16 KB page size) |
1010
| iOS | `NodeMobile.xcframework` | `arm64` device, `arm64` simulator |
1111

12-
Current line: **Node.js 26** (`v26.10.0`, prerelease line).
12+
Current line: **Node.js 26** (`v26.11.0`, upstream PR preview).
13+
This checkout pins [official release proposal #66546](https://github.com/nodejs/node/pull/66546)
14+
at `49072a0be4c7410982557aebf5b5c924fe7db597`, before its merge/tag.
15+
Builds are CI previews; [provenance and validation](docs/UPSTREAM-26.11.md)
16+
record how to move to the official tag after release.
1317
The stable Node 24 line continues independently on [`recipe`](https://github.com/fogtape/nodejs-mobile/tree/recipe).
1418
See [maintained version lines](docs/VERSION-LINES.md) for branch selection,
1519
build instructions and download locations. `process.version` reports the
1620
upstream version unchanged, so version-parsing tools keep working; the
17-
mobile build is identified by `process.versions.mobile` (e.g. `"26.10.0-0"`).
21+
mobile build is identified by `process.versions.mobile` (e.g. `"26.11.0-0"`).
1822

1923
## Get it
2024

@@ -53,13 +57,13 @@ for building one — about 1.5 MB instead of a 1 GB fork:
5357

5458
| | |
5559
|---|---|
56-
| `upstream-base.txt` | the pinned upstream release tag (`v26.10.0`) |
60+
| `upstream-base.txt` | the pinned upstream PR commit (see [26.11 provenance](docs/UPSTREAM-26.11.md)) |
5761
| `patches/` | per-concern patches to upstream files, plus `series` (apply order) and `files.map` (which patch owns which file) |
5862
| `mobile-src/` | files that have no upstream counterpart — build scripts, the iOS framework project, test apps and harness |
5963
| `expected-tree.txt` | the git tree hash the reconstruction must produce |
6064
| `scripts/` | `prepare.sh` (recipe → source tree) and `regenerate-patches.py` (source tree → recipe) |
6165

62-
`scripts/prepare.sh` clones upstream at the pinned tag, applies the patch
66+
`scripts/prepare.sh` clones upstream at the pinned tag or commit, applies the patch
6367
series, overlays `mobile-src/`, and verifies the result hashes to
6468
`expected-tree.txt` — so what CI builds, what a release tag contains, and
6569
what was reviewed here are provably the same bytes.

‎docs/BUILDING.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Build Instructions
22

3-
These instructions describe the Node 26 line (`recipe-v26`). For Node 24,
3+
These instructions describe the Node 26 line. This checkout is the pinned
4+
26.11 upstream PR preview on `upgrade/node26.11-mobile-lite`;
5+
see [provenance](UPSTREAM-26.11.md). For Node 24,
46
use the `recipe` branch and its toolchain instructions. See
57
[VERSION-LINES.md](VERSION-LINES.md) for the maintenance policy and the
68
Node 26 FFI/Temporal configuration.
@@ -86,7 +88,7 @@ sdkmanager "ndk;29.0.14206865"
8688
This repository holds the recipe, not the source. Generate a tree from it:
8789

8890
```sh
89-
git clone -b recipe-v26 https://github.com/fogtape/nodejs-mobile
91+
git clone -b upgrade/node26.11-mobile-lite https://github.com/fogtape/nodejs-mobile
9092
cd nodejs-mobile && scripts/prepare.sh && cd out
9193
```
9294

‎docs/CHANGELOG.md‎

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
</tr>
77
<tr>
88
<td>
9+
<a href="#26.11.0-0">26.11.0-0 (upstream PR preview)</a><br/>
910
<a href="#26.10.0-0">26.10.0-0</a><br/>
1011
<a href="#26.1.0-0">26.1.0-0</a><br/>
1112
<a href="#24.21.0-0">24.21.0-0</a><br/>
@@ -41,8 +42,36 @@
4142
</tr>
4243
</table>
4344

45+
<a id="26.11.0-0"></a>
46+
## Unreleased, Version 26.11.0-0 (upstream PR preview)
47+
48+
- Pin official Node.js release proposal [#66546](https://github.com/nodejs/node/pull/66546)
49+
at `49072a0be4c7410982557aebf5b5c924fe7db597` and rebase the mobile patch series.
50+
This source upgrade does not arm publication.
51+
- Include the proposal's HdrHistogram 0.12.0, NSS 3.129 certificate source,
52+
WebCrypto/source-map fixtures and Alpine support documentation updates.
53+
- Split the complete Android device suite into 16 shorter sessions, with at
54+
most four running concurrently. Release the Gradle JVM after APK assembly
55+
and publish resource diagnostics while tests run to investigate runner
56+
shutdowns without excluding additional tests.
57+
- Exclude the watch-mode CLI subprocess tests on mobile, matching the
58+
existing child-Node limitation; in-process debugger and filesystem-watch
59+
tests keep their current coverage. Retry diagnostic log uploads once and
60+
report artifact-service failures separately from the device-test verdict.
61+
- Carry forward the danmu lite ICU data profile, all web encoding converters,
62+
Chinese collation and Unicode normalization. Lite omits Temporal, FFI, Amaro,
63+
Inspector, SQLite/Web Storage, SEA and native object-print helpers; Android
64+
retains JIT/native WASM and 64-bit pointer compression. Keep the lite runtime
65+
strip helper and dynamic-export checks.
66+
- Preserve upstream's new Temporal zoneinfo generator alongside the mobile
67+
Rust host/target actions. Adapt the z/OS build refactor without losing iOS guards.
68+
- Triage new subprocess tests on both platforms, keep in-process bench/negative-zero
69+
assertions, update the renamed VFS exclusion and add 11 in-process device regressions.
70+
- Support SHA-pinned materialization in local builds and CI. Block release
71+
preparation/publication until an official release tag is pinned and validated.
72+
4473
<a id="26.10.0-0"></a>
45-
## 2026-10-01, Version 26.10.0-0 (Current)
74+
## 2026-10-01, Version 26.10.0-0
4675

4776
- Upgrade the independent Node 26 line to official Node.js 26.10.0.
4877
- Enable Temporal in Android/iOS full builds using Rust 1.86.0, with separate

‎docs/DANMU-LITE.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ cannot be inferred from today's imports.
2929
before/after trimming and lets icupkg validate package dependencies. A unique
3030
intermediate package name prevents an installed host's full ICU from hiding
3131
missing resources. The final conventional data entry point is preserved.
32-
With the pinned ICU 78.3, data goes from 33,105,536 to 11,024,064 bytes. This
32+
With the Node 26.11 proposal’s bundled ICU data, the production helper
33+
reduces 33,107,952 to 11,026,480 bytes (22,081,472 bytes removed). This
3334
measures data only, not a complete newly compiled libnode or compressed ZIP.
3435

3536
## Other lite subtractions

0 commit comments

Comments
 (0)