Skip to content

Commit

Permalink
ci: publish a nuget for internal use (#2336)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi authored Jan 23, 2025
1 parent 332e62b commit 9753d25
Show file tree
Hide file tree
Showing 11 changed files with 729 additions and 170 deletions.
356 changes: 356 additions & 0 deletions .ado/ReactApple.nuspec

Large diffs are not rendered by default.

129 changes: 28 additions & 101 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 @@ -100,58 +64,21 @@ jobs:

- script: |
yarn install
displayName: Install npm dependencies
- script: |
set -eox pipefail
bundle install
bundle exec pod install --verbose
env:
RCT_NEW_ARCH_ENABLED: ${{ slice.new_arch_enabled }}
USE_HERMES: ${{ slice.use_hermes }}
workingDirectory: packages/rn-tester
displayName: Install Pods
- script: |
set -eox pipefail
.ado/scripts/xcodebuild.sh packages/rn-tester/RNTesterPods.xcworkspace ${{ slice.sdk }} ${{ slice.scheme }} build
env:
CCACHE_DISABLE: 1
displayName: Build ${{ slice.scheme }}
displayName: yarn install
- 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

# - ${{ 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: ''

# - script: |
# 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: Fetch JS bundles from dev server

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

# - 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/test-rntester-steps.yml@self
# parameters:
# sdk: ${{ slice.sdk }}
# configuration: ${{ slice.configuration }}
# scheme: ${{ slice.scheme }}
# packager_platform: ${{ slice.packager_platform }}
9 changes: 2 additions & 7 deletions .ado/jobs/npm-publish-dry-run.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +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
fetchFilter: blob:none # partial clone for faster clones while maintaining history
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

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

0 comments on commit 9753d25

Please sign in to comment.