Skip to content
Draft
10 changes: 6 additions & 4 deletions .buildkite/basic/react-native-android-full-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ steps:
timeout_in_minutes: 20
env:
REACT_NATIVE_VERSION: "rn0.68-hermes"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
plugins:
- docker-compose#v4.12.0:
pull: react-native-android-builder-java-11-node-16
Expand All @@ -69,6 +70,7 @@ steps:
timeout_in_minutes: 20
env:
REACT_NATIVE_VERSION: "rn0.69"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
plugins:
- docker-compose#v4.12.0:
pull: react-native-android-builder-java-11-node-16
Expand All @@ -82,7 +84,6 @@ steps:

- label: ':android: Build RN {{matrix}} test fixture APK (Old Arch)'
key: "build-react-native-android-fixture-old-arch-full"
depends_on: "publish-js"
timeout_in_minutes: 15
agents:
queue: macos-node-18
Expand All @@ -92,6 +93,7 @@ steps:
RN_VERSION: "{{matrix}}"
RCT_NEW_ARCH_ENABLED: "0"
BUILD_ANDROID: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/old-arch/**/reactnative.apk"
commands:
Expand All @@ -110,7 +112,6 @@ steps:

- label: ':android: Build RN {{matrix}} test fixture APK (New Arch)'
key: "build-react-native-android-fixture-new-arch-full"
depends_on: "publish-js"
timeout_in_minutes: 15
agents:
queue: macos-node-18
Expand All @@ -120,6 +121,7 @@ steps:
RN_VERSION: "{{matrix}}"
RCT_NEW_ARCH_ENABLED: "1"
BUILD_ANDROID: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/new-arch/**/reactnative.apk"
commands:
Expand All @@ -138,7 +140,6 @@ steps:

- label: ':android: Build react-native-navigation {{matrix}} test fixture APK (Old Arch)'
key: "build-react-native-navigation-android-fixture-old-arch"
depends_on: "publish-js"
timeout_in_minutes: 30
agents:
queue: macos-node-18
Expand All @@ -149,6 +150,7 @@ steps:
RCT_NEW_ARCH_ENABLED: "0"
BUILD_ANDROID: "true"
REACT_NATIVE_NAVIGATION: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/react-native-navigation/old-arch/**/reactnative.apk"
commands:
Expand All @@ -164,7 +166,6 @@ steps:

- label: ':android: Build react-native-navigation {{matrix}} test fixture APK (New Arch)'
key: "build-react-native-navigation-android-fixture-new-arch"
depends_on: "publish-js"
timeout_in_minutes: 30
agents:
queue: macos-node-18
Expand All @@ -175,6 +176,7 @@ steps:
RCT_NEW_ARCH_ENABLED: "1"
BUILD_ANDROID: "true"
REACT_NATIVE_NAVIGATION: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/react-native-navigation/new-arch/**/reactnative.apk"
commands:
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/basic/react-native-android-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ steps:
steps:
- label: ':android: Build RN {{matrix}} test fixture APK (Old Arch)'
key: "build-react-native-android-fixture-old-arch"
depends_on: "publish-js"
timeout_in_minutes: 15
agents:
queue: macos-node-18
Expand All @@ -17,6 +16,7 @@ steps:
RN_VERSION: "{{matrix}}"
RCT_NEW_ARCH_ENABLED: "0"
BUILD_ANDROID: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/old-arch/**/reactnative.apk"
commands:
Expand All @@ -31,7 +31,6 @@ steps:

- label: ':android: Build RN {{matrix}} test fixture APK (New Arch)'
key: "build-react-native-android-fixture-new-arch"
depends_on: "publish-js"
timeout_in_minutes: 15
agents:
queue: macos-node-18
Expand All @@ -41,6 +40,7 @@ steps:
RN_VERSION: "{{matrix}}"
RCT_NEW_ARCH_ENABLED: "1"
BUILD_ANDROID: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/new-arch/**/reactnative.apk"
commands:
Expand Down
4 changes: 2 additions & 2 deletions .buildkite/basic/react-native-cli-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ steps:
steps:
- label: ':android: RN CLI - {{matrix}} Android build and sourcemap upload tests'
key: "build-react-native-cli-android-fixture"
depends_on: "publish-js"
timeout_in_minutes: 15
agents:
queue: "macos-15-isolated"
Expand All @@ -18,6 +17,7 @@ steps:
RCT_NEW_ARCH_ENABLED: "0"
BUILD_ANDROID: "true"
INIT_RN_CLI: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native-cli/features/fixtures/generated/old-arch/**/reactnative.apk"
commands:
Expand All @@ -35,7 +35,6 @@ steps:

