Skip to content

Commit 9c07e63

Browse files
authored
Merge branch 'main' into remove-extra-diffs
2 parents 147d907 + e960741 commit 9c07e63

File tree

18 files changed

+1324
-397
lines changed

18 files changed

+1324
-397
lines changed

.ado/android-pr.yml

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ variables:
1818
jobs:
1919
- job: AndroidRNPR
2020
displayName: Android React Native PR
21-
pool: $(PoolUbuntu)
21+
pool: cxe-ubuntu-20-04-large
2222
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
2323
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
2424
steps:
@@ -29,23 +29,15 @@ jobs:
2929
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
3030
persistCredentials: false # set to 'true' to leave the OAuth token in the Git config after the initial fetch
3131

32-
- template: templates/android-build-office.yml
32+
- template: templates/android-build-office-setup.yml
3333

34-
- template: templates/prep-android-nuget.yml
34+
- template: templates/android-build-office.yml
3535

3636
- template: templates/download-android-dependencies.yml
3737
parameters:
3838
artifact_feed: react-native/react-native-public
3939

40-
# Very similar to the default pack task .. but appends 'ndk21' to the nuget pack version
41-
- task: CmdLine@2
42-
displayName: 'Verify NuGet can be packed'
43-
inputs:
44-
script: NDK=ndk`cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | awk '{ print $3}' | awk -F. '{ print $1 }'`; mono $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe pack $(System.DefaultWorkingDirectory)/ReactAndroid/ReactAndroid.nuspec -OutputDirectory $(Build.StagingDirectory)/final -Properties buildNumber=$(buildNumber)-$NDK;commitId=$(Build.SourceVersion)
45-
46-
# Android CI doesn't create a nuget now, but this check is failing builds. Quickest fix to unblock builds is to disable the check... but we need to find the root cause and fix it and enable this again.
47-
# - script: '[ -f $(System.DefaultWorkingDirectory)/*.nupkg ]'
48-
# displayName: Verify that NuGet was actually created
40+
- template: templates/android-nuget-pack.yml
4941

5042
- task: CmdLine@2
5143
displayName: 'Npm pack'

.ado/publish.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ jobs:
126126

127127
- job: RNMacOSInitNpmJSPublish
128128
displayName: react-native-macos-init Publish to npmjs.org
129-
pool: Azure-Pipelines-EO-Ubuntu20.04-Office
129+
pool: cxeiss-ubuntu-20-04-large
130130
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
131131
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
132132
condition: eq(variables['Build.SourceBranchName'], 'main')
@@ -181,8 +181,8 @@ jobs:
181181

182182
- job: RNGithubOfficePublish
183183
displayName: React-Native GitHub Publish to Office
184-
pool: Azure-Pipelines-EO-Ubuntu20.04-Office
185-
timeoutInMinutes: 90 # how long to run the job before automatically cancelling
184+
pool: cxeiss-ubuntu-20-04-large
185+
timeoutInMinutes: 120 # how long to run the job before automatically cancelling
186186
cancelTimeoutInMinutes: 5 # how much time to give 'run always even if cancelled tasks' before killing them
187187
condition: contains(variables['Build.SourceBranchName'], '-stable')
188188
dependsOn:
@@ -195,7 +195,7 @@ jobs:
195195
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
196196
persistCredentials: true # set to 'true' to leave the OAuth token in the Git config after the initial fetch
197197

198-
- template: templates/android-build-office.yml
198+
- template: templates/android-build-office-setup.yml
199199

200200
- task: CmdLine@2
201201
displayName: Bump package version
@@ -208,18 +208,14 @@ jobs:
208208
inputs:
209209
script: node .ado/removeWorkspaceConfig.js
210210

211-
- template: templates/prep-android-nuget.yml
211+
- template: templates/android-build-office.yml
212212

213213
# Enumerate and download all dependencies ..
214214
- template: templates/download-android-dependencies.yml
215215
parameters:
216216
artifact_feed: Office
217217

