Skip to content

Commit

Permalink
[CI] Update Build Matrix (#2104)
Browse files Browse the repository at this point in the history
* Replace `--frozen-lockfile` with --immutable

* Remove `apple-install-dependencies

* Update  apple-xcode-select

* Use macos-13-arm64

* Build Debug only

* Use custom Xcodebuild template

* Separate build & test

* Use Codeql v2

* Update template syntax

* try major refactor

* rename apple-job-publish

* try big 2

* Fix Hermes

* Comment out test temporarily

* Fix visionOS + New Arch + JSC

* Move iOS down, visionOS -> xrOS

* Comment out failing jobs

* Update build-test-rntester.yml

* Move scripts to scripts folder

* Update RNTA script for RNM use

* Update VM image per notice

* Update gitignore

* Don't test on visionOS

* fix use out-of-scope memory warning (facebook#41441)

Summary:
Pull Request resolved: facebook#41441

changelog: [internal]

Reviewed By: cipolleschi

Differential Revision: D51233760

fbshipit-source-id: 5fc7ab22220e3d80729243e715e22e85e3ba7afa

* Retry xcode tests on failure

---------

Co-authored-by: Samuel Susla <[email protected]>
  • Loading branch information
Saadnajmi and sammy-SC authored May 21, 2024
1 parent 9bf4f6e commit 7c404aa
Show file tree
Hide file tree
Showing 32 changed files with 802 additions and 474 deletions.
1 change: 1 addition & 0 deletions .ado/Brewfile
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
brew "xcbeautify"
brew "ccache"
240 changes: 17 additions & 223 deletions .ado/apple-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: $(Date:yyyyMMdd).$(Rev:.r)

variables:
- template: variables/vars.yml
- template: /.ado/variables/vars.yml@self

trigger: none # will disable CI builds entirely

Expand All @@ -15,229 +15,23 @@ pr:
exclude:
- '*.md'

jobs:
- job: JavaScriptPR
displayName: Javascript PR
pool:
vmImage: $(VmImageApple)
demands: ['xcode', 'sh', 'npm']
steps:
- template: templates/apple-job-javascript.yml
parameters:
slice_name: $(slice_name)
xcode_version: $(xcode_version)
stages:
- stage: Build_And_Test
displayName: 'Build and Test'
dependsOn: []
jobs:
- template: /.ado/jobs/build-test-rntester.yml@self

- job: ApplePR
displayName: PR
strategy:
matrix:
'iOS Paper Debug JSC':
packager_platform: 'ios'
xcode_sdk: iphonesimulator
xcode_scheme: 'RNTester'
xcode_configuration: 'Debug'
xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
xcode_actions: 'build test'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
new_arch_enabled: '0'
use_hermes: '0'
'iOS Paper Release JSC':
packager_platform: 'ios'
xcode_sdk: iphonesimulator
xcode_scheme: 'RNTester'
xcode_configuration: 'Release'
xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
xcode_actions: 'build'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
new_arch_enabled: '0'
use_hermes: '0'
'macOS Paper Debug JSC':
packager_platform: 'macos'
xcode_sdk: macosx
xcode_scheme: 'RNTester-macOS'
xcode_configuration: 'Debug'
xcode_destination: 'platform=macOS,arch=x86_64'
xcode_actions: 'build test'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
new_arch_enabled: '0'
use_hermes: '0'
'macOS Paper Release JSC':
packager_platform: 'macos'
xcode_sdk: macosx
xcode_scheme: 'RNTester-macOS'
xcode_configuration: 'Release'
xcode_destination: 'platform=macOS,arch=x86_64'
xcode_actions: 'build'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
new_arch_enabled: '0'
use_hermes: '0'
'iOS Fabric Debug JSC':
packager_platform: 'ios'
xcode_sdk: iphonesimulator
xcode_scheme: 'RNTester'
xcode_configuration: 'Debug'
xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
xcode_actions: 'build' # https://github.com/facebook/react-native/issues/39719 Tests fail on RNTester with `RCT_NEW_ARCH_ENABLED`
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
new_arch_enabled: '1'
use_hermes: '0'
'iOS Fabric Release JSC':
packager_platform: 'ios'
xcode_sdk: iphonesimulator
xcode_scheme: 'RNTester'
xcode_configuration: 'Release'
xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
xcode_actions: 'build'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
new_arch_enabled: '1'
use_hermes: '0'
'macOS Fabric Debug JSC':
packager_platform: 'macos'
xcode_sdk: macosx
xcode_scheme: 'RNTester-macOS'
xcode_configuration: 'Debug'
xcode_destination: 'platform=macOS,arch=x86_64'
xcode_actions: 'build' # https://github.com/facebook/react-native/issues/39719 Tests fail on RNTester with `RCT_NEW_ARCH_ENABLED`
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
new_arch_enabled: '1'
use_hermes: '0'
'macOS Fabric Release JSC':
packager_platform: 'macos'
xcode_sdk: macosx
xcode_scheme: 'RNTester-macOS'
xcode_configuration: 'Release'
xcode_destination: 'platform=macOS,arch=x86_64'
xcode_actions: 'build'
xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
new_arch_enabled: '1'
use_hermes: '0'
# Disable Hermes Jobs for now
# 'iOS Paper Debug Hermes':
# packager_platform: 'ios'
# xcode_sdk: iphonesimulator
# xcode_scheme: 'RNTester'
# xcode_configuration: 'Debug'
# xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
# xcode_actions: 'build test'
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
# new_arch_enabled: '0'
# use_hermes: '1'
# 'iOS Paper Release Hermes':
# packager_platform: 'ios'
# xcode_sdk: iphonesimulator
# xcode_scheme: 'RNTester'
# xcode_configuration: 'Release'
# xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
# xcode_actions: 'build'
# new_arch_enabled: '0'
# use_hermes: '1'
# 'macOS Paper Debug Hermes':
# packager_platform: 'macos'
# xcode_sdk: macosx
# xcode_scheme: 'RNTester-macOS'
# xcode_configuration: 'Debug'
# xcode_destination: 'platform=macOS,arch=x86_64'
# xcode_actions: 'build test'
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
# new_arch_enabled: '0'
# use_hermes: '1'
# 'macOS Paper Release Hermes':
# packager_platform: 'macos'
# xcode_sdk: macosx
# xcode_scheme: 'RNTester-macOS'
# xcode_configuration: 'Release'
# xcode_destination: 'platform=macOS,arch=x86_64'
# xcode_actions: 'build'
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
# new_arch_enabled: '0'
# use_hermes: '1'
# 'iOS Fabric Debug Hermes':
# packager_platform: 'ios'
# xcode_sdk: iphonesimulator
# xcode_scheme: 'RNTester'
# xcode_configuration: 'Debug'
# xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
# xcode_actions: 'build' # https://github.com/facebook/react-native/issues/39719 Tests fail on RNTester with `RCT_NEW_ARCH_ENABLED`
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
# new_arch_enabled: '1'
# use_hermes: '1'
# 'iOS Fabric Release Hermes':
# packager_platform: 'ios'
# xcode_sdk: iphonesimulator
# xcode_scheme: 'RNTester'
# xcode_configuration: 'Release'
# xcode_destination: 'platform=iOS Simulator,OS=$(ios_version),name=$(ios_simulator)'
# xcode_actions: 'build'
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
# new_arch_enabled: '1'
# use_hermes: '0'
# 'macOS Fabric Debug Hermes':
# packager_platform: 'macos'
# xcode_sdk: macosx
# xcode_scheme: 'RNTester-macOS'
# xcode_configuration: 'Debug'
# xcode_destination: 'platform=macOS,arch=x86_64'
# xcode_actions: 'build' # https://github.com/facebook/react-native/issues/39719 Tests fail on RNTester with `RCT_NEW_ARCH_ENABLED`
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/debug_overrides.xcconfig'
# new_arch_enabled: '1'
# use_hermes: '1'
# 'macOS Fabric Release Hermes':
# packager_platform: 'macos'
# xcode_sdk: macosx
# xcode_scheme: 'RNTester-macOS'
# xcode_configuration: 'Release'
# xcode_destination: 'platform=macOS,arch=x86_64'
# xcode_actions: 'build'
# xcode_extraArgs: '-xcconfig $(Build.Repository.LocalPath)/.ado/xcconfig/release_overrides.xcconfig'
# new_arch_enabled: '1'
# use_hermes: '1'
pool:
vmImage: $(VmImageApple)
demands: ['xcode', 'sh', 'npm']
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
steps:
- template: templates/apple-job-react-native.yml
parameters:
packager_platform: $(packager_platform)
xcode_sdk: $(xcode_sdk)
xcode_configuration: $(xcode_configuration)
xcode_scheme: $(xcode_scheme)
xcode_actions: $(xcode_actions)
xcode_destination: $(xcode_destination)
slice_name: $(slice_name)
xcode_version: $(xcode_version)
xcode_extraArgs: $(xcode_extraArgs)
- stage: JSOnly
dependsOn: []
jobs:
- template: /.ado/jobs/test-javascript.yml@self

- job: CliInit
displayName: Verify react-native-macos-init
strategy:
matrix:
MacDebug:
configuration: Debug
pool:
vmImage: $(VmImageApple)
demands: ['xcode', 'sh', 'npm']
steps:
- template: templates/react-native-macos-init.yml
parameters:
configuration: $(configuration)
- template: /.ado/jobs/npm-publish-dry-run.yml@self

- job: NPMPublishDryRun
displayName: NPM Publish Dry Run
pool:
vmImage: $(VmImageApple)
timeoutInMinutes: 60 # how long to run the job before automatically cancelling
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
steps:
- checkout: self # self represents the repo where the initial Pipelines YAML file was found
clean: true # whether to fetch clean each time
# fetchDepth: 2 # the depth of commits to ask Git to fetch
lfs: false # whether to download Git-LFS files
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
- stage: Integration
dependsOn: []
jobs:
- template: /.ado/jobs/test-react-native-macos-init.yml@self

- template: templates/apple-job-publish.yml
parameters:
build_type: 'dry-run'
# - template: /.ado/jobs/react-native-test-app-integration.yml@self
Loading

0 comments on commit 7c404aa

Please sign in to comment.