Skip to content

Commit

Permalink
Merge branch 'main' into socketrocket
Browse files Browse the repository at this point in the history
  • Loading branch information
Saadnajmi authored Oct 17, 2023
2 parents c447d65 + fbc28fa commit dbcfb7a
Show file tree
Hide file tree
Showing 788 changed files with 8,315 additions and 17,473 deletions.
13 changes: 10 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ parameters:
default: false
type: boolean

run_prealpha_workflow:
default: false
type: boolean

jobs:
choose_ci_jobs:
docker:
Expand Down Expand Up @@ -69,9 +73,9 @@ jobs:
command: |
if [[ -z "$CIRCLE_PULL_REQUEST" ]]; then
echo "Not in a PR. Can't filter properly outside a PR. Please open a PR so that we can run the proper CI tests."
echo "Skipping!"
echo "For safety, we run all the tests!"
mkdir -p /tmp/circleci/
echo '{}' > /tmp/circleci/pipeline_config.json
echo '{ "run_all": true }' > /tmp/circleci/pipeline_config.json
else
PR_NUMBER="${CIRCLE_PULL_REQUEST##*/}"
node ./scripts/circleci/pipeline_selection.js filter-jobs
Expand All @@ -91,4 +95,7 @@ jobs:
workflows:
always-run:
jobs:
- choose_ci_jobs
- choose_ci_jobs:
filters:
tags:
only: /.*/
41 changes: 9 additions & 32 deletions .circleci/configurations/jobs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,9 @@ jobs:
executor: reactnativeandroid-xlarge
parameters:
release_type:
description: The type of release to build. Must be one of "nightly", "release", "dry-run".
description: The type of release to build. Must be one of "nightly", "release", "dry-run", "prealpha".
type: enum
enum: ["nightly", "release", "dry-run"]
enum: ["nightly", "release", "dry-run", "prealpha"]
default: "dry-run"
steps:
- checkout
Expand Down Expand Up @@ -286,7 +286,6 @@ jobs:
- packages/react-native/ReactAndroid/build/
- packages/react-native/ReactAndroid/hermes-engine/.cxx/
- packages/react-native/ReactAndroid/hermes-engine/build/
- packages/react-native/ReactAndroid/flipper-integration/build/
- packages/react-native/ReactAndroid/src/main/jni/prebuilt/
- packages/react-native-gradle-plugin/.gradle/
- packages/react-native-gradle-plugin/build/
Expand Down Expand Up @@ -404,11 +403,6 @@ jobs:
description: Which JavaScript engine to use. Must be one of "Hermes", "JSC".
type: enum
enum: ["Hermes", "JSC"]
flipper:
default: "WithFlipper"
description: Whether Flipper is enabled. Must be one of "WithFlipper", "WithoutFlipper".
type: enum
enum: ["WithFlipper", "WithoutFlipper"]
use_frameworks:
default: "StaticLibraries"
description: Which kind of option we want to use for `use_frameworks!`
Expand Down Expand Up @@ -466,7 +460,7 @@ jobs:
podfile_lock_cache_key: << parameters.podfile_lock_cache_key >>
steps:
- run:
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>; Flipper << parameters.flipper >>
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>
command: |
cd /tmp/$PROJECT_NAME/ios
Expand All @@ -478,10 +472,6 @@ jobs:
export USE_HERMES=0
fi
if [[ << parameters.flipper >> == "WithoutFlipper" ]]; then
export NO_FLIPPER=1
fi
if [[ << parameters.use_frameworks >> == "DynamicFrameworks" ]]; then
export USE_FRAMEWORKS=dynamic
fi
Expand Down Expand Up @@ -562,7 +552,6 @@ jobs:
fi
if [[ << parameters.use_frameworks >> == "DynamicFrameworks" ]]; then
export NO_FLIPPER=1
export USE_FRAMEWORKS=dynamic
fi
Expand Down Expand Up @@ -1159,9 +1148,9 @@ jobs:
build_npm_package:
parameters:
release_type:
description: The type of release to build. Must be one of "nightly", "release", "dry-run".
description: The type of release to build. Must be one of "nightly", "release", "dry-run", or "prealpha".
type: enum
enum: ["nightly", "release", "dry-run"]
enum: ["nightly", "release", "dry-run", "prealpha"]
default: "dry-run"
executor: reactnativeandroid-xlarge
environment:
Expand Down Expand Up @@ -1201,16 +1190,17 @@ jobs:
- attach_workspace:
at: .

