Skip to content

Commit

Permalink
[0.75] Merge up to 0.75.2 (#2169)
Browse files Browse the repository at this point in the history
## Summary:

Merge up to React Native 0.75.2

## Test Plan:

CI should pass.
  • Loading branch information
Saadnajmi committed Aug 29, 2024
2 parents 3d5ba58 + c441193 commit 103bc54
Show file tree
Hide file tree
Showing 300 changed files with 348,994 additions and 47,583 deletions.
11 changes: 4 additions & 7 deletions .ado/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# It is expected that a `latestStableBranch` variable is set in the pipeline's settings:

# This file defines the build steps to publish a release
name: $(Date:yyyyMMdd).$(Rev:.r)

Expand Down Expand Up @@ -82,10 +80,10 @@ extends:
- template: .ado/templates/apple-steps-publish.yml@self
parameters:
build_type: nightly
- ${{ elseif endsWith(variables['Build.SourceBranchName'], '-stable') }}:
- template: .ado/templates/apple-steps-publish.yml@self
parameters:
build_type: release
# - ${{ elseif endsWith(variables['Build.SourceBranchName'], '-stable') }}:
# - template: .ado/templates/apple-steps-publish.yml@self
# parameters:
# build_type: release
- ${{ else }}:
- task: CmdLine@2
displayName: Unknown branch, skipping publish
Expand All @@ -98,7 +96,6 @@ extends:

- bash: echo "##vso[task.setvariable variable=npmDistTag]latest"
displayName: Set dist-tag to latest
condition: eq(variables['Build.SourceBranchName'], variables.latestStableBranch)

- bash: echo "##vso[task.setvariable variable=npmDistTag]canary"
displayName: Set dist-tag to canary
Expand Down
43 changes: 22 additions & 21 deletions .circleci/configurations/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ jobs:
- run:
name: "Run Tests: JavaScript Tests"
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
- run_e2e:
platform: js

# Optionally, run disabled tests
- when:
Expand Down Expand Up @@ -288,7 +286,10 @@ jobs:
- packages/react-native/ReactAndroid/hermes-engine/build/
- packages/react-native/ReactAndroid/src/main/jni/prebuilt/
- packages/react-native-gradle-plugin/.gradle/
- packages/react-native-gradle-plugin/build/
- packages/react-native-gradle-plugin/react-native-gradle-plugin/build/
- packages/react-native-gradle-plugin/settings-plugin/build/
- packages/react-native-gradle-plugin/shared/build/
- packages/react-native-gradle-plugin/shared-testutil/build/
- packages/react-native-codegen/lib/

# -------------------------
Expand Down Expand Up @@ -327,9 +328,9 @@ jobs:
destination: rntester-apk

# -------------------------
# JOBS: Test Android Template
# JOBS: Test Android HelloWorld
# -------------------------
test_android_template:
test_android_helloworld:
executor: reactnativeandroid-large
parameters:
flavor:
Expand All @@ -348,37 +349,37 @@ jobs:
type: enum
enum: ["Hermes", "JSC"]
environment:
- LC_ALL: C.UTF8
- PROJECT_NAME: "AndroidTemplateProject"
- YARN_ENABLE_IMMUTABLE_INSTALLS: false
- TARGET_ARCHITECTURE: "arm64-v8a"
steps:
- checkout_code_with_cache
- run_yarn
- attach_workspace:
at: .
- run:
name: Create Android template project
name: Build codegen js scripts from flow -> JS
command: |
REPO_ROOT=$(pwd)
node ./scripts/releases/update-template-package.js "{\"react-native\":\"file:$REPO_ROOT/build/$(cat build/react-native-package-version)\"}"
node ./scripts/e2e/init-template-e2e.js --projectName $PROJECT_NAME --templatePath "$REPO_ROOT/packages/react-native" --directory "/tmp/$PROJECT_NAME" --verbose
cd packages/react-native-codegen
yarn run build
- with_gradle_cache:
steps:
- run:
name: Build the template application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
name: Build the Helloworld application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
command: |
cd /tmp/$PROJECT_NAME/android/
if [[ << parameters.architecture >> == "NewArch" ]]; then
export ORG_GRADLE_PROJECT_newArchEnabled=true
else
export ORG_GRADLE_PROJECT_newArchEnabled=false
cd packages/helloworld/android
args=()
if [[ << parameters.architecture >> == "OldArch" ]]; then
args+=(--arch old)
fi
if [[ << parameters.jsengine >> == "Hermes" ]]; then
export ORG_GRADLE_PROJECT_hermesEnabled=true
else
export ORG_GRADLE_PROJECT_hermesEnabled=false
if [[ << parameters.jsengine >> == "JSC" ]]; then
args+=(--jsvm jsc)
fi
./gradlew assemble<< parameters.flavor >> -Preact.internal.mavenLocalRepo=/root/react-native/maven-local
if [[ << parameters.flavor >> == "Release" ]]; then
args+=(--prod)
fi
yarn build android "${args[@]}" -P reactNativeArchitectures="$TARGET_ARCHITECTURE"
- store_artifacts:
path: /tmp/AndroidTemplateProject/android/app/build/outputs/apk/
destination: template-apk
Expand Down
18 changes: 10 additions & 8 deletions .circleci/configurations/test_workflows/testAll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,16 @@
- test_android:
requires:
- build_android
- test_android_template:
requires:
- build_npm_package
matrix:
parameters:
architecture: ["NewArch", "OldArch"]
jsengine: ["Hermes", "JSC"]
flavor: ["Debug", "Release"]
## Disabled to land removing react-native/template. Re-enable once switched over
## to Helloworld.
# - test_android_template:
# requires:
# - build_npm_package
# matrix:
# parameters:
# architecture: ["NewArch", "OldArch"]
# jsengine: ["Hermes", "JSC"]
# flavor: ["Debug", "Release"]
- test_ios_helloworld:
requires:
- build_hermes_macos
Expand Down
25 changes: 13 additions & 12 deletions .circleci/configurations/test_workflows/testAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,16 @@
- build_hermesc_linux
- build_hermes_macos
- build_hermesc_windows
- test_android:
requires:
- build_android
# - test_e2e_android
- test_android_template:
requires:
- build_npm_package
matrix:
parameters:
architecture: ["NewArch", "OldArch"]
jsengine: ["Hermes", "JSC"]
flavor: ["Debug", "Release"]
## Disabled to land removing react-native/template. Re-enable once switched over
## to Helloworld.
# - test_android:
# requires:
# - build_android
# - test_android_template:
# requires:
# - build_npm_package
# matrix:
# parameters:
# architecture: ["NewArch", "OldArch"]
# jsengine: ["Hermes", "JSC"]
# flavor: ["Debug", "Release"]
2 changes: 1 addition & 1 deletion .circleci/configurations/top_level.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ references:
dependency_versions:
xcode_version: &xcode_version "15.2"
nodelts_image: &nodelts_image "cimg/node:20.2.0"
nodeprevlts_image: &nodeprevlts_image "cimg/node:18.12.1"
nodeprevlts_image: &nodeprevlts_image "cimg/node:18.18.2"
nodelts_browser_image: &nodelts_browser_image "cimg/node:20.2.0-browsers"

# -------------------------
Expand Down
61 changes: 0 additions & 61 deletions .circleci/configurations/workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,67 +15,6 @@
workflows:
version: 2

# Release workflow, triggered by `yarn trigger-react-native-release`
create_release:
when: << pipeline.parameters.run_release_workflow >>
jobs:
- prepare_release:
name: prepare_release
version: << pipeline.parameters.release_version >>
monorepo_packages_version: << pipeline.parameters.release_monorepo_packages_version >>
tag: << pipeline.parameters.release_tag >>
dry_run: << pipeline.parameters.release_dry_run >>

# This job will run only when a tag is published due to all the jobs being filtered.
publish_release:
jobs:
- prepare_hermes_workspace:
filters: *only_release_tags
- build_android:
filters: *only_release_tags
name: build_android_for_release
release_type: "release"
- build_hermesc_linux:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_hermesc_apple:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_apple_slices_hermes:
filters: *only_release_tags
requires:
- build_hermesc_apple
matrix:
parameters:
flavor: ["Debug", "Release"]
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst"]
- build_hermesc_windows:
filters: *only_release_tags
requires:
- prepare_hermes_workspace
- build_hermes_macos:
filters: *only_release_tags
requires:
- build_apple_slices_hermes
matrix:
parameters:
flavor: ["Debug", "Release"]
# This job will trigger when a version tag is pushed (by package_release)
- build_npm_package:
name: build_and_publish_npm_package
release_type: "release"
filters: *only_release_tags
requires:
- build_android_for_release
- build_hermesc_linux
- build_hermes_macos
- build_hermesc_windows
- poll_maven:
requires:
- build_and_publish_npm_package

analysis:
when:
and:
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/cache_setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,5 @@ runs:
path: |
/tmp/hermes/download/
/tmp/hermes/hermes/
key: v1-hermes-${{ inputs.hermes-version }}-${{ github.run_number }}
key: v1-hermes-${{ inputs.hermes-version }}
enableCrossOsArchive: true
20 changes: 18 additions & 2 deletions .github/actions/create-release/action.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
name: create_release
description: Creates a new React Native release
inputs:
version:
description: "The version of React Native we want to release. For example 0.75.0-rc.0"
required: true
is_latest_on_npm:
description: "Whether we want to tag this release as latest on NPM"
required: true
default: "false"
dry_run:
description: "Whether the job should be executed in dry-run mode or not"
default: "false"
runs:
using: composite
steps:
- name: Yarn install
shell: bash
run: yarn install --non-interactive
- name: Configure Git
shell: bash
run: |
git config --local user.email "bot@reactnative.dev"
git config --local user.name "React Native Bot"
- name: Creating release commit
shell: bash
run: |
Expand All @@ -16,14 +32,14 @@ runs:
GIT_PAGER=cat git show HEAD
- name: Update "latest" tag if needed
shell: bash
if: ${{ inputs.tag == 'latest' }}
if: ${{ inputs.is_latest_on_npm == 'true' }}
run: |
git tag -d "latest"
git push origin :latest
git tag -a "latest" -m "latest"
- name: Pushing release commit
shell: bash
if: ${{ inputs.dry_run == false }}
if: ${{ inputs.dry_run == 'false' }}
run: |
CURR_BRANCH="$(git branch --show-current)"
git push origin "$CURR_BRANCH" --follow-tags
Loading

0 comments on commit 103bc54

Please sign in to comment.