Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
104 changes: 0 additions & 104 deletions .azurepipelines/build-rn-code-push-1es.yml

This file was deleted.

94 changes: 0 additions & 94 deletions .azurepipelines/test-rn-code-push.yml

This file was deleted.

65 changes: 39 additions & 26 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,60 @@ name: CI Tests

on:
pull_request:
types: [opened, edited]
workflow_dispatch:

jobs:
android-new-arch-test:
runs-on: self-hosted
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Run Android Tests
run: |
npm install
npm run test:android
- uses: jdx/mise-action@v4

- name: Install dependencies
run: npm install

- name: Lint and type-check
run: npm run build:tests

ios-new-arch-test:
runs-on: self-hosted
android-test:
needs: lint
runs-on: bitrise-react-native-code-push-linux-runner
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- name: Run iOS Tests
run: |
npm install
npm run test:ios
- uses: jdx/mise-action@v4

android-old-arch-test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: npm install

- name: Run Android Tests
- name: Enable KVM
run: |
npm install
npm run test:oldArch:android
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm

ios-old-arch-test:
runs-on: self-hosted
- name: Run Android Tests
uses: reactivecircus/android-emulator-runner@v2
env:
# Tests need `emulator` to be in $PATH.
PATH: /usr/local/lib/android/sdk/emulator:/usr/local/lib/android/sdk/platform-tools:${{ env.PATH }}
with:
api-level: 27

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: upgrade

target: google_apis
arch: x86
disable-animations: true
script: npm run test:android

ios-test:
needs: lint
runs-on: bitrise-react-native-code-push-macos-runner
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v7

- uses: jdx/mise-action@v4

- name: Run iOS Tests
run: |
npm install
npm run test:oldArch:ios
npm run test:ios
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,5 @@ Examples/testapp_rn

#CodePushExpoDemoApp
*.rm

.claude/settings.local.json
13 changes: 2 additions & 11 deletions ios/CodePush/CodePush.m
Original file line number Diff line number Diff line change
Expand Up @@ -538,19 +538,10 @@ - (void)loadBundle
// file (since Chrome wouldn't support it). Otherwise, update
// the current bundle URL to point at the latest update
if ([CodePush isUsingTestConfiguration] || ![super.bridge.bundleURL.scheme hasPrefix:@"http"]) {
RCTReloadCommandSetBundleURL([CodePush bundleURL]);
// [super.bridge setValue:[CodePush bundleURL] forKey:@"bundleURL"];
[super.bridge setValue:[CodePush bundleURL] forKey:@"bundleURL"];
}

// Add a small delay to ensure Fabric surface initialization is complete
// before triggering reload. This fixes a race condition in React Native 0.82+
// with New Architecture where RCTInstance invalidate and RCTFabricSurface start
// can run concurrently, causing a crash when MountingCoordinator's mutex is accessed
// after being destroyed.
//
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
RCTTriggerReloadCommandListeners(@"react-native-code-push: Restart");
});
RCTTriggerReloadCommandListeners(@"react-native-code-push: Restart");
});
}

Expand Down
4 changes: 4 additions & 0 deletions mise.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[tools]
node = "22"
java = "17"
ruby = "4.0"
35 changes: 34 additions & 1 deletion test/template/ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,38 @@ target 'TestCodePush' do
:mac_catalyst_enabled => false,
# :ccache_enabled => true
)

# Workaround: fmt 11.0.2 (pinned transitively via RCT-Folly) fails to compile on
# Xcode 26.4+ due to a compiler compatibility bug. Fixed upstream in fmt 12.1.0.
# See https://github.com/facebook/react-native/issues/55601
#
# REMOVE THIS once the React Native version used here bundles fmt >= 12.1.0
# (i.e. after upgrading React Native past 0.82.x).
installer.pods_project.targets.each do |target|
if target.name == 'fmt'
target.build_configurations.each do |config|
config.build_settings['CLANG_CXX_LANGUAGE_STANDARD'] = 'c++17'
end
end
end

# Skip the x86_64 simulator slice. Test runs only ever target an arm64
# simulator (Apple Silicon), so building x86_64 as well just doubles
# compile/link time for a slice that never runs, and adds unnecessary
# failure surface (e.g. codegen sources that don't compile cleanly for it).
installer.pods_project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
end
end

installer.aggregate_targets.each do |aggregate_target|
aggregate_target.user_project.native_targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['EXCLUDED_ARCHS[sdk=iphonesimulator*]'] = 'x86_64'
end
end
aggregate_target.user_project.save
end
end
end
end
2 changes: 1 addition & 1 deletion test/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ class RNIOS extends Platform.IOS implements RNPlatform {
return this.getEmulatorManager().getTargetEmulator()
.then((targetEmulator: string) => {
return TestUtil.getProcessOutput("xcodebuild -workspace " + path.join(iOSProject, TestConfig.TestAppName) + ".xcworkspace -scheme " + TestConfig.TestAppName +
" -configuration Release -destination \"platform=iOS Simulator,id=" + targetEmulator + "\" -derivedDataPath build EXCLUDED_ARCHS=arm64", { cwd: iOSProject, timeout: 30 * 60 * 1000, maxBuffer: 1024 * 1024 * 5000, noLogStdOut: true });
" -configuration Release -destination \"platform=iOS Simulator,id=" + targetEmulator + "\" -derivedDataPath build", { cwd: iOSProject, timeout: 10 * 60 * 1000, maxBuffer: 1024 * 1024 * 5000, noLogStdOut: true });
})
.then<void>(
() => { return null; },
Expand Down
Loading