218-
# Very similar to the default pack task .. but appends 'ndk21b' to the nuget pack version
219-
- task: CmdLine@2
220-
displayName: 'NuGet pack'
221-
inputs:
222-
script: NDK=ndk`cat ${ANDROID_SDK_ROOT}/ndk-bundle/source.properties 2>&1 | grep Pkg.Revision | awk '{ print $3}' | awk -F. '{ print $1 }'`; mono $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe pack $(System.DefaultWorkingDirectory)/ReactAndroid/ReactAndroid.nuspec -OutputDirectory $(Build.StagingDirectory)/final -Properties buildNumber=$(buildNumber)-$NDK;commitId=$(Build.SourceVersion)
218+
- template: templates/android-nuget-pack.yml
223219

224220
- task: CmdLine@2
225221
displayName: 'Npm pack'
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
steps:
2+
- task: UseNode@1
3+
inputs:
4+
version: '16.x'
5+
6+
- template: apple-droid-node-patching.yml
7+
parameters:
8+
apply_office_patches: true
9+
10+
# Install NuGet
11+
- task: CmdLine@2
12+
displayName: Install NuGet
13+
inputs:
14+
script: curl -o $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe --create-dirs https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
15+
16+
- task: CmdLine@2
17+
displayName: "Rename package to react-native"
18+
inputs:
19+
script: node .ado/renamePackageForOffice.js
20+
21+
- task: CmdLine@2
22+
displayName: yarn install
23+
inputs:
24+
script: yarn install --frozen-lockfile
25+
26+
# scripts/set-rn-version.js
27+
#
28+
# update the following files to the commit id.
29+
# package.json (-> npm package version)
30+
# gradle.properties (-> aar version)
31+
# gradle.properties (-> aar version)
32+
#
33+
# The following files are updated for runtime version checking.
34+
# ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java
35+
# React/Base/RCTVersion.m
36+
# ReactCommon/cxxreact/ReactNativeVersion.h
37+
# Libraries/Core/ReactNativeVersion.js
38+
#
39+
# --nightly --autogenerateVersionNumber => version = `0.0.0-${currentCommit.slice(0, 9)}`;
40+
# When on main branch or non-stable branch.
41+
- task: CmdLine@2
42+
displayName: Set canary package version
43+
inputs:
44+
script: node scripts/set-rn-version.js --nightly --autogenerateVersionNumber --skipUpdateRuby # TODO(macOS GH#1148): Remove --skipUpdateRuby flag once we clean up version update scripts
45+
condition: or(eq(variables['Build.SourceBranchName'], 'main'), not(contains(variables['Build.SourceBranchName'], '-stable')))
46+
47+
# TODO: We don't seem to be running set-rn-version.js for stable branches, hence we would end up publishing using the values in the repository.
48+
49+
- task: CmdLine@2
50+
displayName: nuget restore
51+
inputs:
52+
script: mono $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe restore $(System.DefaultWorkingDirectory)/ReactAndroid/packages.config -PackagesDirectory $(System.DefaultWorkingDirectory)/ReactAndroid/packages/ -Verbosity Detailed -NonInteractive
53+
54+
- task: CmdLine@2
55+
displayName: Setup Build Dependencies
56+
inputs:
57+
script: chmod +x .ado/setup_droid_deps.sh && .ado/setup_droid_deps.sh
58+
59+
- task: CmdLine@2
60+
displayName: Remove RNTesterApp.android.bundle
61+
inputs:
62+
script: rm -f ./packages/rn-tester/js/RNTesterApp.android.bundle

