forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit '12b64b78247f2db929c6d421262bdec1f6402e0b' into android
- Loading branch information
Showing
260 changed files
with
5,835 additions
and
2,507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -93,4 +93,4 @@ untyped-import | |
untyped-type-import | ||
|
||
[version] | ||
^0.238.0 | ||
^0.239.1 |
2 changes: 1 addition & 1 deletion
2
.github/actions/cache_setup/action.yml → .github/actions/cache-setup/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: cache_setup | ||
name: cache-setup | ||
description: "Cache setup" | ||
inputs: | ||
hermes-version: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: lint | ||
description: Runs all the linters in the codebase | ||
inputs: | ||
node-version: | ||
description: "The node.js version to use" | ||
required: false | ||
default: "18" | ||
github-token: | ||
description: "The GitHub token used by pull-bot" | ||
required: true | ||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup node.js | ||
uses: ./.github/actions/setup-node | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
- name: Yarn install | ||
shell: bash | ||
run: yarn install --non-interactive --frozen-lockfile | ||
- name: Run linters against modified files (analysis-bot) | ||
shell: bash | ||
run: yarn lint-ci | ||
env: | ||
GITHUB_TOKEN: ${{ inputs.github-token}} | ||
- name: Lint code | ||
shell: bash | ||
run: ./scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml | ||
- name: Lint java | ||
shell: bash | ||
run: ./scripts/circleci/exec_swallow_error.sh yarn lint-java --check | ||
- name: Run flowcheck | ||
shell: bash | ||
run: yarn flow-check | ||
- name: Run typescript check | ||
shell: bash | ||
run: yarn test-typescript | ||
- name: Check license | ||
shell: bash | ||
run: ./scripts/circleci/check_license.sh | ||
- name: Check formatting | ||
shell: bash | ||
run: yarn run format-check |
2 changes: 1 addition & 1 deletion
2
.github/actions/prepare_ios_tests/action.yml → .github/actions/prepare-ios-tests/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: prepare_ios_tests | ||
name: prepare-ios-tests | ||
description: Prepare iOS Tests | ||
runs: | ||
using: composite | ||
|
2 changes: 1 addition & 1 deletion
2
...hub/actions/report_bundle_size/action.yml → ...hub/actions/report-bundle-size/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: report_bundle_size | ||
name: report-bundle-size | ||
description: Report bundle size | ||
inputs: | ||
platform: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
name: Setup gradle | ||
description: "Set up your GitHub Actions workflow with a specific version of gradle" | ||
inputs: | ||
cache-allow-write: | ||
description: "Wether the Gradle Cache should be allowed to be written by this job or not" | ||
default: "false" | ||
cache-read-only: | ||
description: "Whether the Gradle Cache should be in read-only mode so this job won't be allowed to write to it" | ||
default: "true" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup gradle | ||
uses: gradle/actions/setup-gradle@v3 | ||
with: | ||
gradle-version: wrapper | ||
cache-read-only: ${{ inputs.cache-allow-write == 'false' }} | ||
# We want the Gradle cache to be written only on main/-stable branches run, and only for jobs with `cache-read-only` == false (i.e. `build_android`). | ||
cache-read-only: ${{ (github.ref != 'refs/heads/main' && !contains(github.ref, '-stable')) || inputs.cache-read-only == 'true' }} | ||
# Similarly, for those jobs we want to start with a clean cache so it doesn't grow without limits (this is the negation of the previous condition). | ||
cache-write-only: ${{ (github.ref == 'refs/heads/main' || contains(github.ref, '-stable')) && inputs.cache-read-only != 'true' }} | ||
gradle-home-cache-cleanup: true |
2 changes: 1 addition & 1 deletion
2
...ctions/setup_xcode_build_cache/action.yml → ...ctions/setup-xcode-build-cache/action.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,21 @@ | ||
name: test_ios_helloworld | ||
name: test-ios-helloworld | ||
description: Test iOS Hello World | ||
inputs: | ||
jsengine: | ||
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC". | ||
type: choice | ||
default: Hermes | ||
options: | ||
- JSC | ||
- Hermes | ||
use-frameworks: | ||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" | ||
type: choice | ||
default: StaticLibraries | ||
options: | ||
- StaticLibraries | ||
- DynamicFrameworks | ||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" | ||
default: StaticLibraries | ||
architecture: | ||
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup | ||
type: choice | ||
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup. Must be one of "OldArch" or "NewArch" | ||
default: OldArch | ||
options: | ||
- OldArch | ||
- NewArch | ||
ruby-version: | ||
description: The version of ruby that must be used | ||
default: 2.6.10 | ||
flavor: | ||
description: The flavor of the build. Must be one of "Debug", "Release". | ||
type: choice | ||
default: Debug | ||
options: | ||
- Debug | ||
- Release | ||
hermes-version: | ||
description: The version of hermes | ||
required: true | ||
|
@@ -45,17 +29,20 @@ runs: | |
uses: ./.github/actions/setup-xcode | ||
- name: Setup node.js | ||
uses: ./.github/actions/setup-node | ||
- name: Cache setup | ||
id: cache_setup | ||
uses: ./.github/actions/cache_setup | ||
- name: Create Hermes folder | ||
shell: bash | ||
run: mkdir -p "$HERMES_WS_DIR" | ||
- name: Download Hermes | ||
uses: actions/download-artifact@v4 | ||
with: | ||
hermes-version: ${{ inputs.hermes-version }} | ||
react-native-version: ${{ inputs.react-native-version }} | ||
name: hermes-darwin-bin-${{ inputs.flavor }} | ||
path: /tmp/hermes/hermes-runtime-darwin/ | ||
- name: Print Downloaded hermes | ||
shell: bash | ||
run: ls -lR "$HERMES_WS_DIR" | ||
- name: Run yarn | ||
shell: bash | ||
run: yarn install --non-interactive | ||
- name: Restore Hermes workspace | ||
uses: ./.github/actions/restore-hermes-workspace | ||
- name: Setup ruby | ||
uses: ruby/[email protected] | ||
with: | ||
|
@@ -78,6 +65,17 @@ runs: | |
args+=(--jsvm jsc) | ||
yarn bootstrap ios "${args[@]}" | cat | ||
else | ||
# Tarball is restored with capital flavors suffix, but somehow the tarball name from JS at line 96 returns as lowercased. | ||
# Let's ensure that the tarballs have the right names | ||
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" ]]; then | ||
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Debug.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-debug.tar.gz" | ||
fi | ||
if [[ -f "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" ]]; then | ||
mv "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-Release.tar.gz" "$HERMES_WS_DIR/hermes-runtime-darwin/hermes-ios-release.tar.gz" | ||
fi | ||
BUILD_TYPE="${{ inputs.flavor }}" | ||
TARBALL_FILENAME=$(node ../react-native/scripts/hermes/get-tarball-name.js --buildType "$BUILD_TYPE") | ||
HERMES_PATH="$HERMES_WS_DIR/hermes-runtime-darwin/$TARBALL_FILENAME" | ||
|
@@ -87,6 +85,7 @@ runs: | |
shell: bash | ||
run: | | ||
cd packages/helloworld | ||
args=() | ||
if [[ ${{ inputs.flavor }} == "Release" ]]; then | ||
args+=(--prod) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
name: test_ios_rntester | ||
name: test-ios-rntester | ||
description: Test iOS RNTester | ||
inputs: | ||
jsengine: | ||
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC". | ||
default: Hermes | ||
use-frameworks: | ||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" | ||
default: StaticLibraries | ||
description: The dependency building and linking strategy to use. Must be one of "StaticLibraries", "DynamicFrameworks" | ||
default: StaticLibraries | ||
architecture: | ||
description: The React Native architecture to Test. RNTester has always Fabric enabled, but we want to run integration test with the old arch setup | ||
default: NewArch | ||
|
@@ -15,7 +15,7 @@ inputs: | |
default: 2.6.10 | ||
run-unit-tests: | ||
description: whether unit tests should run or not. | ||
default: false | ||
default: "false" | ||
hermes-tarball-artifacts-dir: | ||
description: The directory where the hermes tarball artifacts are stored | ||
default: /tmp/hermes/hermes-runtime-darwin | ||
|
@@ -38,19 +38,18 @@ runs: | |
- name: Run yarn | ||
shell: bash | ||
run: yarn install --non-interactive | ||
- name: Cache setup | ||
id: cache_setup | ||
uses: ./.github/actions/cache_setup | ||
- name: Download Hermes | ||
uses: actions/download-artifact@v4 | ||
with: | ||
hermes-version: ${{ inputs.hermes-version }} | ||
react-native-version: ${{ inputs.react-native-version }} | ||
name: hermes-darwin-bin-${{ inputs.flavor }} | ||
path: ${{ inputs.hermes-tarball-artifacts-dir }} | ||
- name: Setup ruby | ||
uses: ruby/[email protected] | ||
with: | ||
ruby-version: ${{ inputs.ruby-version }} | ||
- name: Prepare IOS Tests | ||
if: ${{ inputs.run-unit-tests == true }} | ||
uses: ./.github/actions/prepare_ios_tests | ||
if: ${{ inputs.run-unit-tests == 'true' }} | ||
uses: ./.github/actions/prepare-ios-tests | ||
- name: Set HERMES_ENGINE_TARBALL_PATH envvar if Hermes tarball is present | ||
shell: bash | ||
run: | | ||
|
@@ -82,14 +81,15 @@ runs: | |
if [[ -e $TARBALL_PATH ]]; then | ||
tar -xf $TARBALL_PATH | ||
echo 'print(HermesInternal?.getRuntimeProperties?.()["OSS Release Version"])' > test.js | ||
chmod +x ./destroot/bin/hermes | ||
./destroot/bin/hermes test.js | ||
rm test.js | ||
rm -rf destroot | ||
else | ||
echo 'No Hermes tarball found.' | ||
fi | ||
- name: Setup xcode build cache | ||
uses: ./.github/actions/setup_xcode_build_cache | ||
uses: ./.github/actions/setup-xcode-build-cache | ||
with: | ||
hermes-version: ${{ inputs.hermes-version }} | ||
- name: Install CocoaPods dependencies | ||
|
@@ -114,19 +114,19 @@ runs: | |
bundle install | ||
bundle exec pod install | ||
- name: Build RNTester | ||
if: ${{ inputs.run-unit-tests != true }} | ||
if: ${{ inputs.run-unit-tests != 'true' }} | ||
shell: bash | ||
run: | | ||
xcodebuild build \ | ||
-workspace packages/rn-tester/RNTesterPods.xcworkspace \ | ||
-scheme RNTester \ | ||
-sdk iphonesimulator | ||
- name: "Run Tests: iOS Unit and Integration Tests" | ||
if: ${{ inputs.run-unit-tests == true }} | ||
if: ${{ inputs.run-unit-tests == 'true' }} | ||
shell: bash | ||
run: yarn test-ios | ||
- name: Zip Derived data folder | ||
if: ${{ inputs.run-unit-tests == true }} | ||
if: ${{ inputs.run-unit-tests == 'true' }} | ||
shell: bash | ||
run: | | ||
echo "zipping tests results" | ||
|
@@ -135,17 +135,17 @@ runs: | |
tar -zcvf xcresults.tar.gz $XCRESULT_PATH | ||
- name: Upload artifact | ||
uses: actions/[email protected] | ||
if: ${{ inputs.run-unit-tests == true }} | ||
if: ${{ inputs.run-unit-tests == 'true' }} | ||
with: | ||
name: xcresults | ||
path: /Users/distiller/Library/Developer/Xcode/xcresults.tar.gz | ||
- name: Report bundle size | ||
if: ${{ inputs.run-unit-tests == true }} | ||
uses: ./.github/actions/report_bundle_size | ||
if: ${{ inputs.run-unit-tests == 'true' }} | ||
uses: ./.github/actions/report-bundle-size | ||
with: | ||
platform: ios | ||
- name: Store test results | ||
if: ${{ inputs.run-unit-tests == true }} | ||
if: ${{ inputs.run-unit-tests == 'true' }} | ||
uses: actions/[email protected] | ||
with: | ||
name: test-results | ||
|
Oops, something went wrong.