Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(0.74): publish a nuget for internal use #2357

Open
wants to merge 1 commit into
base: 0.74-stable
Choose a base branch
from
Open
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
356 changes: 356 additions & 0 deletions .ado/ReactApple.nuspec

Large diffs are not rendered by default.

154 changes: 31 additions & 123 deletions .ado/jobs/build-test-rntester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,90 +2,54 @@ parameters:
- name: appleBuildMatrix
type: object
default:
- name: macos_oldarch_jsc
- name: macos_debug_oldarch_jsc
friendly_name: 'macOS, Old Arch, JSC'
sdk: macosx
configuration: Debug
scheme: RNTester-macOS
packager_platform: 'macos'
new_arch_enabled: '0'
use_hermes: '0'
- name: macos_newarch_jsc
- name: macos_debug_newarch_jsc
friendly_name: 'macOS, New Arch, JSC'
sdk: macosx
configuration: Debug
scheme: RNTester-macOS
packager_platform: 'macos'
new_arch_enabled: '1'
use_hermes: '0'
# - name: macos_oldarch_hermes
# friendly_name: 'macOS, Old Arch, Hermes'
# sdk: macosx
# scheme: RNTester-macOS
# packager_platform: 'macos'
# new_arch_enabled: '1'
# use_hermes: '1'
# - name: macos_newarch_hermes
# friendly_name: 'macOS, New Arch, Hermes'
# sdk: macosx
# scheme: RNTester-macOS
# packager_platform: 'macos'
# new_arch_enabled: '1'
# use_hermes: '1'
- name: ios_oldarch_jsc
- name: ios_debug_oldarch_jsc
friendly_name: 'iOS, Old Arch, JSC'
sdk: iphonesimulator
configuration: Debug
scheme: RNTester
packager_platform: 'ios'
new_arch_enabled: '0'
use_hermes: '0'
- name: ios_newarch_jsc
- name: ios_debug_newarch_jsc
friendly_name: 'iOS, New Arch, JSC'
sdk: iphonesimulator
configuration: Debug
scheme: RNTester
packager_platform: 'ios'
new_arch_enabled: '1'
use_hermes: '0'
# - name: ios_oldarch_hermes
# friendly_name: 'iOS, Old Arch, Hermes'
# sdk: iphonesimulator
# scheme: RNTester
# packager_platform: 'ios'
# new_arch_enabled: '1'
# use_hermes: '1'
# - name: ios_newarch_hermes
# friendly_name: 'iOS, New Arch, Hermes'
# sdk: iphonesimulator
# scheme: RNTester
# packager_platform: 'ios'
# new_arch_enabled: '1'
# use_hermes: '1'
- name: xros_oldarch_jsc
- name: xros_debug_oldarch_jsc
friendly_name: 'xrOS, Old Arch, JSC'
sdk: xrsimulator
configuration: Debug
scheme: RNTester-visionOS
packager_platform: 'ios'
new_arch_enabled: '0'
use_hermes: '0'
- name: xros_newarch_jsc
- name: xros_debug_newarch_jsc
friendly_name: 'xrOS, New Arch, JSC'
sdk: xrsimulator
configuration: Debug
scheme: RNTester-visionOS
packager_platform: 'ios'
new_arch_enabled: '1'
use_hermes: '0'
# - name: xros_oldarch_hermes
# friendly_name: 'xrOS, Old Arch, Hermes'
# sdk: xrsimulator
# scheme: RNTester-visionOS
# packager_platform: 'ios'
# new_arch_enabled: '1'
# use_hermes: '1'
# - name: xros_newarch_hermes
# friendly_name: 'xrOS, New Arch, Hermes'
# sdk: xrsimulator
# scheme: RNTester-visionOS
# packager_platform: 'ios'
# new_arch_enabled: '1'
# use_hermes: '1'

jobs:
- ${{ each slice in parameters.appleBuildMatrix }}:
Expand All @@ -98,79 +62,23 @@ jobs:
steps:
- template: /.ado/templates/apple-tools-setup.yml@self

- ${{ if in(slice.sdk, 'xros', 'xrsimulator') }}:
- task: CmdLine@2
displayName: Download visionOS SDDK
inputs:
script: |
set -eox
# https://github.com/actions/runner-images/issues/10559
sudo xcodebuild -runFirstLaunch
sudo xcrun simctl list
sudo xcodebuild -downloadPlatform visionOS
sudo xcodebuild -runFirstLaunch

- task: CmdLine@2
- script: |
yarn install
displayName: yarn install
inputs:
script: |
set -eox pipefail
yarn install --immutable