# START: Stables and nightlies
# START: Stables, nightlies and prealphas
# This conditional step sets up the necessary credentials for publishing react-native to npm.
- when:
condition:
or:
- equal: [ "release", << parameters.release_type >> ]
- equal: [ "nightly", << parameters.release_type >> ]
- equal: [ "prealpha", << parameters.release_type >> ]
steps:
- run: echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc
# END: Stables and nightlies
# END: Stables, prealpha and nightlies

- with_gradle_cache:
steps:
Expand All @@ -1224,7 +1214,7 @@ jobs:
else
export ORG_GRADLE_PROJECT_reactNativeArchitectures="armeabi-v7a,arm64-v8a,x86,x86_64"
fi
node ./scripts/publish-npm.js --<< parameters.release_type >>
node ./scripts/publish-npm.js -t << parameters.release_type >>
- run:
name: Zip Maven Artifacts from /tmp/maven-local
Expand Down Expand Up @@ -1288,19 +1278,6 @@ jobs:
command: |
node scripts/circleci/poll-maven.js
# -------------------------
# JOBS: Nightly
# -------------------------
nightly_job:
machine:
image: ubuntu-2004:202010-01
steps:
- run:
name: Nightly
command: |
echo "Nightly build run"
find_and_publish_bumped_packages:
executor: nodelts
steps:
Expand Down
78 changes: 6 additions & 72 deletions .circleci/configurations/test_workflows/testAll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
and:
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
- equal: [ false, << pipeline.parameters.run_prealpha_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
Expand Down Expand Up @@ -68,83 +69,12 @@
architecture: ["NewArch", "OldArch"]
flavor: ["Debug", "Release"]
jsengine: ["Hermes", "JSC"]
flipper: ["WithFlipper", "WithoutFlipper"]
use_frameworks: ["StaticLibraries", "DynamicFrameworks"]
exclude:
- architecture: "NewArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "NewArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "OldArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "OldArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
# This config is tested with Ruby 3.2.0. Let's not double test it.
- architecture: "NewArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- test_ios_rntester:
requires:
Expand All @@ -169,6 +99,10 @@
- architecture: "OldArch"
jsengine: "JSC"
use_frameworks: "StaticLibraries"
# Tested with Ruby 3.2.0, do not test this twice.
- architecture: "NewArch"
jsengine: "Hermes"
use_frameworks: "StaticLibraries"
- test_ios_rntester:
run_unit_tests: true
architecture: "OldArch"
Expand Down
1 change: 1 addition & 0 deletions .circleci/configurations/test_workflows/testAndroid.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
and:
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
- equal: [ false, << pipeline.parameters.run_prealpha_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
Expand Down
1 change: 1 addition & 0 deletions .circleci/configurations/test_workflows/testE2E.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
and:
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
- equal: [ false, << pipeline.parameters.run_prealpha_workflow >> ]
jobs:
- test_e2e_ios:
ruby_version: "2.7.7"
Expand Down
78 changes: 6 additions & 72 deletions .circleci/configurations/test_workflows/testIOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
and:
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
- equal: [ false, << pipeline.parameters.run_prealpha_workflow >> ]
jobs:
- prepare_package_for_release:
name: prepare_package_for_release
Expand Down Expand Up @@ -59,83 +60,12 @@
architecture: ["NewArch", "OldArch"]
flavor: ["Debug", "Release"]
jsengine: ["Hermes", "JSC"]
flipper: ["WithFlipper", "WithoutFlipper"]
use_frameworks: ["StaticLibraries", "DynamicFrameworks"]
exclude:
- architecture: "NewArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "NewArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "NewArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "OldArch"
flavor: "Release"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "OldArch"
flavor: "Release"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
# Tested with Ruby 3.2.0, let's not double test this
- architecture: "NewArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "DynamicFrameworks"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "Hermes"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "NewArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- architecture: "OldArch"
flavor: "Debug"
jsengine: "JSC"
flipper: "WithFlipper"
use_frameworks: "StaticLibraries"
- test_ios_rntester:
requires:
Expand All @@ -160,6 +90,10 @@
- architecture: "OldArch"
jsengine: "JSC"
use_frameworks: "StaticLibraries"
# Tested with Ruby 3.2.0, let's not double test this
- architecture: "NewArch"
jsengine: "Hermes"
use_frameworks: "StaticLibraries"
- test_ios_rntester:
run_unit_tests: true
architecture: "OldArch"
Expand Down
1 change: 1 addition & 0 deletions .circleci/configurations/test_workflows/testJS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
and:
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
- equal: [ false, << pipeline.parameters.run_prealpha_workflow >> ]
jobs:
- test_js:
run_disabled_tests: false
Expand Down
Loading

0 comments on commit dbcfb7a

Please sign in to comment.