Skip to content

Commit

Permalink
Merge branch 'facebook:main' into fix-for-gnu-coreutils
Browse files Browse the repository at this point in the history
  • Loading branch information
shreeve authored Nov 25, 2022
2 parents 57d6e1b + 2d1d61a commit 1be4a05
Show file tree
Hide file tree
Showing 124 changed files with 1,858 additions and 669 deletions.
49 changes: 20 additions & 29 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -710,34 +710,19 @@ jobs:
- checkout
- setup_artifacts
- run_yarn

# Starting emulator in advance as it takes some time to boot.
- run:
name: Create Android Virtual Device
command: source scripts/android-setup.sh && createAVD
- run:
name: Launch Android Virtual Device in Background
command: source scripts/android-setup.sh && launchAVD
background: true

- download_gradle_dependencies

- run:
name: Build & Test React Native using Gradle
command: ./gradlew buildAll

- run:
name: Build RN Tester for Release using Gradle
command: ./gradlew packages:rn-tester:android:app:assembleRelease

# Wait for AVD to finish booting before running tests
- run:
name: Wait for Android Virtual Device
command: source scripts/android-setup.sh && waitForAVD

- report_bundle_size:
platform: android

- store_artifacts:
path: ~/react-native/packages/rn-tester/android/app/build/outputs/apk/
destination: rntester-apk

# Optionally, run disabled tests
- when:
condition: << parameters.run_disabled_tests >>
Expand Down Expand Up @@ -779,10 +764,7 @@ jobs:
command: |
REPO_ROOT=$(pwd)
node ./scripts/set-rn-template-version.js "file:$REPO_ROOT/build/$(cat build/react-native-package-version)"
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install
cd /tmp/$PROJECT_NAME
yarn
node ./scripts/template/initialize.js --reactNativeRootPath $REPO_ROOT --templateName $PROJECT_NAME --templateConfigPath $REPO_ROOT --directory "/tmp/$PROJECT_NAME"
- run:
name: Build the template application for << parameters.flavor >> with Architecture set to << parameters.architecture >>, and using the << parameters.jsengine>> JS engine.
command: |
Expand All @@ -799,6 +781,10 @@ jobs:
fi
./gradlew assemble<< parameters.flavor >> -PREACT_NATIVE_MAVEN_LOCAL_REPO=/root/react-native/maven-local
- store_artifacts:
path: /tmp/$PROJECT_NAME/android/app/build/outputs/apk/
destination: template-apk

# -------------------------
# JOBS: Test iOS Template
# -------------------------
Expand Down Expand Up @@ -862,13 +848,11 @@ jobs:
PACKAGE=$(cat build/react-native-package-version)
PATH_TO_PACKAGE="$REPO_ROOT/build/$PACKAGE"
node ./scripts/set-rn-template-version.js "file:$PATH_TO_PACKAGE"
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install
node ./scripts/template/initialize.js --reactNativeRootPath $REPO_ROOT --templateName $PROJECT_NAME --templateConfigPath $REPO_ROOT --directory "/tmp/$PROJECT_NAME"
- run:
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>; Flipper << parameters.flipper >>
command: |
cd /tmp/$PROJECT_NAME
yarn install
cd ios
cd /tmp/$PROJECT_NAME/ios
bundle install
Expand Down Expand Up @@ -1363,7 +1347,14 @@ jobs:
- run:
name: "Set new react-native version and commit changes"
command: |
node ./scripts/prepare-package-for-release.js -v << parameters.version >> -l << parameters.latest >> --dry-run << parameters.dryrun >>
VERSION=<< parameters.version >>
if [[ -z "$VERSION" ]]; then
VERSION=$(grep '"version"' package.json | cut -d '"' -f 4 | head -1)
echo "Using the version from the package.json: $VERSION"
fi
node ./scripts/prepare-package-for-release.js -v "$VERSION" -l << parameters.latest >> --dry-run << parameters.dryrun >>
build_npm_package:
parameters:
Expand Down Expand Up @@ -1643,7 +1634,7 @@ workflows:
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
version: 'v1000.0.1'
version: ''
latest : false
dryrun: true
- prepare_hermes_workspace:
Expand Down
52 changes: 0 additions & 52 deletions .github/respond-to-issue-based-on-label.yml

This file was deleted.

163 changes: 153 additions & 10 deletions .github/workflows/on-issue-labeled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,161 @@ on:
types: labeled

permissions:
contents: read
contents: write
issues: write