- task: CmdLine@2
displayName: pod install
inputs:
script: |
set -eox pipefail
cd packages/rn-tester
bundle install
bundle exec pod install --verbose
env:
RCT_NEW_ARCH_ENABLED: ${{ slice.new_arch_enabled }}
USE_HERMES: ${{ slice.use_hermes }}

- task: CmdLine@2
displayName: Build ${{ slice.scheme }}
inputs:
script: |
set -eox pipefail
./.ado/scripts/xcodebuild.sh packages/rn-tester/RNTesterPods.xcworkspace ${{ slice.sdk }} ${{ slice.scheme }} build
env:
CCACHE_DISABLE: 1

# Skip testing on visionOS via the conditions below

- ${{ if ne(slice.scheme, 'RNTester-visionOS') }}:
- task: ShellScript@2
displayName: 'Setup packager and WebSocket test server'
inputs:
scriptPath: '.ado/scripts/ado-test-setup.sh'
disableAutoCwd: true
cwd: ''

- bash: |
echo Preparing the packager for platform $PLATFORM
curl --retry-connrefused --connect-timeout 5 --max-time 10 --retry 10 --retry-delay 5 --retry-max-time 120 "http://localhost:8081/packages/rn-tester/js/RNTesterApp.${PLATFORM}.bundle?platform=${PLATFORM}&dev=true" -o /dev/null
curl --retry-connrefused --connect-timeout 5 --max-time 10 --retry 10 --retry-delay 5 --retry-max-time 120 "http://localhost:8081/packages/rn-tester/js/RNTesterApp.${PLATFORM}.bundle?platform=${PLATFORM}&dev=true&minify=false" -o /dev/null
curl --retry-connrefused --connect-timeout 5 --max-time 10 --retry 10 --retry-delay 5 --retry-max-time 120 "http://localhost:8081/IntegrationTests/IntegrationTestsApp.bundle?platform=${PLATFORM}&dev=true" -o /dev/null
curl --retry-connrefused --connect-timeout 5 --max-time 10 --retry 10 --retry-delay 5 --retry-max-time 120 "http://localhost:8081/IntegrationTests/RCTRootViewIntegrationTestApp.bundle?platform=${PLATFORM}&dev=true" -o /dev/null
env:
PLATFORM: ${{ slice.packager_platform }}
displayName: 'curl the packager'

- task: CmdLine@2
displayName: Test ${{ slice.scheme }}
inputs:
script: |
set -eox pipefail
./.ado/scripts/xcodebuild.sh packages/rn-tester/RNTesterPods.xcworkspace ${{ slice.sdk }} ${{ slice.scheme }} test
env:
CCACHE_DISABLE: 1

- task: ShellScript@2
displayName: 'Cleanup packager and WebSocket test server'
inputs:
scriptPath: '.ado/scripts/ado-test-cleanup.sh'
disableAutoCwd: true
cwd: ''
condition: always()

- template: /.ado/templates/build-rntester-steps.yml@self
parameters:
sdk: ${{ slice.sdk }}
configuration: ${{ slice.configuration }}
scheme: ${{ slice.scheme }}
new_arch_enabled: ${{ slice.new_arch_enabled }}
use_hermes: ${{ slice.use_hermes }}

# https://github.com/microsoft/react-native-macos/issues/2297
# Skip native tests as they tend to be flaky
# - template: /.ado/templates/test-rntester-steps.yml@self
# parameters:
# sdk: ${{ slice.sdk }}
# configuration: ${{ slice.configuration }}
# scheme: ${{ slice.scheme }}
# packager_platform: ${{ slice.packager_platform }}
14 changes: 3 additions & 11 deletions .ado/jobs/npm-publish-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,8 @@ jobs:
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
timeoutInMinutes: 60
cancelTimeoutInMinutes: 5
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
- template: /.ado/templates/npm-publish-steps.yml@self

- template: /.ado/templates/apple-steps-publish.yml@self
parameters:
build_type: 'dry-run'
19 changes: 19 additions & 0 deletions .ado/jobs/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
jobs:
- job: NPMPublish
displayName: NPM Publish
pool:
name: cxeiss-ubuntu-20-04-large
image: cxe-ubuntu-20-04-1es-pt
os: linux
variables:
- name: BUILDSECMON_OPT_IN
value: true
timeoutInMinutes: 90
cancelTimeoutInMinutes: 5
templateContext:
outputs:
- output: pipelineArtifact
targetPath: $(System.DefaultWorkingDirectory)
artifactName: github-npm-js-publish
steps:
- template: /.ado/templates/npm-publish-steps.yml@self
Loading
Loading