mirror of
https://github.com/facebook/react-native.git
synced 2024-11-21 22:10:14 +00:00
Remove CCI jobs that are on GHA (#45219)
Summary: With the migration to GHA, we can remove all the duplicated jobs from CircleCI. These are the only 4 jobs remained to migrate ## Changelog: [Internal] - Remove all the jobs already migrated to GHA Pull Request resolved: https://github.com/facebook/react-native/pull/45219 Test Plan: CCI is green Reviewed By: cortinico Differential Revision: D59156888 Pulled By: cipolleschi fbshipit-source-id: 193f1f8fa7484154d5295ac36a63bb81a159da6e
This commit is contained in:
parent
2e55adf339
commit
84e8cb0b03
@ -1,171 +1,4 @@
|
|||||||
# Circle CI
|
# Circle CI
|
||||||
|
|
||||||
This directory is home to the Circle CI configuration files. Circle is our continuous integration service provider. You can see the overall status of React Native's builds at https://circleci.com/gh/facebook/react-native
|
This directory was home to the Circle CI configuration files.
|
||||||
|
In July 2024 we moved to GitHub Actions, and week this folder for backward compatibility, as we want to keep on using Circle CI for the release of React Native <= 0.74.
|
||||||
You may also see an individual PR's build status by scrolling down to the Checks section in the PR.
|
|
||||||
|
|
||||||
## Purposes
|
|
||||||
|
|
||||||
We use CircleCI for mainly 3 purposes:
|
|
||||||
|
|
||||||
1. Testing changes
|
|
||||||
2. Release Nightlies
|
|
||||||
3. Release Stable Versions of React Native
|
|
||||||
|
|
||||||
When testing changes, we run all the tests on commits that lands on `main`. For commits in PR, we try to understand which kind of changes the PR is about and we try to selectively run only the relevant tests. so, for example, if a PR only touches iOS files, we are going to run only iOS tests.
|
|
||||||
|
|
||||||
A Nighly job runs every day at around 9:00 PM, GMT. They run from `main` and they publish a version of React Native using the current state of the codebase, creating a version number that follows the format: `0.<current-version+1>.0-nightly-<YYYYMMDD>-<short-commit-hash>`.
|
|
||||||
The nightly job also publish all the monorepo packages, taking care of updating the transitive dependencies of those packages.
|
|
||||||
|
|
||||||
Stable versions are released manually by the Release Crew and they run from a stable branch. Stable branches have the shape of `0.<version>-stable`.
|
|
||||||
|
|
||||||
## How It Works?
|
|
||||||
|
|
||||||
CircleCI execution is now split in two steps:
|
|
||||||
- Setup
|
|
||||||
- Testing
|
|
||||||
|
|
||||||
The setup step takes care of analyzing the changes in the PR and of deciding which jobs needs to run.
|
|
||||||
|
|
||||||
The testing flow is a set of workflows that executes the required tests.
|
|
||||||
|
|
||||||
### Setup
|
|
||||||
|
|
||||||
The code of the setup workflow lives in the root [`config.yml`](https://github.com/facebook/react-native/blob/main/.circleci/config.yml) file.
|
|
||||||
It uses the `Continuation orb` from CircleCI to start a CI flow that depends on the changes present in the PR.
|
|
||||||
|
|
||||||
If the changes are not coming from a PR (either a simple commit or if the CI is running on main) **we always run all the tests** as a cautionary measure.
|
|
||||||
|
|
||||||
The setup job has also to expose all the pipeline parameters that we would need to pass to the actual workflow. Those parameters are **automatically forwarded** to the workflows that are started as a result of the setup.
|
|
||||||
|
|
||||||
The setup job uses a JS script to carry on its logic. The [`pipeline_selection.js`](https://github.com/facebook/react-native/blob/main/scripts/circleci/pipeline_selection.js) script can be invoked with two commands:
|
|
||||||
- `filter-jobs`
|
|
||||||
- `create-configs`
|
|
||||||
|
|
||||||
The **`filter-jobs`** command takes care of creating a JSON representation of the tests we need to run based on the changes in the PR.
|
|
||||||
|
|
||||||
The **`create-configs`** command consumes the JSON representation to create a CircleCI configuration that can then executes all the required tests.
|
|
||||||
|
|
||||||
#### Creating a Configuration
|
|
||||||
|
|
||||||
To create a configuration, the `pipeline-selection` scripts collates together various pieces of `YML` files that lives in the [`Configurations` folder](https://github.com/facebook/react-native/tree/main/.circleci/configurations).
|
|
||||||
|
|
||||||
The order in which these files are appended is **important** and it always contains the following.:
|
|
||||||
|
|
||||||
1. `top_level.yml`: this file contains some high level directives for CircleCI, like the version, the list of orbs, the cache-keys, and the pipeline parameters that can be used by the workflows.
|
|
||||||
2. `executors.yml`: this file contains the list of the executors used in our jobs and their configurations.
|
|
||||||
3. `commands.yml`: this file contains all the commands that can be used by jobs to executes. Commands are reusable functions that are shared by multiple jobs.
|
|
||||||
4. `jobs.yml`: this file contains the jobs that are used by workflows to carry on some specific tasks. They are composed of sequential commands.
|
|
||||||
5. `workflows.yml`: this file contains the shared workflows that needs to (or can) be always executed, no matter which kind of changes are pushed to CI. An example of these workflows is `analysis` (which is always executed) or `nightly` (which can be executed if a specific pipeline parameter is passed to the CI).
|
|
||||||
|
|
||||||
Then, the `pipeline_selection create-configs` attach some specific test workflows, depending on the changes that are present in the PR. These change-dependent workflows live in the [`test_workflows`](https://github.com/facebook/react-native/tree/main/.circleci/configurations/test_workflows) folder.
|
|
||||||
These workflows are:
|
|
||||||
* `testAll.yml` => runs all the possible tests. This workflow is executed on main and on PRs which change set touches both iOS and Android
|
|
||||||
* `testAndroid.yml` => runs all the build steps and Android tests. This is used on changes that happens on the Android codebase and infra (`ReactAndroid` folder)
|
|
||||||
* `testIOS.yml` => runs all the build steps and iOS tests. This is used on changes that happens on the iOS codebase and infra (`React` folder)
|
|
||||||
* `testJS.yml` => For all the changes that do not touch native/platform code, we only run JS tests.
|
|
||||||
|
|
||||||
Notice that if there are changes on files that do not represents code (for example `.md` files like this one or the `Changelog`) we don't run any CI.
|
|
||||||
|
|
||||||
## Test workflows
|
|
||||||
|
|
||||||
The test workflows for native code are composed of 2 parts:
|
|
||||||
- building React Native
|
|
||||||
- testing
|
|
||||||
|
|
||||||
Building React Native requires us to build several parts of it:
|
|
||||||
1. We need to build the Hermes JS engine
|
|
||||||
2. We need to build Android to create prebuilds
|
|
||||||
3. We need to package everything in an npm package that will mimic a React native release
|
|
||||||
4. We need to create a local maven repository
|
|
||||||
|
|
||||||
### Building Hermes Engine
|
|
||||||
|
|
||||||
#### Android
|
|
||||||
The `build_android` workflows takes care of building the Android version of Hermes and to put it properly in a local maven repository.
|
|
||||||
See the [Build Android](#build_android) section below.
|
|
||||||
|
|
||||||
#### iOS
|
|
||||||
Hermes is a very complicated item to build for iOS.
|
|
||||||
It is composed of the Hermes compiler (HermesC) and of the actual engine.
|
|
||||||
|
|
||||||
Hermes is shipped as a universal XCFramework. This means that we need to build all the architecture slices and then put them together in the XCFramework archive.
|
|
||||||
We also need to build 2 configurations: Debug and Release.
|
|
||||||
|
|
||||||
In order to be efficient and to save costs, we parallelize the process as much as possible:
|
|
||||||
|
|
||||||
1. We prepare the environment for building Hermes.
|
|
||||||
2. We build HermesC which is required by all the slices.
|
|
||||||
3. We start 8 jobs to build all the required slices in parallel:
|
|
||||||
1. `iphone` slice, Debug mode
|
|
||||||
1. `iphonesimulator` slice, Debug mode
|
|
||||||
1. `macos` slice, Debug mode
|
|
||||||
1. `catalyst` slice, Debug mode
|
|
||||||
1. `iphone` slice, Release mode
|
|
||||||
1. `iphonesimulator` slice, Release mode
|
|
||||||
1. `macos` slice, Release mode
|
|
||||||
1. `catalyst` slice, Release mode
|
|
||||||
4. We then have 2 jobs to create the Debug and Release tarballs in parallel.
|
|
||||||
1. The Debug job receives the 4 Debug slices
|
|
||||||
1. The Release job receives the 4 Release slices
|
|
||||||
|
|
||||||
The `Debug` and `Release` tarball are then uploaded as artifacts. Notice that these we use these artifacts to **test the release** of React Native.
|
|
||||||
|
|
||||||
While building Hermes, we take also care of building the dSYMs. A dSYM (Debug Symbols) is an archive that contains the Debug Symbols that users can load to de-symbolicate the Hermes Stack traces. These symbols are published when we create a React Native release.
|
|
||||||
|
|
||||||
A lot of these build steps are automated by some shell scripts that lives in the [`react-native/packages/react-native/sdks/hermes-engine/utils` folder](https://github.com/facebook/react-native/tree/main/packages/react-native/sdks/hermes-engine/utils).
|
|
||||||
|
|
||||||
### Build Android
|
|
||||||
|
|
||||||
The android build is all managed by Gradle, so building android should be as easy as calling a [`gradle` command](https://github.com/facebook/react-native/blob/main/.circleci/configurations/jobs.yml#L268-L274).
|
|
||||||
|
|
||||||
The relevant part here is that the build android generates a `maven-local` repository that is passed to the [`build_npm_package`](https://github.com/facebook/react-native/blob/main/.circleci/configurations/jobs.yml#L1182) and that we use to test the releases.
|
|
||||||
|
|
||||||
### Build NPM package
|
|
||||||
|
|
||||||
This job is the responsible to create an NPM package that is suitable to be released or tested in CI.
|
|
||||||
If we are in a release flow (for example the Nightly workflow), it also proceed with the publication.
|
|
||||||
|
|
||||||
The job can be invoked with different parameters:
|
|
||||||
- `dry-run` => it does not publish anything, but prepare the artifacts to be used for testing
|
|
||||||
- `nightly` => it creates the artifacts and publish a nightly version of React Native.
|
|
||||||
- `release` => it creates the artifacts and publish a stable version of React Native.
|
|
||||||
|
|
||||||
The build NPM package takes all the artifacts produced in the previous steps (iOS' Hermes, iOS' Hermes dSYMs, Android's `maven-local`) and creates an npm package packing all the code.
|
|
||||||
|
|
||||||
If in a release mode, it also proceed publishing the NPM package to NPM, and the artifacts to Maven central, which we use to distribute all the artifacts.
|
|
||||||
|
|
||||||
This job also uploads the `maven-local` repository and a zipped version of the npm package to CircleCI's artifacts. We use these artifacts to **test the release** of React Native.
|
|
||||||
|
|
||||||
## Testing React Native
|
|
||||||
React Native tests runs in two different scenarios:
|
|
||||||
- RNTester
|
|
||||||
- A New App
|
|
||||||
|
|
||||||
### RNTester
|
|
||||||
RNTester is our internal testing app. It is a fully working React Native app that lives in the [`react-native/packages/rn-tester` folder](https://github.com/facebook/react-native/tree/main/packages/rn-tester) of the repository.
|
|
||||||
RNTester is an app which contains code that exercise most part of the React Native frameworks.
|
|
||||||
It also has the feature of building React Native **from source**. For that reason, it does not have to wait for the NPM package to be ready, but RNTester's tests can start as soon as the `build_android` step and the step that builds Hermes for iOS are done.
|
|
||||||
|
|
||||||
Notice the Tests on RNTester for iOS consumes the Hermes engine that is built in the previous steps.
|
|
||||||
|
|
||||||
For Android, these tests creates an APK that is uploaded as an artifact in CircleCI. We use these artifacts to **test the releases** of React Native..
|
|
||||||
|
|
||||||
### A New App
|
|
||||||
The React Native repo contains a template app in the [`react-native/packages/react-native/template` folder]() that is used to spin up a new application that is preconfigured with React Native.
|
|
||||||
|
|
||||||
We have several tests that we run starting from the template, testing various configurations:
|
|
||||||
- Debug/Release
|
|
||||||
- JSC/Hermes (two different JS engine we support)
|
|
||||||
- New/Old Architecture (two different Architectures for React Native)
|
|
||||||
|
|
||||||
We want to test all the React Native changes against the template, but we can't publish a React native version on each change that is merged. Therefore, to run tests on the template we use a NPM registry proxy called [Verdaccio](https://verdaccio.org/).
|
|
||||||
|
|
||||||
When running a Template test our CI follows roughly these steps:
|
|
||||||
1. Prepare the executor
|
|
||||||
2. Start a Verdaccio server
|
|
||||||
3. Publish on Verdaccio all the monorepo [packages](https://github.com/facebook/react-native/tree/main/packages) on which React Native depends on.
|
|
||||||
4. Publish on Verdaccio the react-native NPM package that has been created in the NPM step
|
|
||||||
5. Spin up a new React native apps from the template, downloading react-native from Verdaccio.
|
|
||||||
|
|
||||||
In this way, we are sure that we can test all the changes that happen in React Native on a new React Native app.
|
|
||||||
|
@ -1,114 +1,13 @@
|
|||||||
version: 2.1
|
version: 2.1
|
||||||
|
workflows:
|
||||||
# this allows you to use CircleCI's dynamic configuration feature
|
version: 2
|
||||||
setup: true
|
stub:
|
||||||
|
jobs:
|
||||||
orbs:
|
- circleci-stub
|
||||||
continuation: circleci/continuation@1.0.0
|
|
||||||
|
|
||||||
parameters:
|
|
||||||
# Real pipelines parameters
|
|
||||||
run_release_workflow:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
run_nightly_workflow:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
release_version:
|
|
||||||
default: ""
|
|
||||||
type: string
|
|
||||||
|
|
||||||
release_monorepo_packages_version:
|
|
||||||
default: ""
|
|
||||||
type: string
|
|
||||||
|
|
||||||
release_tag:
|
|
||||||
default: ""
|
|
||||||
type: string
|
|
||||||
|
|
||||||
release_dry_run:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
choose_ci_jobs:
|
circleci-stub:
|
||||||
docker:
|
docker:
|
||||||
- image: debian:bullseye
|
- image: debian:bullseye
|
||||||
resource_class: small
|
|
||||||
steps:
|
steps:
|
||||||
- run:
|
- run: echo "There is nothing here, just an empty job. Everything has been moved to GitHub Action"
|
||||||
name: Install Yarn
|
|
||||||
command: |
|
|
||||||
apt update
|
|
||||||
apt install -y wget git curl jq
|
|
||||||
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y ca-certificates curl gnupg
|
|
||||||
mkdir -p /etc/apt/keyrings
|
|
||||||
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
||||||
|
|
||||||
NODE_MAJOR=18
|
|
||||||
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
|
|
||||||
apt-get update
|
|
||||||
|
|
||||||
apt install -y nodejs
|
|
||||||
npm install --global yarn
|
|
||||||
- checkout
|
|
||||||
- run:
|
|
||||||
name: Yarn Install
|
|
||||||
command: yarn install
|
|
||||||
- when:
|
|
||||||
condition:
|
|
||||||
or:
|
|
||||||
- equal: [ main, << pipeline.git.branch >> ]
|
|
||||||
- matches:
|
|
||||||
pattern: /0\.[0-9]+[\.[0-9]+]?-stable/
|
|
||||||
value: << pipeline.git.branch >>
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
name: "[Main or Stable] Create input for config to test everything"
|
|
||||||
command: |
|
|
||||||
mkdir -p /tmp/circleci/
|
|
||||||
echo '{ "run_all": true }' > /tmp/circleci/pipeline_config.json
|
|
||||||
- when:
|
|
||||||
condition:
|
|
||||||
not:
|
|
||||||
or:
|
|
||||||
- equal: [ main, << pipeline.git.branch >> ]
|
|
||||||
- matches:
|
|
||||||
pattern: /0\.[0-9]+[\.[0-9]+]?-stable/
|
|
||||||
value: << pipeline.git.branch >>
|
|
||||||
steps:
|
|
||||||
- run:
|
|
||||||
name: "[PR Branch] Filter 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 "For safety, we run all the tests!"
|
|
||||||
mkdir -p /tmp/circleci/
|
|
||||||
echo '{ "run_all": true }' > /tmp/circleci/pipeline_config.json
|
|
||||||
else
|
|
||||||
PR_NUMBER="${CIRCLE_PULL_REQUEST##*/}"
|
|
||||||
node ./scripts/circleci/pipeline_selection.js filter-jobs
|
|
||||||
fi
|
|
||||||
- run:
|
|
||||||
name: Create config
|
|
||||||
description: Generates a configuration on the fly, depending on the files that have been modified
|
|
||||||
command: |
|
|
||||||
node ./scripts/circleci/pipeline_selection.js create-configs
|
|
||||||
- store_artifacts:
|
|
||||||
path: .circleci/generated_config.yml
|
|
||||||
destination: generated_config.yml
|
|
||||||
- continuation/continue:
|
|
||||||
configuration_path: .circleci/generated_config.yml
|
|
||||||
|
|
||||||
# our single workflow, that triggers the setup job defined above
|
|
||||||
workflows:
|
|
||||||
always-run:
|
|
||||||
jobs:
|
|
||||||
- choose_ci_jobs:
|
|
||||||
filters:
|
|
||||||
tags:
|
|
||||||
only: /.*/
|
|
||||||
|
@ -1,38 +0,0 @@
|
|||||||
# -------------------------
|
|
||||||
# EXECUTORS
|
|
||||||
# -------------------------
|
|
||||||
executors:
|
|
||||||
nodelts:
|
|
||||||
<<: *defaults
|
|
||||||
docker:
|
|
||||||
- image: *nodelts_image
|
|
||||||
resource_class: "large"
|
|
||||||
nodeprevlts:
|
|
||||||
<<: *defaults
|
|
||||||
docker:
|
|
||||||
- image: *nodeprevlts_image
|
|
||||||
resource_class: "large"
|
|
||||||
# Executor with Node & Java used to inspect and lint
|
|
||||||
node-browsers-small:
|
|
||||||
<<: *defaults
|
|
||||||
docker:
|
|
||||||
- image: *nodelts_browser_image
|
|
||||||
resource_class: "small"
|
|
||||||
node-browsers-medium:
|
|
||||||
<<: *defaults
|
|
||||||
docker:
|
|
||||||
- image: *nodelts_browser_image
|
|
||||||
resource_class: "medium"
|
|
||||||
reactnativeandroid-xlarge:
|
|
||||||
<<: *android-defaults
|
|
||||||
resource_class: "xlarge"
|
|
||||||
reactnativeandroid-large:
|
|
||||||
<<: *android-defaults
|
|
||||||
resource_class: "large"
|
|
||||||
reactnativeios:
|
|
||||||
<<: *defaults
|
|
||||||
macos:
|
|
||||||
xcode: *xcode_version
|
|
||||||
resource_class: macos.m1.medium.gen1
|
|
||||||
environment:
|
|
||||||
- RCT_BUILD_HERMES_FROM_SOURCE: true
|
|
@ -1,99 +0,0 @@
|
|||||||
tests:
|
|
||||||
when:
|
|
||||||
and:
|
|
||||||
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
|
|
||||||
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
|
|
||||||
jobs:
|
|
||||||
- prepare_release:
|
|
||||||
name: "prepare_release (dry run test)"
|
|
||||||
version: "0.0.0"
|
|
||||||
monorepo_packages_version: "0.0.0"
|
|
||||||
tag: test
|
|
||||||
dry_run: true
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_android:
|
|
||||||
release_type: "dry-run"
|
|
||||||
- build_hermesc_linux:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_hermesc_apple:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_apple_slices_hermes:
|
|
||||||
requires:
|
|
||||||
- build_hermesc_apple
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"]
|
|
||||||
- build_hermes_macos:
|
|
||||||
requires:
|
|
||||||
- build_apple_slices_hermes
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
- build_hermesc_windows:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_npm_package:
|
|
||||||
# Build a release package on every untagged commit, but do not publish to npm.
|
|
||||||
release_type: "dry-run"
|
|
||||||
requires:
|
|
||||||
- build_android
|
|
||||||
- build_hermesc_linux
|
|
||||||
- build_hermes_macos
|
|
||||||
- build_hermesc_windows
|
|
||||||
- test_android:
|
|
||||||
requires:
|
|
||||||
- build_android
|
|
||||||
## 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
|
|
||||||
name: "Test Template with Ruby 3.2.2"
|
|
||||||
ruby_version: "3.2.2"
|
|
||||||
architecture: "NewArch"
|
|
||||||
flavor: "Debug"
|
|
||||||
jsengine: "Hermes"
|
|
||||||
use_frameworks: "StaticLibraries"
|
|
||||||
- test_ios_helloworld:
|
|
||||||
requires:
|
|
||||||
- build_hermes_macos
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
jsengine: ["Hermes", "JSC"]
|
|
||||||
use_frameworks: ["StaticLibraries", "DynamicFrameworks"]
|
|
||||||
exclude:
|
|
||||||
# This config is tested with Ruby 3.2.2. Let's not double test it.
|
|
||||||
- flavor: "Debug"
|
|
||||||
jsengine: "Hermes"
|
|
||||||
use_frameworks: "StaticLibraries"
|
|
||||||
- test_ios_rntester:
|
|
||||||
requires:
|
|
||||||
- build_hermes_macos
|
|
||||||
use_frameworks: "DynamicFrameworks"
|
|
||||||
architecture: "NewArch"
|
|
||||||
ruby_version: "3.2.2"
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
jsengine: ["Hermes", "JSC"]
|
|
||||||
- test_ios_rntester:
|
|
||||||
run_unit_tests: false
|
|
||||||
use_frameworks: "StaticLibraries"
|
|
||||||
ruby_version: "2.6.10"
|
|
||||||
requires:
|
|
||||||
- build_hermes_macos
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
jsengine: ["Hermes", "JSC"]
|
|
||||||
architecture: ["NewArch", "OldArch"]
|
|
@ -1,58 +0,0 @@
|
|||||||
tests_android:
|
|
||||||
when:
|
|
||||||
and:
|
|
||||||
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
|
|
||||||
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
|
|
||||||
jobs:
|
|
||||||
- prepare_release:
|
|
||||||
name: "prepare_release (dry run test)"
|
|
||||||
version: "0.0.0"
|
|
||||||
monorepo_packages_version: "0.0.0"
|
|
||||||
tag: test
|
|
||||||
dry_run: true
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_android:
|
|
||||||
release_type: "dry-run"
|
|
||||||
- build_hermesc_linux:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_hermesc_apple:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_apple_slices_hermes:
|
|
||||||
requires:
|
|
||||||
- build_hermesc_apple
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"]
|
|
||||||
- build_hermes_macos:
|
|
||||||
requires:
|
|
||||||
- build_apple_slices_hermes
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
- build_hermesc_windows:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_npm_package:
|
|
||||||
# Build a release package on every untagged commit, but do not publish to npm.
|
|
||||||
release_type: "dry-run"
|
|
||||||
requires:
|
|
||||||
- build_android
|
|
||||||
- build_hermesc_linux
|
|
||||||
- build_hermes_macos
|
|
||||||
- build_hermesc_windows
|
|
||||||
## 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"]
|
|
@ -1,86 +0,0 @@
|
|||||||
test_ios:
|
|
||||||
when:
|
|
||||||
and:
|
|
||||||
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
|
|
||||||
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
|
|
||||||
jobs:
|
|
||||||
- prepare_release:
|
|
||||||
name: "prepare_release (dry run test)"
|
|
||||||
version: "0.0.0"
|
|
||||||
monorepo_packages_version: "0.0.0"
|
|
||||||
tag: test
|
|
||||||
dry_run: true
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_android:
|
|
||||||
release_type: "dry-run"
|
|
||||||
- build_hermesc_linux:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_hermesc_apple:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_apple_slices_hermes:
|
|
||||||
requires:
|
|
||||||
- build_hermesc_apple
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
slice: ["macosx", "iphoneos", "iphonesimulator", "catalyst", "xros", "xrsimulator"]
|
|
||||||
- build_hermes_macos:
|
|
||||||
requires:
|
|
||||||
- build_apple_slices_hermes
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
- build_hermesc_windows:
|
|
||||||
requires:
|
|
||||||
- prepare_hermes_workspace
|
|
||||||
- build_npm_package:
|
|
||||||
# Build a release package on every untagged commit, but do not publish to npm.
|
|
||||||
release_type: "dry-run"
|
|
||||||
requires:
|
|
||||||
- build_android
|
|
||||||
- build_hermesc_linux
|
|
||||||
- build_hermes_macos
|
|
||||||
- build_hermesc_windows
|
|
||||||
- test_ios_helloworld:
|
|
||||||
requires:
|
|
||||||
- build_hermes_macos
|
|
||||||
name: "Test Template with Ruby 3.2.2"
|
|
||||||
ruby_version: "3.2.2"
|
|
||||||
architecture: "NewArch"
|
|
||||||
flavor: "Debug"
|
|
||||||
jsengine: "Hermes"
|
|
||||||
use_frameworks: "StaticLibraries"
|
|
||||||
- test_ios_helloworld:
|
|
||||||
requires:
|
|
||||||
- build_hermes_macos
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
flavor: ["Debug", "Release"]
|
|
||||||
jsengine: ["Hermes", "JSC"]
|
|
||||||
use_frameworks: ["StaticLibraries", "DynamicFrameworks"]
|
|
||||||
exclude:
|
|
||||||
# This config is tested with Ruby 3.2.2. Let's not double test it.
|
|
||||||
- flavor: "Debug"
|
|
||||||
jsengine: "Hermes"
|
|
||||||
use_frameworks: "StaticLibraries"
|
|
||||||
- test_ios_rntester:
|
|
||||||
requires:
|
|
||||||
- build_hermes_macos
|
|
||||||
use_frameworks: "DynamicFrameworks"
|
|
||||||
ruby_version: "3.2.2"
|
|
||||||
architecture: "NewArch"
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
jsengine: ["Hermes", "JSC"]
|
|
||||||
- test_ios_rntester:
|
|
||||||
run_unit_tests: false
|
|
||||||
use_frameworks: "StaticLibraries"
|
|
||||||
ruby_version: "2.6.10"
|
|
||||||
requires:
|
|
||||||
- build_hermes_macos
|
|
||||||
matrix:
|
|
||||||
parameters:
|
|
||||||
jsengine: ["Hermes", "JSC"]
|
|
||||||
architecture: ["NewArch", "OldArch"]
|
|
@ -1,11 +0,0 @@
|
|||||||
tests_js:
|
|
||||||
when:
|
|
||||||
and:
|
|
||||||
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
|
|
||||||
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
|
|
||||||
jobs:
|
|
||||||
- test_js:
|
|
||||||
run_disabled_tests: false
|
|
||||||
- test_js:
|
|
||||||
name: test_js_prev_lts
|
|
||||||
executor: nodeprevlts
|
|
@ -1,149 +0,0 @@
|
|||||||
version: 2.1
|
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# ORBS
|
|
||||||
# -------------------------
|
|
||||||
|
|
||||||
orbs:
|
|
||||||
win: circleci/windows@2.4.0
|
|
||||||
android: circleci/android@2.3.0
|
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# REFERENCES
|
|
||||||
# -------------------------
|
|
||||||
references:
|
|
||||||
defaults: &defaults
|
|
||||||
working_directory: ~/react-native
|
|
||||||
environment:
|
|
||||||
- GIT_COMMIT_DESC: git log --format=oneline -n 1 $CIRCLE_SHA1
|
|
||||||
# The public github tokens are publicly visible by design
|
|
||||||
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: &github_analysisbot_token_a "312d354b5c36f082cfe9"
|
|
||||||
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: &github_analysisbot_token_b "07973d757026bdd9f196"
|
|
||||||
# Homebrew currently breaks while updating:
|
|
||||||
# https://discuss.circleci.com/t/brew-install-fails-while-updating/32992
|
|
||||||
- HOMEBREW_NO_AUTO_UPDATE: 1
|
|
||||||
android-defaults: &android-defaults
|
|
||||||
working_directory: ~/react-native
|
|
||||||
docker:
|
|
||||||
- image: reactnativecommunity/react-native-android:v13.1
|
|
||||||
environment:
|
|
||||||
- TERM: "dumb"
|
|
||||||
- GRADLE_OPTS: '-Dorg.gradle.daemon=false'
|
|
||||||
# By default we only build ARM64 to save time/resources. For release/nightlies/prealpha, we override this value to build all archs.
|
|
||||||
- ORG_GRADLE_PROJECT_reactNativeArchitectures: "arm64-v8a"
|
|
||||||
# Repeated here, as the environment key in this executor will overwrite the one in defaults
|
|
||||||
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: *github_analysisbot_token_a
|
|
||||||
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: *github_analysisbot_token_b
|
|
||||||
|
|
||||||
hermes_workspace_root: &hermes_workspace_root
|
|
||||||
/tmp/hermes
|
|
||||||
hermes_tarball_artifacts_dir: &hermes_tarball_artifacts_dir
|
|
||||||
/tmp/hermes/hermes-runtime-darwin
|
|
||||||
hermes_osxbin_artifacts_dir: &hermes_osxbin_artifacts_dir
|
|
||||||
/tmp/hermes/osx-bin
|
|
||||||
attach_hermes_workspace: &attach_hermes_workspace
|
|
||||||
attach_workspace:
|
|
||||||
at: *hermes_workspace_root
|
|
||||||
xcodebuild_derived_data_path: &xcodebuild_derived_data_path
|
|
||||||
~/Library/Developer/Xcode/DerivedData/
|
|
||||||
|
|
||||||
main_or_stable_only: &main_or_stable_only
|
|
||||||
filters:
|
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- main
|
|
||||||
- /0\.[0-9]+[\.[0-9]+]?-stable/
|
|
||||||
|
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# Dependency Anchors
|
|
||||||
# -------------------------
|
|
||||||
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"
|
|
||||||
nodelts_browser_image: &nodelts_browser_image "cimg/node:20.2.0-browsers"
|
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# Cache Key Anchors
|
|
||||||
# -------------------------
|
|
||||||
# Anchors for the cache keys
|
|
||||||
|
|
||||||
cache_keys:
|
|
||||||
checkout_cache_key: &checkout_cache_key v1-checkout
|
|
||||||
gems_cache_key: &gems_cache_key v2-gems-{{ arch }}-{{ checksum "Gemfile.lock" }}
|
|
||||||
gradle_cache_key: &gradle_cache_key v3-gradle-{{ .Environment.CIRCLE_JOB }}-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "packages/react-native/ReactAndroid/gradle.properties" }}
|
|
||||||
yarn_cache_key: &yarn_cache_key v6-yarn-cache-{{ .Environment.CIRCLE_JOB }}
|
|
||||||
rbenv_cache_key: &rbenv_cache_key v1-rbenv-{{ arch }}-{{ checksum "/tmp/required_ruby" }}
|
|
||||||
hermes_workspace_cache_key: &hermes_workspace_cache_key v5-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
|
||||||
hermes_workspace_debug_cache_key: &hermes_workspace_debug_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
|
|
||||||
hermes_workspace_release_cache_key: &hermes_workspace_release_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
|
|
||||||
hermes_linux_cache_key: &hermes_linux_cache_key v1-hermes-{{ .Environment.CIRCLE_JOB }}-linux-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
|
||||||
hermes_windows_cache_key: &hermes_windows_cache_key v2-hermes-{{ .Environment.CIRCLE_JOB }}-windows-{{ checksum "/Users/circleci/project/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
|
||||||
# Hermes iOS
|
|
||||||
hermesc_apple_cache_key: &hermesc_apple_cache_key v4-hermesc-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
|
||||||
hermes_apple_slices_cache_key: &hermes_apple_slices_cache_key v8-hermes-apple-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
|
|
||||||
hermes_tarball_debug_cache_key: &hermes_tarball_debug_cache_key v6-hermes-tarball-debug-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
|
|
||||||
hermes_tarball_release_cache_key: &hermes_tarball_release_cache_key v5-hermes-tarball-release-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}-{{ checksum "packages/react-native/sdks/hermes-engine/utils/build-apple-framework.sh" }}
|
|
||||||
hermes_macosx_bin_release_cache_key: &hermes_macosx_bin_release_cache_key v5-hermes-release-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
|
||||||
hermes_macosx_bin_debug_cache_key: &hermes_macosx_bin_debug_cache_key v3-hermes-debug-macosx-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
|
||||||
hermes_dsym_debug_cache_key: &hermes_dsym_debug_cache_key v3-hermes-debug-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
|
||||||
hermes_dsym_release_cache_key: &hermes_dsym_release_cache_key v3-hermes-release-dsym-{{ checksum "/tmp/hermes/hermesversion" }}-{{ checksum "/tmp/react-native-version" }}
|
|
||||||
# Cocoapods - RNTester
|
|
||||||
pods_cache_key: &pods_cache_key v14-pods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
|
|
||||||
cocoapods_cache_key: &cocoapods_cache_key v14-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock" }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
|
||||||
rntester_podfile_lock_cache_key: &rntester_podfile_lock_cache_key v13-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
|
||||||
# Cocoapods - HelloWorld
|
|
||||||
helloworld_cocoapods_cache_key: &helloworld_cocoapods_cache_key v4-cocoapods-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/helloworld/ios/Podfile.lock" }}-{{ checksum "packages/helloworld/ios/Podfile" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
|
||||||
helloworld_podfile_lock_cache_key: &helloworld_podfile_lock_cache_key v4-podfilelock-{{ arch }}-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/helloworld/ios/Podfile" }}-{{ checksum "/tmp/week_year" }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
|
||||||
|
|
||||||
cache_paths:
|
|
||||||
hermes_workspace_macos_cache_paths: &hermes_workspace_macos_cache_paths
|
|
||||||
- ~/react-native/packages/react-native/sdks/hermes/build_macosx
|
|
||||||
- ~/react-native/packages/react-native/sdks/hermes/destroot
|
|
||||||
hermes_tarball_cache_paths: &hermes_tarball_cache_paths
|
|
||||||
- *hermes_tarball_artifacts_dir
|
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# Filters
|
|
||||||
# -------------------------
|
|
||||||
# CircleCI filters are OR-ed, with all branches triggering by default and tags excluded by default
|
|
||||||
# CircleCI env-vars are only set with the branch OR tag that triggered the job, not both.
|
|
||||||
|
|
||||||
# In this case, CIRCLE_BRANCH is unset, but CIRCLE_TAG is set.
|
|
||||||
only_release_tags: &only_release_tags
|
|
||||||
# Both of the following conditions must be included!
|
|
||||||
# Ignore any commit on any branch by default.
|
|
||||||
branches:
|
|
||||||
ignore: /.*/
|
|
||||||
# Only act on version tags.
|
|
||||||
tags:
|
|
||||||
only: /v[0-9]+(\.[0-9]+)*(\-rc(\.[0-9]+)?)?/
|
|
||||||
|
|
||||||
# -------------------------
|
|
||||||
# PIPELINE PARAMETERS
|
|
||||||
# -------------------------
|
|
||||||
parameters:
|
|
||||||
run_release_workflow:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
run_nightly_workflow:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
||||||
|
|
||||||
release_version:
|
|
||||||
default: ""
|
|
||||||
type: string
|
|
||||||
|
|
||||||
release_monorepo_packages_version:
|
|
||||||
default: ""
|
|
||||||
type: string
|
|
||||||
|
|
||||||
release_tag:
|
|
||||||
default: ""
|
|
||||||
type: string
|
|
||||||
|
|
||||||
release_dry_run:
|
|
||||||
default: false
|
|
||||||
type: boolean
|
|
@ -1,28 +0,0 @@
|
|||||||
# -------------------------
|
|
||||||
# WORKFLOWS
|
|
||||||
#
|
|
||||||
# When creating a new workflow, make sure to include condition:
|
|
||||||
#
|
|
||||||
# when:
|
|
||||||
# and:
|
|
||||||
# - equal: [ false, << pipeline.parameters.run_release_workflow >> ]
|
|
||||||
# - equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
|
|
||||||
#
|
|
||||||
# It's setup this way so we can trigger a release via a POST
|
|
||||||
# See limitations: https://support.circleci.com/hc/en-us/articles/360050351292-How-to-trigger-a-workflow-via-CircleCI-API-v2
|
|
||||||
# -------------------------
|
|
||||||
|
|
||||||
workflows:
|
|
||||||
version: 2
|
|
||||||
|
|
||||||
analysis:
|
|
||||||
when:
|
|
||||||
and:
|
|
||||||
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
|
|
||||||
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
|
|
||||||
jobs:
|
|
||||||
# Run lints on every commit
|
|
||||||
- analyze_code
|
|
||||||
|
|
||||||
# Run code checks on PRs
|
|
||||||
- analyze_pr
|
|
Loading…
Reference in New Issue
Block a user