Skip to content

Commit 0417f62

Browse files
authored
ci(validation): harden post-release checks (#36)
* ci(validation): harden post-release checks * fix(ci): repair iOS validation jobs * fix(ci): pack compatibility fixture with yarn * fix(ci): run RN 0.86 on Xcode 16 * fix(ci): pass expected iOS architecture to tests
1 parent 41d8779 commit 0417f62

29 files changed

Lines changed: 2529 additions & 1575 deletions

.github/dependabot.yml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ updates:
77
day: monday
88
time: '03:00'
99
timezone: Asia/Shanghai
10-
open-pull-requests-limit: 5
10+
open-pull-requests-limit: 3
1111
groups:
1212
development-dependencies:
1313
dependency-type: development
@@ -22,7 +22,14 @@ updates:
2222
day: monday
2323
time: '03:30'
2424
timezone: Asia/Shanghai
25-
open-pull-requests-limit: 3
25+
open-pull-requests-limit: 2
26+
groups:
27+
ruby-toolchain:
28+
patterns:
29+
- '*'
30+
update-types:
31+
- minor
32+
- patch
2633

2734
- package-ecosystem: github-actions
2835
directory: /
@@ -31,4 +38,11 @@ updates:
3138
day: monday
3239
time: '04:00'
3340
timezone: Asia/Shanghai
34-
open-pull-requests-limit: 3
41+
open-pull-requests-limit: 2
42+
groups:
43+
github-actions:
44+
patterns:
45+
- '*'
46+
update-types:
47+
- minor
48+
- patch

.github/workflows/ci.yml

Lines changed: 65 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,17 @@ jobs:
6161
site=true
6262
web=true
6363
;;
64+
.github/workflows/registry-canary.yml|scripts/test-registry-consumers.mjs)
65+
quality=true
66+
web=true
67+
;;
6468
src/**|assets/**)
6569
android=true
6670
ios=true
6771
quality=true
6872
web=true
6973
;;
70-
cpp/fuzz/**|scripts/test-native-fuzz.sh)
74+
cpp/fuzz/**|scripts/test-native-fuzz.sh|cpp/benchmark/**|scripts/benchmark-native.mjs|.github/workflows/native-benchmark.yml)
7175
quality=true
7276
;;
7377
cpp/**)
@@ -84,6 +88,10 @@ jobs:
8488
android=true
8589
quality=true
8690
;;
91+
compatibility/ios-api/**|scripts/test-rn-ios-compatibility.sh)
92+
ios=true
93+
quality=true
94+
;;
8795
ios/**|example/ios/**|*.podspec)
8896
ios=true
8997
quality=true
@@ -190,15 +198,15 @@ jobs:
190198
191199
- name: Upload Android reports
192200
if: always()
193-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
201+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
194202
with:
195203
name: Android-Build-Reports-new-arch-${{ matrix.new-arch }}
196204
path: example/android/**/build/reports
197205
if-no-files-found: ignore
198206
retention-days: 7
199207

200208
- name: Upload APK
201-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
209+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
202210
with:
203211
name: app-release-${{ github.sha }}-new-arch-${{ matrix.new-arch }}
204212
path: example/android/app-release-${{ github.sha }}-new-arch-${{ matrix.new-arch }}.apk
@@ -256,7 +264,7 @@ jobs:
256264

257265
- name: Upload instrumentation reports
258266
if: always()
259-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
267+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
260268
with:
261269
name: New-Arch-Runtime-Test-Reports-${{ matrix.api-level }}
262270
path: |
@@ -316,12 +324,12 @@ jobs:
316324
- name: Set up Ruby
317325
uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1
318326
with:
319-
ruby-version: '3.0'
327+
ruby-version: '3.3'
320328
bundler-cache: true
321329
working-directory: example
322330