.ado/templates/android-build-office.yml

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,4 @@
11
steps:
2-
- task: UseNode@1
3-
inputs:
4-
version: '16.x'
5-
6-
- template: apple-droid-node-patching.yml
7-
parameters:
8-
apply_office_patches: true
9-
10-
# Install NuGet
11-
- task: CmdLine@2
12-
displayName: Install NuGet
13-
inputs:
14-
script: curl -o $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe --create-dirs https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
15-
16-
- task: CmdLine@2
17-
displayName: "Rename package to react-native"
18-
inputs:
19-
script: node .ado/renamePackageForOffice.js
20-
21-
- task: CmdLine@2
22-
displayName: yarn install
23-
inputs:
24-
script: yarn install --frozen-lockfile
25-
26-
# scripts/set-rn-version.js
27-
#
28-
# update the following files to the commit id.
29-
# package.json (-> npm package version)
30-
# gradle.properties (-> aar version)
31-
# gradle.properties (-> aar version)
32-
#
33-
# The following files are updated for runtime version checking.
34-
# ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java
35-
# React/Base/RCTVersion.m
36-
# ReactCommon/cxxreact/ReactNativeVersion.h
37-
# Libraries/Core/ReactNativeVersion.js
38-
#
39-
# --nightly --autogenerateVersionNumber => version = `0.0.0-${currentCommit.slice(0, 9)}`;
40-
# When on main branch or non-stable branch.
41-
- task: CmdLine@2
42-
displayName: Set canary package version
43-
inputs:
44-
script: node scripts/set-rn-version.js --nightly --autogenerateVersionNumber --skipUpdateRuby # TODO(macOS GH#1148): Remove --skipUpdateRuby flag once we clean up version update scripts
45-
condition: or(eq(variables['Build.SourceBranchName'], 'main'), not(contains(variables['Build.SourceBranchName'], '-stable')))
46-
47-
# TODO: We don't seem to be running set-rn-version.js for stable branches, hence we would end up publishing using the values in the repository.
48-
49-
- task: CmdLine@2
50-
displayName: nuget restore
51-
inputs:
52-
script: mono $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe restore $(System.DefaultWorkingDirectory)/ReactAndroid/packages.config -PackagesDirectory $(System.DefaultWorkingDirectory)/ReactAndroid/packages/ -Verbosity Detailed -NonInteractive
53-
54-
- task: CmdLine@2
55-
displayName: Setup Build Dependencies
56-
inputs:
57-
script: chmod +x .ado/setup_droid_deps.sh && .ado/setup_droid_deps.sh
58-
59-
- task: CmdLine@2
60-
displayName: Remove RNTesterApp.android.bundle
61-
inputs:
62-
script: rm -f ./packages/rn-tester/js/RNTesterApp.android.bundle
63-
642
- task: CmdLine@2
653
displayName: Create RNTester bundle
664
inputs:

.ado/templates/android-nuget-pack.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
steps:
2+
- task: PowerShell@2
3+
displayName: Extract version from package.json, and put it in `buildNumber` variable
4+
inputs:
5+
targetType: inline # filePath | inline
6+
script: |
7+
$lines = Get-Content package.json | Where {$_ -match '^\s*"version":.*'}
8+
$npmVersion = $lines.Trim().Split()[1].Trim('",');
9+
echo "##vso[task.setvariable variable=buildNumber]$npmVersion"
10+
11+
# Very similar to the default pack task .. but appends 'ndk21b' to the nuget pack version
12+
- task: CmdLine@2
13+
displayName: 'NuGet pack'
14+
inputs:
15+
script: NDK=ndk`$(System.DefaultWorkingDirectory)/gradlew -q ReactAndroid:properties | grep ndkVersion | awk '{print $2}' | awk -F. '{print $1}'`; mono $(System.DefaultWorkingDirectory)/nuget-bin/nuget.exe pack $(System.DefaultWorkingDirectory)/ReactAndroid/ReactAndroid.nuspec -OutputDirectory $(Build.StagingDirectory)/final -Properties buildNumber=$(buildNumber)-$NDK\;commitId=$(Build.SourceVersion)

.ado/templates/prep-android-nuget.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

.ado/variables/vars.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
variables:
22
VmImageApple: internal-macos12
3-
PoolUbuntu: cxe-ubuntu-20-04-small
43
slice_name: 'Xcode_13.3.1'
54
xcode_version: '/Applications/Xcode_13.3.1.app'

0 commit comments

Comments
 (0)