- label: ':mac: RN CLI - {{matrix}} iOS build and sourcemap upload tests'
key: "build-react-native-cli-ios-fixture"
depends_on: "publish-js"
timeout_in_minutes: 20
agents:
queue: "macos-15-isolated"
Expand All @@ -47,6 +46,7 @@ steps:
XCODE_VERSION: "16.2.0"
INIT_RN_CLI: "true"
EXPORT_ARCHIVE: "0"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native-cli/features/fixtures/generated/old-arch/**/output/reactnative.ipa"
commands:
Expand Down
12 changes: 7 additions & 5 deletions .buildkite/basic/react-native-ios-full-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@ steps:
#
- label: ":ios: Build RN 0.68 Hermes ipa"
key: "rn-0-68-hermes-ipa"
depends_on: "publish-js"
timeout_in_minutes: 20
agents:
queue: "macos-12-arm"
env:
REACT_NATIVE_VERSION: rn0.68-hermes
LANG: "en_US.UTF-8"
DEVELOPER_DIR: "/Applications/Xcode14.app"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths: build/rn0.68-hermes.ipa
commands:
- npm run test:publish
- npm run test:build-react-native-ios
retry:
automatic:
Expand All @@ -29,16 +30,17 @@ steps:

- label: ":ios: Build RN 0.69 ipa"
key: "rn-0-69-ipa"
depends_on: "publish-js"
timeout_in_minutes: 20
agents:
queue: "macos-12-arm"
env:
REACT_NATIVE_VERSION: rn0.69
LANG: "en_US.UTF-8"
DEVELOPER_DIR: "/Applications/Xcode14.app"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths: build/rn0.69.ipa
commands:
- npm run test:publish
- npm run test:build-react-native-ios
retry:
automatic:
Expand All @@ -47,7 +49,6 @@ steps:

- label: ':mac: Build RN {{matrix}} test fixture ipa (Old Arch)'
key: "build-react-native-ios-fixture-old-arch-full"
depends_on: "publish-js"
timeout_in_minutes: 30
agents:
queue: "macos-15"
Expand All @@ -57,6 +58,7 @@ steps:
RCT_NEW_ARCH_ENABLED: "0"
BUILD_IOS: "true"
XCODE_VERSION: "16.2.0"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/old-arch/**/output/reactnative.ipa"
commands:
Expand All @@ -75,7 +77,6 @@ steps:

- label: ':mac: Build RN {{matrix}} test fixture ipa (New Arch)'
key: "build-react-native-ios-fixture-new-arch-full"
depends_on: "publish-js"
timeout_in_minutes: 30
agents:
queue: "macos-15"
Expand All @@ -85,6 +86,7 @@ steps:
RCT_NEW_ARCH_ENABLED: "1"
BUILD_IOS: "true"
XCODE_VERSION: "16.2.0"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/new-arch/**/output/reactnative.ipa"
commands:
Expand All @@ -103,7 +105,6 @@ steps:

- label: ':mac: Build react-native-navigation {{matrix}} test fixture ipa (Old Arch)'
key: "build-react-native-navigation-ios-fixture-old-arch"
depends_on: "publish-js"
timeout_in_minutes: 30
agents:
queue: "macos-15"
Expand All @@ -114,6 +115,7 @@ steps:
BUILD_IOS: "true"
XCODE_VERSION: "16.2.0"
REACT_NATIVE_NAVIGATION: "true"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/react-native-navigation/old-arch/**/output/reactnative.ipa"
commands:
Expand Down
12 changes: 10 additions & 2 deletions .buildkite/basic/react-native-ios-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ steps:
#
- label: ':mac: Build RN {{matrix}} test fixture ipa (Old Arch)'
key: "build-react-native-ios-fixture-old-arch"
depends_on: "publish-js"
depends_on: "publish-js-new"
plugins:
artifacts#v1.9.0:
download: "packages.zip"
timeout_in_minutes: 20
agents:
queue: "macos-15"
Expand All @@ -21,6 +24,7 @@ steps:
RCT_NEW_ARCH_ENABLED: "0"
BUILD_IOS: "true"
XCODE_VERSION: "16.2.0"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/old-arch/**/output/reactnative.ipa"
commands:
Expand All @@ -35,7 +39,10 @@ steps:

- label: ':mac: Build RN {{matrix}} test fixture ipa (New Arch)'
key: "build-react-native-ios-fixture-new-arch"
depends_on: "publish-js"
depends_on: "publish-js-new"
plugins:
artifacts#v1.9.0:
download: "packages.zip"
timeout_in_minutes: 20
agents:
queue: "macos-15"
Expand All @@ -45,6 +52,7 @@ steps:
RCT_NEW_ARCH_ENABLED: "1"
BUILD_IOS: "true"
XCODE_VERSION: "16.2.0"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
artifact_paths:
- "test/react-native/features/fixtures/generated/new-arch/**/output/reactnative.ipa"
commands:
Expand Down
17 changes: 17 additions & 0 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,23 @@ steps:
- exit_status: "*"
limit: 1

- label: "Build and publish JS packages (local)"
key: "publish-js-new"
timeout_in_minutes: 10
agents:
queue: "macos-node-18"
env:
NODE_VERSION: "18"
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1"
command:
- "node scripts/publish-packages.js"
- "zip -r packages.zip dist/*.tgz"
artifact_paths: "packages.zip"
retry:
automatic:
- exit_status: "*"
limit: 1

#
# Core tests and checks
#
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@
"test:build-react-native-ios": "bundle install && node -e 'require(\"./scripts/react-native-helper\").buildIOS()'",
"test:build-react-native-maze-runner": "docker-compose build --pull react-native-maze-runner",
"test:node": "npm run test:build-node-container && docker compose run --use-aliases node-maze-runner",
"test:publish": "node scripts/publish_local.js",
"test:react-native:ios": "npm run test:build-react-native-ios && npm run test:build-react-native-maze-runner && APP_LOCATION=build/$REACT_NATIVE_VERSION.ipa docker-compose run --use-aliases react-native-maze-runner",
"local-npm:start": "verdaccio --config test/electron/local-npm-config.yml --listen 0.0.0.0:5539",
"local-npm:publish-all": "lerna publish \"$VERSION_IDENTIFIER\" --yes --force-publish --exact --no-push --no-git-reset --no-git-tag-version --registry 'http://0.0.0.0:5539'",
Expand Down
29 changes: 19 additions & 10 deletions scripts/generate-react-native-cli-fixture.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ if (!process.env.RN_VERSION) {
process.exit(1)
}

if (!process.env.REGISTRY_URL) {
console.error('Please provide a Registry URL')
process.exit(1)
}

if (!process.env.RCT_NEW_ARCH_ENABLED || (process.env.RCT_NEW_ARCH_ENABLED !== '1' && process.env.RCT_NEW_ARCH_ENABLED !== '0')) {
console.error('RCT_NEW_ARCH_ENABLED must be set to 1 or 0')
process.exit(1)
Expand All @@ -43,9 +38,22 @@ const fixtureDir = resolve(ROOT_DIR, fixturePath, reactNativeVersion)

const replacementFilesDir = resolve(ROOT_DIR, 'test/react-native-cli/features/fixtures/app/dynamic/')

const PEER_DEPENDENCIES = [
`@bugsnag/react-native-cli@${notifierVersion}`
]
function packLocalPackages () {
// Build all packages first
execSync('npm ci', { cwd: ROOT_DIR, stdio: 'inherit' })
execSync('npm run build', { cwd: ROOT_DIR, stdio: 'inherit' })

// Pack the react-native-cli package
const packagesDir = resolve(ROOT_DIR, 'packages')
const packages = [
'react-native-cli'
]

// Pack each package and move the tarballs to the fixture directory
for (const pkg of packages) {
execSync(`npm pack "${resolve(packagesDir, pkg)}" --pack-destination "${fixtureDir}"`, { stdio: 'inherit' })
}
}

// Generate the fixture
if (!process.env.SKIP_GENERATE_FIXTURE) {
Expand All @@ -64,8 +72,9 @@ if (!process.env.SKIP_GENERATE_FIXTURE) {

iosUtils.configureIOSProject(fixtureDir)

// install the peer dependencies
execSync(`npm install --save ${PEER_DEPENDENCIES} --registry ${process.env.REGISTRY_URL} --legacy-peer-deps`, { cwd: fixtureDir, stdio: 'inherit' })
// Pack and install local packages
packLocalPackages()
execSync('npm install --save bugsnag-*.tgz --legacy-peer-deps', { cwd: fixtureDir, stdio: 'inherit' })

if (process.env.INIT_RN_CLI === 'true' || process.env.INIT_RN_CLI === '1') {
enableSourceMaps()
Expand Down
Loading