323331
- name: Cache Pods
324-
uses: actions/cache@caa296126883cff596d87d8935842f9db880ef25 # v5
332+
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
325333
with:
326334
path: |
327335
example/ios/Pods
@@ -354,17 +362,65 @@ jobs:
354362
run: |
355363
set -o pipefail
356364
cd example/ios
357-
xcodebuild -workspace BsDiffPatchExample.xcworkspace -scheme BsDiffPatchExample -configuration Release -sdk iphonesimulator -destination "platform=iOS Simulator,id=$SIMULATOR_UDID" -resultBundlePath "$RUNNER_TEMP/ios-tests.xcresult" test | bundle exec xcpretty
365+
xcodebuild \
366+
-workspace BsDiffPatchExample.xcworkspace \
367+
-scheme BsDiffPatchExample \
368+
-configuration Release \
369+
-sdk iphonesimulator \
370+
-destination "platform=iOS Simulator,id=$SIMULATOR_UDID" \
371+
-resultBundlePath "$RUNNER_TEMP/ios-tests.xcresult" \
372+
EXPECTED_NEW_ARCH=${{ matrix.new-arch }} \
373+
GCC_PREPROCESSOR_DEFINITIONS='$(inherited) EXPECTED_NEW_ARCH=$(EXPECTED_NEW_ARCH)' \
374+
test | bundle exec xcpretty
358375
359376
- name: Upload iOS test results
360377
if: always()
361-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6
378+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
362379
with:
363380
name: iOS-Test-Results-new-arch-${{ matrix.new-arch }}
364381
path: ${{ runner.temp }}/ios-tests.xcresult
365382
if-no-files-found: ignore
366383
retention-days: 7
367384

385+
ios-rn-compatibility:
386+
name: iOS RN API Compatibility (${{ matrix.react-native }})
387+
needs: changes
388+
if: needs.changes.outputs.ios == 'true'
389+
runs-on: ${{ matrix.runner }}
390+
timeout-minutes: 45
391+
strategy:
392+
fail-fast: true
393+
max-parallel: 2
394+
matrix:
395+
include:
396+
- react-native: '0.73.11'
397+
node: '18'
398+
runner: macos-14
399+
- react-native: '0.74.7'
400+
node: '18'
401+
runner: macos-14
402+
- react-native: '0.86.0'
403+
node: '22'
404+
runner: macos-15
405+
steps:
406+
- name: Checkout the code
407+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
408+
409+
- name: Set up Node.js
410+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
411+
with:
412+
node-version: ${{ matrix.node }}
413+
414+
- name: Set up Ruby
415+
uses: ruby/setup-ruby@003a5c4d8d6321bd302e38f6f0ec593f77f06600 # v1
416+
with:
417+
ruby-version: '3.3'
418+
bundler-cache: true
419+
working-directory: example
420+
421+
- name: Compile Pod against React Native iOS APIs
422+
run: sh scripts/test-rn-ios-compatibility.sh ${{ matrix.react-native }}
423+
368424
web-test:
369425
name: Web WASM and Browser Test
370426
needs: changes
@@ -447,6 +503,7 @@ jobs:
447503
android-api-level-test,
448504
android-rn-compatibility,
449505
ios-build-test,
506+
ios-rn-compatibility,
450507
web-test,
451508
site-test,
452509
]
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Native Core Benchmark
2+
3+
on:
4+
schedule:
5+
- cron: '23 5 * * 3'
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
concurrency:
12+
group: native-core-benchmark
13+
cancel-in-progress: true
14+
15+
jobs:
16+
benchmark:
17+
name: Native core (${{ matrix.os }})
18+
runs-on: ${{ matrix.os }}
19+
timeout-minutes: 30
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-latest, macos-14]
24+
steps:
25+
- name: Checkout the code
26+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
27+
28+
- name: Set up Node.js
29+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
30+
with:
31+
node-version-file: .nvmrc
32+
33+
- name: Run deterministic benchmark
34+
env:
35+
BENCHMARK_OUTPUT: native-core-${{ runner.os }}.json
36+
run: node scripts/benchmark-native.mjs
37+
38+
- name: Upload benchmark report
39+
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
40+
with:
41+
name: native-core-${{ runner.os }}
42+
path: native-core-${{ runner.os }}.json
43+
if-no-files-found: error
44+
retention-days: 30