jobs:
respondToIssueBasedOnLabel:
permissions:
contents: read # for hramos/respond-to-issue-based-on-label to fetch config file
issues: write # for hramos/respond-to-issue-based-on-label to update issues
name: Respond to Issue Based on Label
type-invalid:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Type: Invalid') }}"
steps:
- uses: actions/checkout@v3
- name: Respond to Issue Based on Label
uses: hramos/respond-to-issue-based-on-label@v2
- uses: actions/github-script@v6
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
script: |
await github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: "closed",
})
type-question:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Type: Question') }}"
steps:
- uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `We are using GitHub issues exclusively to track bugs in React Native. GitHub may not be the ideal place to ask a question, but you can try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native), or on [Reactiflux](https://www.reactiflux.com/).`,
})
await github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: "closed",
})
type-docs:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Type: Docs') }}"
steps:
- uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Please report documentation issues in the [react-native-website](https://github.com/facebook/react-native-website/issues) repository.`,
})
await github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: "closed",
})
resolution-for-stack-overflow:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Resolution: For Stack Overflow') }}"
steps:
- uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `We are using GitHub issues exclusively to track bugs in the core React Native library. Please try asking over on [Stack Overflow](http://stackoverflow.com/questions/tagged/react-native) as it is better suited for this type of question.`,
})
await github.rest.issues.update({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
state: "closed",
})
needs-issue-template:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Needs: Issue Template') }}"
steps:
- uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `| :warning: | Missing Required Fields |
| --- | --- |
| :information_source: | It looks like your issue may be missing some necessary information. GitHub provides an example template whenever a [new issue is created](https://github.com/facebook/react-native/issues/new?template=bug_report.md). Could you go back and make sure to fill out the template? You may edit this issue, or close it and open a new one. |`,
})
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Needs: Author Feedback']
})
needs-environment-info:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Needs: Environment Info') }}"
steps:
- uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `| :warning: | Missing Environment Information |
| --- | --- |
| :information_source: | Your issue may be missing information about your development environment. You can obtain the missing information by running <code>react-native info</code> in a console. |`,
})
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Needs: Author Feedback']
})
needs-verify-on-latest-version:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Needs: Verify on Latest Version') }}"
steps:
- uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `| :warning: | Using Old Version |
| --- | --- |
| :information_source: | It looks like you are using an older version of React Native. Please [upgrade](https://reactnative.dev/docs/upgrading) to the latest version, and verify if the issue persists. If it does not, please let us know so we can close out this issue. This helps us ensure we are looking at issues that still exist in the current release. |`,
})
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Needs: Author Feedback']
})
needs-repro:
runs-on: ubuntu-latest
if: "${{ contains(github.event.label.name, 'Needs: Repro') }}"
steps:
- uses: actions/github-script@v6
with:
script: |
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `| :warning: | Missing Reproducible Example |
| --- | --- |
| :information_source: | It looks like your issue is missing a reproducible example. Please provide a [Snack](https://snack.expo.dev) or a repository that demonstrates the issue you are reporting in a [minimal, complete, and reproducible](https://stackoverflow.com/help/minimal-reproducible-example) manner. |`,
})
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Needs: Author Feedback']
})
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ package-lock.json
/coverage
/third-party

# Test Reports
/reports

# Root dir shouldn't have Xcode project
/*.xcodeproj

Expand Down Expand Up @@ -122,7 +125,6 @@ package-lock.json
/sdks/download
/sdks/hermes
/sdks/hermesc
/sdks/hermes-engine/build_host_hermesc

# Visual studio
.vscode
Expand Down
7 changes: 1 addition & 6 deletions BUCK
Original file line number Diff line number Diff line change
Expand Up @@ -406,12 +406,6 @@ rn_apple_xplat_cxx_library(
"-Wno-global-constructors",
],
contacts = ["[email protected]"],
exported_linker_flags = [
"-weak_framework",
"UserNotifications",
"-weak_framework",
"WebKit",
],
exported_preprocessor_flags = rn_extra_build_flags(),
fbobjc_enable_exceptions = True,
frameworks = [
Expand All @@ -426,6 +420,7 @@ rn_apple_xplat_cxx_library(
"$SDKROOT/System/Library/Frameworks/SystemConfiguration.framework",
"$SDKROOT/System/Library/Frameworks/UIKit.framework",
"$SDKROOT/System/Library/Frameworks/UserNotifications.framework",
"$SDKROOT/System/Library/Frameworks/WebKit.framework",
],
labels = [
"depslint_never_add",
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.6'
ruby File.read(File.join(__dir__, '.ruby-version')).strip

gem 'cocoapods', '~> 1.11', '>= 1.11.3'
Loading

0 comments on commit 1be4a05

Please sign in to comment.