.github/workflows/pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
run: yarn site:test:browser
5656

5757
- name: Configure GitHub Pages
58-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
58+
uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0
5959

6060
- name: Upload GitHub Pages artifact
6161
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Registry Consumer Canary
2+
3+
on:
4+
schedule:
5+
- cron: '41 4 * * 3'
6+
workflow_dispatch:
7+
inputs:
8+
package_spec:
9+
description: npm package spec to validate
10+
required: false
11+
default: react-native-bs-diff-patch@latest
12+
type: string
13+
14+
permissions:
15+
contents: read
16+
17+
concurrency:
18+
group: registry-canary
19+
cancel-in-progress: true
20+
21+
jobs:
22+
consumer:
23+
name: ${{ matrix.consumer }} consumer
24+
runs-on: ubuntu-latest
25+
timeout-minutes: 30
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
consumer: [vite, expo]
30+
steps:
31+
- name: Checkout the code
32+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
33+
34+
- name: Set up Node.js
35+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
36+
with:
37+
node-version: '22'
38+
registry-url: https://registry.npmjs.org
39+
40+
- name: Test published package consumer
41+
env:
42+
PACKAGE_SPEC: ${{ inputs.package_spec || 'react-native-bs-diff-patch@latest' }}
43+
run: node scripts/test-registry-consumers.mjs ${{ matrix.consumer }}

benchmarks/native-core.json

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"generatedAt": "2026-07-19T07:41:42.795Z",
3+
"runtime": {
4+
"cpu": "Apple M3 Pro",
5+
"compiler": "Apple clang version 17.0.0 (clang-1700.6.3.2)",
6+
"platform": "darwin-arm64"
7+
},
8+
"workload": {
9+
"description": "Deterministic files with one changed byte per 4 KiB",
10+
"memoryMetric": "Peak resident set size for one diff and patch process"
11+
},
12+
"results": [
13+
{
14+
"sizeMiB": 1,
15+
"diffMs": 149.7,
16+
"patchMs": 4.8,
17+
"patchBytes": 110,
18+
"peakRssKiB": 21616
19+
},
20+
{
21+
"sizeMiB": 10,
22+
"diffMs": 4103.3,
23+
"patchMs": 34.3,
24+
"patchBytes": 118,
25+
"peakRssKiB": 198224
26+
},
27+
{
28+
"sizeMiB": 50,
29+
"diffMs": 31852.3,
30+
"patchMs": 199.7,
31+
"patchBytes": 203,
32+
"peakRssKiB": 983408
33+
}
34+
]
35+
}

compatibility/ios-api/Podfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
require Pod::Executable.execute_command('node', ['-p',
2+
'require.resolve(
3+
"react-native/scripts/react_native_pods.rb",
4+
{paths: [process.argv[1]]},
5+
)', __dir__]).strip
6+
7+
platform :ios, min_ios_version_supported
8+
prepare_react_native_project!
9+
10+
target 'BsDiffPatchExample' do
11+
config = use_native_modules!
12+
13+
use_react_native!(
14+
:path => config[:reactNativePath],
15+
:app_path => "#{Pod::Config.instance.installation_root}/..",
16+
:hermes_enabled => false
17+
)
18+
19+
post_install do |installer|
20+
react_native_post_install(
21+
installer,
22+
config[:reactNativePath],
23+
:mac_catalyst_enabled => false
24+
)
25+
end
26+
end

compatibility/ios-api/package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "react-native-bs-diff-patch-ios-compatibility",
3+
"version": "0.0.0",
4+
"private": true
5+
}

0 commit comments

Comments
 (0)