2019-05-31 01:07:45 +03:00
|
|
|
version: 2.1
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-03-30 17:19:23 +03:00
|
|
|
# -------------------------
|
|
|
|
# ORBS
|
|
|
|
# -------------------------
|
|
|
|
|
|
|
|
orbs:
|
|
|
|
win: circleci/windows@2.4.0
|
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
2022-03-08 04:02:08 +03:00
|
|
|
# REFERENCES
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
2022-03-08 04:02:08 +03:00
|
|
|
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_PULLBOT_GITHUB_TOKEN_A: &github_pullbot_token_a "a6edf8e8d40ce4e8b11a"
|
|
|
|
- PUBLIC_PULLBOT_GITHUB_TOKEN_B: &github_pullbot_token_b "150e1341f4dd9c944d2a"
|
|
|
|
- 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
|
|
|
|
|
|
|
|
hermes_workspace_root: &hermes_workspace_root
|
|
|
|
/tmp/hermes
|
|
|
|
attach_hermes_workspace: &attach_hermes_workspace
|
|
|
|
attach_workspace:
|
|
|
|
at: *hermes_workspace_root
|
|
|
|
|
2022-05-25 21:44:42 +03:00
|
|
|
# -------------------------
|
|
|
|
# Dependency Anchors
|
|
|
|
# -------------------------
|
|
|
|
dependency_versions:
|
2022-08-23 16:43:01 +03:00
|
|
|
xcode_version: &xcode_version "13.3.1"
|
2022-05-25 21:44:42 +03:00
|
|
|
nodelts_image: &nodelts_image "cimg/node:16.14"
|
|
|
|
nodeprevlts_image: &nodeprevlts_image "cimg/node:14.19"
|
|
|
|
|
2022-05-12 21:08:29 +03:00
|
|
|
# -------------------------
|
|
|
|
# Cache Key Anchors
|
|
|
|
# -------------------------
|
|
|
|
# Anchors for the cache keys
|
|
|
|
|
|
|
|
cache_keys:
|
2022-05-18 17:43:51 +03:00
|
|
|
checkout_cache_key: &checkout_cache_key v1-checkout
|
2022-05-12 21:08:29 +03:00
|
|
|
gems_cache_key: &gems_cache_key v1-gems-{{ checksum "Gemfile.lock" }}
|
|
|
|
gradle_cache_key: &gradle_cache_key v1-gradle-{{ checksum "gradle/wrapper/gradle-wrapper.properties" }}-{{ checksum "ReactAndroid/gradle.properties" }}
|
2022-08-24 15:16:33 +03:00
|
|
|
hermes_cache_key: &hermes_cache_key v3-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "/tmp/hermes/hermesversion" }}
|
|
|
|
hermes_windows_cache_key: &hermes_windows_cache_key v3-hermes-{{ .Environment.CIRCLE_JOB }}-{{ checksum "tmp/hermes/hermesversion" }}
|
|
|
|
hermes_tarball_cache_key: &hermes_tarball_cache_key v3-hermes-tarball-{{ checksum "/tmp/hermes/hermesversion" }}
|
|
|
|
pods_cache_key: &pods_cache_key v8-pods-{{ .Environment.CIRCLE_JOB }}-{{ checksum "packages/rn-tester/Podfile.lock.bak" }}-{{ checksum "packages/rn-tester/Podfile" }}
|
2022-05-12 21:08:29 +03:00
|
|
|
windows_yarn_cache_key: &windows_yarn_cache_key v1-win-yarn-cache-{{ arch }}-{{ checksum "yarn.lock" }}
|
|
|
|
yarn_cache_key: &yarn_cache_key v5-yarn-cache-{{ .Environment.CIRCLE_JOB }}
|
|
|
|
|
2022-03-08 04:02:08 +03:00
|
|
|
# -------------------------
|
|
|
|
# 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]+)?)?/
|
2017-09-21 23:34:02 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
# -------------------------
|
|
|
|
# EXECUTORS
|
|
|
|
# -------------------------
|
|
|
|
executors:
|
2020-02-14 10:11:41 +03:00
|
|
|
nodelts:
|
2019-05-31 01:07:45 +03:00
|
|
|
<<: *defaults
|
|
|
|
docker:
|
2021-06-04 17:18:34 +03:00
|
|
|
# Note: Version set separately for Windows builds, see below.
|
2022-05-25 21:44:42 +03:00
|
|
|
- image: *nodelts_image
|
2022-04-02 02:19:29 +03:00
|
|
|
resource_class: "xlarge"
|
2020-02-14 10:11:41 +03:00
|
|
|
nodeprevlts:
|
2019-05-31 01:07:45 +03:00
|
|
|
<<: *defaults
|
|
|
|
docker:
|
2022-05-25 21:44:42 +03:00
|
|
|
- image: *nodeprevlts_image
|
2022-04-02 02:19:29 +03:00
|
|
|
resource_class: "xlarge"
|
2019-05-31 01:07:45 +03:00
|
|
|
reactnativeandroid:
|
|
|
|
<<: *defaults
|
|
|
|
docker:
|
2022-03-12 02:23:36 +03:00
|
|
|
- image: reactnativecommunity/react-native-android:5.4
|
2022-04-02 02:19:29 +03:00
|
|
|
resource_class: "xlarge"
|
2019-05-31 01:07:45 +03:00
|
|
|
environment:
|
|
|
|
- TERM: "dumb"
|
|
|
|
- ADB_INSTALL_TIMEOUT: 10
|
|
|
|
- GRADLE_OPTS: '-Dorg.gradle.daemon=false -Dorg.gradle.jvmargs="-XX:+HeapDumpOnOutOfMemoryError"'
|
|
|
|
- BUILD_THREADS: 2
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
# Repeated here, as the environment key in this executor will overwrite the one in defaults
|
2020-12-07 14:10:46 +03:00
|
|
|
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A: *github_analysisbot_token_a
|
|
|
|
- PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B: *github_analysisbot_token_b
|
|
|
|
- PUBLIC_PULLBOT_GITHUB_TOKEN_A: *github_pullbot_token_a
|
|
|
|
- PUBLIC_PULLBOT_GITHUB_TOKEN_B: *github_pullbot_token_b
|
2019-05-31 01:07:45 +03:00
|
|
|
reactnativeios:
|
|
|
|
<<: *defaults
|
|
|
|
macos:
|
2022-05-25 21:44:42 +03:00
|
|
|
xcode: *xcode_version
|
2022-04-02 02:19:29 +03:00
|
|
|
resource_class: macos.x86.medium.gen2
|
2019-05-31 01:07:45 +03:00
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# COMMANDS
|
|
|
|
# -------------------------
|
|
|
|
commands:
|
2022-05-18 17:43:51 +03:00
|
|
|
# Checkout with cache, on machines that are using Docker the cache is ignored
|
|
|
|
checkout_code_with_cache:
|
|
|
|
parameters:
|
|
|
|
checkout_base_cache_key:
|
|
|
|
default: *checkout_cache_key
|
|
|
|
type: string
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
|
|
|
- << parameters.checkout_base_cache_key >>-{{ .Branch }}-{{ .Revision }}
|
|
|
|
- << parameters.checkout_base_cache_key >>-{{ .Branch }}-
|
|
|
|
- << parameters.checkout_base_cache_key >>
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2022-05-18 17:43:51 +03:00
|
|
|
- save_cache:
|
|
|
|
key: << parameters.checkout_base_cache_key >>-{{ .Branch }}-{{ .Revision }}
|
|
|
|
paths:
|
|
|
|
- ".git"
|
2019-05-31 01:07:45 +03:00
|
|
|
|
|
|
|
setup_artifacts:
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Initial Setup
|
2019-12-20 03:53:54 +03:00
|
|
|
command: mkdir -p ./reports/{buck,build,junit,outputs}
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2021-10-02 07:21:03 +03:00
|
|
|
setup_ruby:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *gems_cache_key
|
2022-04-12 17:59:52 +03:00
|
|
|
- run:
|
|
|
|
name: Bundle Install
|
|
|
|
command: |
|
|
|
|
source /usr/local/share/chruby/auto.sh
|
|
|
|
bundle check || bundle install --path vendor/bundle --clean
|
2021-10-02 07:21:03 +03:00
|
|
|
- save_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *gems_cache_key
|
2021-10-02 07:21:03 +03:00
|
|
|
paths:
|
|
|
|
- vendor/bundle
|
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
run_yarn:
|
2022-05-12 21:08:29 +03:00
|
|
|
parameters:
|
|
|
|
yarn_base_cache_key:
|
|
|
|
default: *yarn_cache_key
|
|
|
|
type: string
|
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-05-12 21:08:29 +03:00
|
|
|
- << parameters.yarn_base_cache_key >>-{{ arch }}-{{ checksum "yarn.lock" }}
|
|
|
|
- << parameters.yarn_base_cache_key >>-{{ arch }}
|
|
|
|
- << parameters.yarn_base_cache_key >>
|
2019-05-31 01:07:45 +03:00
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: "Yarn: Install Dependencies"
|
2019-05-31 01:07:45 +03:00
|
|
|
command: |
|
|
|
|
# Skip yarn install on metro bump commits as the package is not yet
|
|
|
|
# available on npm
|
|
|
|
if [[ $(echo "$GIT_COMMIT_DESC" | grep -c "Bump metro@") -eq 0 ]]; then
|
|
|
|
yarn install --non-interactive --cache-folder ~/.cache/yarn
|
|
|
|
fi
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/.cache/yarn
|
2022-05-12 21:08:29 +03:00
|
|
|
key: << parameters.yarn_base_cache_key >>-{{ arch }}-{{ checksum "yarn.lock" }}
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2020-02-13 09:18:46 +03:00
|
|
|
install_github_bot_deps:
|
|
|
|
steps:
|
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: "Yarn: Install dependencies (GitHub bots)"
|
2020-02-13 09:18:46 +03:00
|
|
|
command: cd bots && yarn install --non-interactive --cache-folder ~/.cache/yarn
|
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
brew_install:
|
|
|
|
parameters:
|
|
|
|
package:
|
|
|
|
description: Homebrew package to install
|
|
|
|
type: string
|
|
|
|
steps:
|
2020-07-10 17:13:17 +03:00
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: "Brew: Install << parameters.package >>"
|
2022-03-08 04:02:08 +03:00
|
|
|
command: brew install << parameters.package >> >/dev/null
|
2019-05-31 01:07:45 +03:00
|
|
|
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
with_rntester_pods_cache_span:
|
2019-06-29 05:12:42 +03:00
|
|
|
parameters:
|
|
|
|
steps:
|
|
|
|
type: steps
|
|
|
|
steps:
|
2019-07-25 21:42:49 +03:00
|
|
|
- run:
|
|
|
|
name: Setup CocoaPods cache
|
2020-08-20 03:54:30 +03:00
|
|
|
# Copy packages/rn-tester/Podfile.lock since it can be changed by pod install
|
|
|
|
command: cp packages/rn-tester/Podfile.lock packages/rn-tester/Podfile.lock.bak
|
2019-06-29 05:12:42 +03:00
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-04-02 10:02:11 +03:00
|
|
|
# The committed lockfile is generated using USE_FRAMEWORKS=0 and USE_HERMES=1 so it could load an outdated cache if a change
|
2020-12-04 11:23:38 +03:00
|
|
|
# only affects the frameworks or hermes config. To help prevent this also cache based on the content of Podfile.
|
2022-05-12 21:08:29 +03:00
|
|
|
- *pods_cache_key
|
2019-06-29 05:12:42 +03:00
|
|
|
- steps: << parameters.steps >>
|
|
|
|
- save_cache:
|
|
|
|
paths:
|
2020-08-20 03:54:30 +03:00
|
|
|
- packages/rn-tester/Pods
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *pods_cache_key
|
2019-06-29 05:12:42 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
download_gradle_dependencies:
|
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-05-12 21:08:29 +03:00
|
|
|
- *gradle_cache_key
|
2019-05-31 01:07:45 +03:00
|
|
|
- run:
|
|
|
|
name: Download Dependencies Using Gradle
|
2022-05-18 01:31:48 +03:00
|
|
|
command: ./gradlew downloadAll
|
2019-05-31 01:07:45 +03:00
|
|
|
- save_cache:
|
|
|
|
paths:
|
|
|
|
- ~/.gradle
|
|
|
|
- ReactAndroid/build/downloads
|
|
|
|
- ReactAndroid/build/third-party-ndk
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *gradle_cache_key
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
run_e2e:
|
|
|
|
parameters:
|
|
|
|
platform:
|
|
|
|
description: Target platform
|
|
|
|
type: enum
|
|
|
|
enum: ["android", "ios", "js"]
|
|
|
|
default: "js"
|
|
|
|
retries:
|
|
|
|
description: How many times the job should try to run these tests
|
|
|
|
type: integer
|
|
|
|
default: 3
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: "Run Tests: << parameters.platform >> End-to-End Tests"
|
|
|
|
command: node ./scripts/run-ci-e2e-tests.js --<< parameters.platform >> --retries << parameters.retries >>
|
|
|
|
|
|
|
|
report_bundle_size:
|
|
|
|
parameters:
|
|
|
|
platform:
|
|
|
|
description: Target platform
|
|
|
|
type: enum
|
|
|
|
enum: ["android", "ios"]
|
|
|
|
steps:
|
|
|
|
- install_github_bot_deps
|
|
|
|
- run:
|
|
|
|
name: Report size of RNTester.app (analysis-bot)
|
2021-11-03 22:09:13 +03:00
|
|
|
command: GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" scripts/circleci/report-bundle-size.sh << parameters.platform >> || true
|
2020-04-01 03:36:31 +03:00
|
|
|
|
2022-07-20 19:12:47 +03:00
|
|
|
with_hermes_tarball_cache_span:
|
2022-05-13 22:51:09 +03:00
|
|
|
parameters:
|
|
|
|
steps:
|
|
|
|
type: steps
|
2022-07-20 19:12:47 +03:00
|
|
|
set_tarball_path:
|
|
|
|
type: boolean
|
2022-08-23 16:43:01 +03:00
|
|
|
default: False
|
2022-05-13 22:51:09 +03:00
|
|
|
steps:
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-07-20 19:12:47 +03:00
|
|
|
- *hermes_tarball_cache_key
|
|
|
|
- when:
|
|
|
|
condition: << parameters.set_tarball_path >>
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Set HERMES_TARBALL_PATH if present
|
|
|
|
command: |
|
|
|
|
BASE_PATH=/tmp/hermes/hermes-runtime-darwin/
|
|
|
|
if [ ! -d $BASE_PATH ]; then
|
|
|
|
echo "Hermes tarball base path not present ($BASE_PATH). Build it from source."
|
Reduce flakiness of CI (#34235)
Summary:
How the Hermes cache worked had a concurrency issue. It used to work by asking the Hermes repository for the latest commit and using that commit as cache key to try and retrieve a built version of Hermes to avoid to compile it more than once.
The problem happened when the `build_hermes_macos` was building Hermes using a commit A.
While building, another PR could be merged into `hermes:main`, creating commit B.
When this happened, the tasks `test_ios` and `test_ios_rntester`would try to retrieve a cached version of Hermes using commit B. That version did not exist because Hermes was created using commit A, and the job would either fail or trying to build Hermes from source, ending up taking a lot of time.
This PR attaches the `.hermes-cache-key-file` to the workspace and restores it in the other jobs, making sure that the same cache key is used in all three jobs.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Changed] - Attach the `.hermes-cache-key-file` to the workspace to avoid race conditions for new PR landing on Hermes and changing the head commit between the time Hermes is built and the time it has to be consumed.
Pull Request resolved: https://github.com/facebook/react-native/pull/34235
Test Plan:
Tested manually, looking at the messages in CI.
**build_hermes_macos**
<img width="881" alt="Screenshot 2022-07-21 at 15 40 02" src="https://user-images.githubusercontent.com/11162307/180241834-776f2291-63bb-4bb2-8837-14434b50fe61.png">
**test_ios_rntester**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="956" alt="Screenshot 2022-07-21 at 15 40 52" src="https://user-images.githubusercontent.com/11162307/180242004-d9db0336-18d3-4321-a997-b538baa6beee.png">
**test_ios**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="900" alt="Screenshot 2022-07-21 at 15 46 33" src="https://user-images.githubusercontent.com/11162307/180243359-79de5c7a-d2f0-4331-90c6-5bd2c0b5e1ac.png">
Reviewed By: cortinico
Differential Revision: D38037386
Pulled By: cipolleschi
fbshipit-source-id: 4db4f7c478e1afb2e4a18ba3d3f70896ed41d235
2022-07-22 15:56:02 +03:00
|
|
|
exit 0
|
2022-07-20 19:12:47 +03:00
|
|
|
fi
|
|
|
|
TARBALL=$(ls /tmp/hermes/hermes-runtime-darwin/)
|
|
|
|
TARBALL_PATH=$BASE_PATH$TARBALL
|
|
|
|
if [ ! -f $TARBALL_PATH ]; then
|
|
|
|
echo "Hermes tarball not present ($TARBALL_PATH). Build it from source."
|
Reduce flakiness of CI (#34235)
Summary:
How the Hermes cache worked had a concurrency issue. It used to work by asking the Hermes repository for the latest commit and using that commit as cache key to try and retrieve a built version of Hermes to avoid to compile it more than once.
The problem happened when the `build_hermes_macos` was building Hermes using a commit A.
While building, another PR could be merged into `hermes:main`, creating commit B.
When this happened, the tasks `test_ios` and `test_ios_rntester`would try to retrieve a cached version of Hermes using commit B. That version did not exist because Hermes was created using commit A, and the job would either fail or trying to build Hermes from source, ending up taking a lot of time.
This PR attaches the `.hermes-cache-key-file` to the workspace and restores it in the other jobs, making sure that the same cache key is used in all three jobs.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[General] [Changed] - Attach the `.hermes-cache-key-file` to the workspace to avoid race conditions for new PR landing on Hermes and changing the head commit between the time Hermes is built and the time it has to be consumed.
Pull Request resolved: https://github.com/facebook/react-native/pull/34235
Test Plan:
Tested manually, looking at the messages in CI.
**build_hermes_macos**
<img width="881" alt="Screenshot 2022-07-21 at 15 40 02" src="https://user-images.githubusercontent.com/11162307/180241834-776f2291-63bb-4bb2-8837-14434b50fe61.png">
**test_ios_rntester**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="956" alt="Screenshot 2022-07-21 at 15 40 52" src="https://user-images.githubusercontent.com/11162307/180242004-d9db0336-18d3-4321-a997-b538baa6beee.png">
**test_ios**: notice that the `echo` is not executed, meaning that the `if` does not evaluate to true and, therefore, the file has been correctly attached.
<img width="900" alt="Screenshot 2022-07-21 at 15 46 33" src="https://user-images.githubusercontent.com/11162307/180243359-79de5c7a-d2f0-4331-90c6-5bd2c0b5e1ac.png">
Reviewed By: cortinico
Differential Revision: D38037386
Pulled By: cipolleschi
fbshipit-source-id: 4db4f7c478e1afb2e4a18ba3d3f70896ed41d235
2022-07-22 15:56:02 +03:00
|
|
|
exit 0
|
2022-07-20 19:12:47 +03:00
|
|
|
fi
|
|
|
|
|
|
|
|
echo "export HERMES_ENGINE_TARBALL_PATH=$TARBALL_PATH" >> $BASH_ENV
|
2022-05-13 22:51:09 +03:00
|
|
|
- steps: << parameters.steps >>
|
|
|
|
- save_cache:
|
2022-07-20 19:12:47 +03:00
|
|
|
key: *hermes_tarball_cache_key
|
2022-05-13 22:51:09 +03:00
|
|
|
paths:
|
2022-07-20 19:12:47 +03:00
|
|
|
- /tmp/hermes/hermes-runtime-darwin/
|
2022-05-13 22:51:09 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS
|
|
|
|
# -------------------------
|
2017-09-21 23:34:02 +03:00
|
|
|
jobs:
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Analyze PR
|
|
|
|
# -------------------------
|
|
|
|
# Analyze pull request and raise any lint/flow issues.
|
|
|
|
# Issues will be posted to the PR itself via GitHub bots.
|
|
|
|
# This workflow should only fail if the bots fail to run.
|
|
|
|
analyze_pr:
|
2020-12-07 14:10:46 +03:00
|
|
|
executor: reactnativeandroid
|
2019-02-24 04:01:34 +03:00
|
|
|
steps:
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- run_yarn
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-02-13 09:18:46 +03:00
|
|
|
- install_github_bot_deps
|
|
|
|
|
2021-02-12 22:30:53 +03:00
|
|
|
# Note: The yarn gpg key needs to be refreshed to work around https://github.com/yarnpkg/yarn/issues/7866
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
2020-02-13 09:18:46 +03:00
|
|
|
name: Install additional GitHub bot dependencies
|
2021-10-02 03:00:23 +03:00
|
|
|
# TEMP: Added workaround from https://github.com/nodesource/distributions/issues/1266#issuecomment-932583579
|
2021-02-12 22:30:53 +03:00
|
|
|
command: |
|
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
apt update && apt install -y shellcheck jq
|
2021-12-09 09:13:33 +03:00
|
|
|
apt-get -y install openssl ca-certificates
|
2021-10-02 03:00:23 +03:00
|
|
|
update-ca-certificates
|
|
|
|
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
|
|
|
|
apt update && apt install -y shellcheck jq
|
2019-02-24 04:01:34 +03:00
|
|
|
|
|
|
|
- run:
|
2019-05-22 05:35:40 +03:00
|
|
|
name: Run linters against modified files (analysis-bot)
|
|
|
|
command: GITHUB_TOKEN="$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_A""$PUBLIC_ANALYSISBOT_GITHUB_TOKEN_B" yarn lint-ci
|
2019-02-24 04:01:34 +03:00
|
|
|
when: always
|
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# JOBS: Analyze Code
|
|
|
|
# -------------------------
|
2019-05-31 01:07:45 +03:00
|
|
|
analyze_code:
|
2020-12-07 14:10:46 +03:00
|
|
|
executor: reactnativeandroid
|
2018-02-09 01:57:36 +03:00
|
|
|
steps:
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
2018-02-09 01:57:36 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Lint code
|
2019-12-20 03:53:54 +03:00
|
|
|
command: scripts/circleci/exec_swallow_error.sh yarn lint --format junit -o ./reports/junit/eslint/results.xml
|
2019-04-12 19:50:13 +03:00
|
|
|
when: always
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-12-07 14:10:46 +03:00
|
|
|
- run:
|
|
|
|
name: Lint Java
|
|
|
|
command: scripts/circleci/exec_swallow_error.sh yarn lint-java --check
|
|
|
|
when: always
|
|
|
|
|
2019-04-10 02:03:21 +03:00
|
|
|
- run:
|
2019-02-24 04:01:34 +03:00
|
|
|
name: Check for errors in code using Flow (iOS)
|
|
|
|
command: yarn flow-check-ios
|
|
|
|
when: always
|
|
|
|
|
2019-04-10 02:03:21 +03:00
|
|
|
- run:
|
2019-02-24 04:01:34 +03:00
|
|
|
name: Check for errors in code using Flow (Android)
|
|
|
|
command: yarn flow-check-android
|
|
|
|
when: always
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Sanity checks
|
|
|
|
command: |
|
|
|
|
./scripts/circleci/check_license.sh
|
|
|
|
./scripts/circleci/validate_yarn_lockfile.sh
|
|
|
|
when: always
|
2017-09-21 23:34:02 +03:00
|
|
|
|
2019-04-12 19:50:13 +03:00
|
|
|
- run:
|
|
|
|
name: Check formatting
|
|
|
|
command: yarn run format-check
|
|
|
|
when: always
|
|
|
|
|
2018-02-01 04:08:06 +03:00
|
|
|
- store_test_results:
|
2019-12-20 03:53:54 +03:00
|
|
|
path: ./reports/junit
|
2018-02-01 04:08:06 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test JavaScript
|
|
|
|
# -------------------------
|
2019-05-31 01:07:45 +03:00
|
|
|
test_js:
|
|
|
|
parameters:
|
|
|
|
executor:
|
|
|
|
type: executor
|
2020-02-14 10:11:41 +03:00
|
|
|
default: nodelts
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
run_disabled_tests:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: << parameters.executor >>
|
2017-09-21 23:34:02 +03:00
|
|
|
steps:
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- run:
|
|
|
|
name: Install rsync
|
2022-04-11 19:39:10 +03:00
|
|
|
command: sudo apt update && sudo apt install rsync
|
2019-02-24 04:01:34 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# -------------------------
|
|
|
|
# Run JavaScript tests
|
2019-04-12 19:50:13 +03:00
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: "Run Tests: JavaScript Tests"
|
2019-04-12 19:50:13 +03:00
|
|
|
command: node ./scripts/run-ci-javascript-tests.js --maxWorkers 2
|
2020-04-01 03:36:31 +03:00
|
|
|
- run_e2e:
|
|
|
|
platform: js
|
2019-02-24 04:01:34 +03:00
|
|
|
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
# Optionally, run disabled tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
2020-04-01 03:36:31 +03:00
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
|
|
|
# -------------------------
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
|
2018-08-21 03:31:59 +03:00
|
|
|
- store_test_results:
|
2019-12-20 03:53:54 +03:00
|
|
|
path: ./reports/junit
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
|
2022-09-07 12:57:28 +03:00
|
|
|
# -----------------------
|
|
|
|
# JOBS: Codegen Tests
|
|
|
|
# -----------------------
|
|
|
|
test_codegen:
|
|
|
|
parameters:
|
|
|
|
executor:
|
|
|
|
type: executor
|
|
|
|
default: nodelts
|
|
|
|
executor: << parameters.executor >>
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- setup_artifacts
|
|
|
|
- run:
|
|
|
|
name: Install Yarn in codegen
|
|
|
|
command: yarn install
|
|
|
|
working_directory: packages/react-native-codegen
|
|
|
|
- run:
|
|
|
|
name: Run Tests
|
|
|
|
command: yarn jest
|
|
|
|
working_directory: packages/react-native-codegen
|
|
|
|
|
2022-04-02 10:02:11 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: iOS Unit Tests
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
2022-04-28 18:53:24 +03:00
|
|
|
test_ios:
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: reactnativeios
|
2019-07-25 21:42:49 +03:00
|
|
|
parameters:
|
|
|
|
use_frameworks:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2020-04-01 03:36:31 +03:00
|
|
|
run_unit_tests:
|
|
|
|
description: Specifies whether unit tests should run.
|
|
|
|
type: boolean
|
|
|
|
default: false
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
run_disabled_tests:
|
2020-04-01 03:36:31 +03:00
|
|
|
description: Specifies whether disabled tests should run. Set this to true to debug failing tests.
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
type: boolean
|
|
|
|
default: false
|
2019-04-24 19:26:56 +03:00
|
|
|
environment:
|
2019-12-20 03:53:54 +03:00
|
|
|
- REPORTS_DIR: "./reports/junit"
|
2017-10-14 02:11:53 +03:00
|
|
|
steps:
|
2022-05-18 17:43:51 +03:00
|
|
|
- checkout_code_with_cache
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
2021-10-02 07:21:03 +03:00
|
|
|
- setup_ruby
|
2022-05-03 17:11:54 +03:00
|
|
|
- run:
|
|
|
|
name: Run Ruby Tests
|
|
|
|
command: |
|
2022-05-11 20:00:28 +03:00
|
|
|
cd scripts
|
|
|
|
sh run_ruby_tests.sh
|
2019-05-31 01:07:45 +03:00
|
|
|
- run_yarn
|
2022-08-03 13:34:29 +03:00
|
|
|
- *attach_hermes_workspace
|
2019-06-29 05:12:42 +03:00
|
|
|
- run: |
|
2020-08-20 03:54:30 +03:00
|
|
|
cd packages/rn-tester
|
2019-06-29 05:12:42 +03:00
|
|
|
bundle check || bundle install
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
2019-06-29 05:12:42 +03:00
|
|
|
name: Boot iPhone Simulator
|
|
|
|
command: source scripts/.tests.env && xcrun simctl boot "$IOS_DEVICE" || true
|
2019-04-24 19:26:56 +03:00
|
|
|
|
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: Configure Environment Variables
|
2019-06-29 05:12:42 +03:00
|
|
|
command: |
|
2022-01-28 16:05:20 +03:00
|
|
|
echo 'export PATH=/usr/local/opt/node@16/bin:$PATH' >> $BASH_ENV
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
source $BASH_ENV
|
2019-04-24 19:26:56 +03:00
|
|
|
|
2022-05-13 20:51:41 +03:00
|
|
|
- run:
|
|
|
|
name: "Brew: Tap wix/brew"
|
|
|
|
command: brew tap wix/brew >/dev/null
|
|
|
|
- brew_install:
|
|
|
|
package: applesimutils watchman cmake
|
2019-06-01 02:42:18 +03:00
|
|
|
|
2019-07-11 21:54:38 +03:00
|
|
|
- run:
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
name: Configure Watchman
|
2021-10-01 06:23:45 +03:00
|
|
|
command: echo "{}" > .watchmanconfig
|
2019-07-11 21:54:38 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
- when:
|
|
|
|
condition: << parameters.use_frameworks >>
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Set USE_FRAMEWORKS=1
|
|
|
|
command: echo "export USE_FRAMEWORKS=1" >> $BASH_ENV
|
2019-05-04 00:34:57 +03:00
|
|
|
|
2022-04-02 10:02:11 +03:00
|
|
|
- run:
|
|
|
|
name: Set USE_HERMES=1
|
|
|
|
command: echo "export USE_HERMES=1" >> $BASH_ENV
|
2020-11-03 12:13:01 +03:00
|
|
|
|
2022-04-21 02:51:54 +03:00
|
|
|
- run:
|
|
|
|
name: Set BUILD_HERMES_SOURCE=1
|
|
|
|
command: echo "export BUILD_HERMES_SOURCE=1" >> $BASH_ENV
|
|
|
|
|
2020-07-10 17:13:17 +03:00
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: Setup the CocoaPods environment
|
2021-10-02 07:21:03 +03:00
|
|
|
command: bundle exec pod setup
|
2020-04-01 03:36:31 +03:00
|
|
|
|
2022-07-20 19:12:47 +03:00
|
|
|
- with_hermes_tarball_cache_span:
|
2022-08-23 16:43:01 +03:00
|
|
|
set_tarball_path: True
|
2020-04-01 03:36:31 +03:00
|
|
|
steps:
|
2022-05-13 22:51:09 +03:00
|
|
|
- with_rntester_pods_cache_span:
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Generate RNTesterPods Workspace
|
|
|
|
command: cd packages/rn-tester && bundle exec pod install --verbose
|
2020-02-13 09:18:46 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# -------------------------
|
|
|
|
# Runs iOS unit tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_unit_tests >>
|
|
|
|
steps:
|
2020-07-10 17:13:17 +03:00
|
|
|
- run:
|
2020-04-01 03:36:31 +03:00
|
|
|
name: "Run Tests: iOS Unit and Integration Tests"
|
|
|
|
command: yarn test-ios
|
2022-08-03 13:34:29 +03:00
|
|
|
- run:
|
|
|
|
name: Zip Derived data folder
|
|
|
|
when: always
|
|
|
|
command: |
|
|
|
|
echo "zipping tests results"
|
|
|
|
cd /Users/distiller/Library/Developer/Xcode
|
|
|
|
XCRESULT_PATH=$(find . -name '*.xcresult')
|
|
|
|
tar -zcvf xcresults.tar.gz $XCRESULT_PATH
|
|
|
|
- store_artifacts:
|
|
|
|
path: /Users/distiller/Library/Developer/Xcode/xcresults.tar.gz
|
2017-10-14 02:11:53 +03:00
|
|
|
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
# Optionally, run disabled tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
2020-04-01 03:36:31 +03:00
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- run:
|
|
|
|
name: "Run Tests: CocoaPods"
|
|
|
|
command: ./scripts/process-podspecs.sh
|
|
|
|
- run:
|
|
|
|
name: Free up port 8081 for iOS End-to-End Tests
|
|
|
|
command: |
|
|
|
|
# free up port 8081 for the packager before running tests
|
|
|
|
set +eo pipefail
|
|
|
|
lsof -i tcp:8081 | awk 'NR!=1 {print $2}' | xargs kill
|
|
|
|
set -eo pipefail
|
2020-04-01 03:36:31 +03:00
|
|
|
- run_e2e:
|
|
|
|
platform: ios
|
|
|
|
# -------------------------
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# Collect Results
|
|
|
|
- report_bundle_size:
|
|
|
|
platform: ios
|
2019-05-31 01:07:45 +03:00
|
|
|
- store_test_results:
|
2019-12-20 03:53:54 +03:00
|
|
|
path: ./reports/junit
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2022-08-11 12:46:00 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test Buck
|
|
|
|
# -------------------------
|
|
|
|
test_buck:
|
|
|
|
executor: reactnativeandroid
|
|
|
|
environment:
|
|
|
|
KOTLIN_HOME=third-party/kotlin
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Download Dependencies Using Buck
|
|
|
|
command: ./scripts/circleci/buck_fetch.sh
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build & Test React Native using Buck
|
|
|
|
command: |
|
|
|
|
buck build ReactAndroid/src/main/java/com/facebook/react
|
|
|
|
buck build ReactAndroid/src/main/java/com/facebook/react/shell
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Validate Android Test Environment
|
|
|
|
command: ./scripts/validate-android-test-env.sh
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Run Tests - Android Unit Tests with Buck
|
|
|
|
command: buck test ReactAndroid/src/test/... --config build.threads=$BUILD_THREADS --xml ./reports/buck/all-results-raw.xml
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build JavaScript Bundle for instrumentation tests
|
|
|
|
command: node cli.js bundle --max-workers 2 --platform android --dev true --entry-file ReactAndroid/src/androidTest/js/TestBundle.js --bundle-output ReactAndroid/src/androidTest/assets/AndroidTestBundle.js
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build Tests - Android Instrumentation Tests with Buck
|
|
|
|
# Here, just build the instrumentation tests. There is a known issue with installing the APK to android-21+ emulator.
|
|
|
|
command: |
|
|
|
|
if [[ ! -e ReactAndroid/src/androidTest/assets/AndroidTestBundle.js ]]; then
|
|
|
|
echo "JavaScript bundle missing, cannot run instrumentation tests. Verify Build JavaScript Bundle step completed successfully."; exit 1;
|
|
|
|
fi
|
|
|
|
source scripts/android-setup.sh && NO_BUCKD=1 retry3 timeout 300 buck build ReactAndroid/src/androidTest/buck-runner:instrumentation-tests --config build.threads=$BUILD_THREADS
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Collect Test Results
|
|
|
|
command: |
|
|
|
|
find . -type f -regex ".*/build/test-results/debug/.*xml" -exec cp {} ./reports/build/ \;
|
|
|
|
find . -type f -regex ".*/outputs/androidTest-results/connected/.*xml" -exec cp {} ./reports/outputs/ \;
|
|
|
|
find . -type f -regex ".*/buck-out/gen/ReactAndroid/src/test/.*/.*xml" -exec cp {} ./reports/buck/ \;
|
|
|
|
if [ -f ~/react-native/reports/buck/all-results-raw.xml ]; then
|
|
|
|
~/react-native/scripts/circleci/buckToJunit/buckToJunit.sh ~/react-native/reports/buck/all-results-raw.xml ~/react-native/reports/junit/results.xml
|
|
|
|
fi
|
|
|
|
when: always
|
|
|
|
|
|
|
|
- store_test_results:
|
|
|
|
path: ./reports/junit
|
2022-08-03 13:34:29 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test Android
|
|
|
|
# -------------------------
|
2018-02-09 01:57:36 +03:00
|
|
|
test_android:
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: reactnativeandroid
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
parameters:
|
|
|
|
run_disabled_tests:
|
|
|
|
type: boolean
|
2020-07-10 17:13:17 +03:00
|
|
|
default: false
|
2017-09-21 23:34:02 +03:00
|
|
|
steps:
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
2018-02-01 01:48:51 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Validate Android SDK Install
|
|
|
|
command: ./scripts/validate-android-sdk.sh
|
2018-03-10 04:06:51 +03:00
|
|
|
|
2018-05-08 00:24:32 +03:00
|
|
|
# Starting emulator in advance as it takes some time to boot.
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Create Android Virtual Device
|
2019-04-10 02:03:21 +03:00
|
|
|
command: source scripts/android-setup.sh && createAVD
|
|
|
|
- run:
|
2019-02-24 04:01:34 +03:00
|
|
|
name: Launch Android Virtual Device in Background
|
|
|
|
command: source scripts/android-setup.sh && launchAVD
|
|
|
|
background: true
|
2018-02-09 01:57:36 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
- download_gradle_dependencies
|
2017-12-22 22:07:48 +03:00
|
|
|
|
2022-05-16 19:27:54 +03:00
|
|
|
- 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
|
|
|
|
|
2017-12-22 22:07:48 +03:00
|
|
|
# Wait for AVD to finish booting before running tests
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
|
|
|
name: Wait for Android Virtual Device
|
2019-04-10 02:03:21 +03:00
|
|
|
command: source scripts/android-setup.sh && waitForAVD
|
2018-03-10 04:06:51 +03:00
|
|
|
|
2022-08-11 12:46:00 +03:00
|
|
|
- report_bundle_size:
|
|
|
|
platform: android
|
2019-04-10 02:03:21 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# Optionally, run disabled tests
|
✅ Green CI: Fix JavaScript e2e tests, disable failing Android e2e test (#28392)
Summary:
Jobs now have a `run_disabled_tests` argument that allows for the selective execution of disabled tests. When working on re-enabling a failing test, the contributor just needs to set `run_disabled_tests` to `true` in the appropriate workflow in `.circleci/config.yml`.
Tests can be kept green by moving failing tests into the disabled section until a contributor can provide a fix, thus ensuring signal is maintained on master. For example, a failing end-to-end test might be disabled in order to allow the signal from unit tests to be provided, as opposed to flat out failing the entire job.
What was done in this PR:
* The failing `test_js_e2e` job has been fixed, and merged into the `test_js` job. An empty disabled tests section is added for future use.
* The failing `test_ios_e2e` job has been merged into `test_ios`, with all of its steps gated behind the `run_disabled_steps` argument.
* The failing Android end-to-end tests have been added to `test_android`, gated behind the `run_disabled_steps` argument
* The failing Podspecs test has been added back into `test_ios`, gated behind the `run_disabled_steps` argument
## Changelog
[Internal] [CI] - ✅ Green CI, disabled test infrastructure work
Pull Request resolved: https://github.com/facebook/react-native/pull/28392
Test Plan: Verified on Circle CI
Reviewed By: cpojer
Differential Revision: D20665512
Pulled By: hramos
fbshipit-source-id: 831738027f90f4b23313893d8342d7e654f34726
2020-03-26 16:49:03 +03:00
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
2020-04-01 03:36:31 +03:00
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
|
|
|
- run_e2e:
|
|
|
|
platform: android
|
2019-04-10 02:03:21 +03:00
|
|
|
|
2021-09-24 11:02:07 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test Android Template
|
|
|
|
# -------------------------
|
|
|
|
test_android_template:
|
|
|
|
executor: reactnativeandroid
|
2022-08-08 14:44:48 +03:00
|
|
|
parameters:
|
|
|
|
flavor:
|
|
|
|
type: string
|
|
|
|
default: "Debug"
|
|
|
|
newarchitecture:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
environment:
|
|
|
|
- PROJECT_NAME: "AndroidTemplateProject"
|
2021-09-24 11:02:07 +03:00
|
|
|
steps:
|
2022-08-08 14:44:48 +03:00
|
|
|
- checkout_code_with_cache
|
2021-09-24 11:02:07 +03:00
|
|
|
- run_yarn
|
2022-02-09 19:23:43 +03:00
|
|
|
- attach_workspace:
|
|
|
|
at: .
|
2021-09-24 11:02:07 +03:00
|
|
|
|
|
|
|
- run:
|
2022-02-09 19:23:43 +03:00
|
|
|
name: Create Android template project
|
2021-09-24 11:02:07 +03:00
|
|
|
command: |
|
2022-02-09 19:23:43 +03:00
|
|
|
REPO_ROOT=$(pwd)
|
2022-08-08 14:44:48 +03:00
|
|
|
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
|
2021-09-24 11:02:07 +03:00
|
|
|
|
|
|
|
- run:
|
2022-08-08 14:44:48 +03:00
|
|
|
name: Build the template application for << parameters.flavor >> with New Architecture set << parameters.newarchitecture >>
|
|
|
|
command: cd /tmp/$PROJECT_NAME/android/ && ./gradlew assemble<< parameters.flavor >> -PnewArchEnabled=<< parameters.newarchitecture >>
|
2021-09-24 11:02:07 +03:00
|
|
|
|
2021-10-29 01:46:53 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test iOS Template
|
|
|
|
# -------------------------
|
|
|
|
test_ios_template:
|
|
|
|
executor: reactnativeios
|
2022-08-31 18:54:06 +03:00
|
|
|
parameters:
|
|
|
|
flavor:
|
|
|
|
type: string
|
|
|
|
default: "Debug"
|
|
|
|
architecture:
|
|
|
|
type: string
|
|
|
|
default: "OldArch"
|
|
|
|
jsengine:
|
|
|
|
type: string
|
|
|
|
default: "Hermes"
|
2022-09-06 13:25:45 +03:00
|
|
|
flipper:
|
|
|
|
type: string
|
|
|
|
default: "WithFlipper"
|
2021-10-29 01:46:53 +03:00
|
|
|
environment:
|
|
|
|
- PROJECT_NAME: "iOSTemplateProject"
|
2022-06-09 21:18:30 +03:00
|
|
|
- HERMES_WS_DIR: *hermes_workspace_root
|
2021-10-29 01:46:53 +03:00
|
|
|
steps:
|
2022-09-06 13:25:45 +03:00
|
|
|
# Early exit in case of Release and WithFlipper. The two does not make sense together.
|
|
|
|
# Unfortunately, the `exclude` parameter of `matrix` does not work, so we have to do it manually.
|
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
and:
|
|
|
|
- equal: [ << parameters.flavor >>, "Release"]
|
|
|
|
- equal: [ << parameters.flipper >>, "WithFlipper" ]
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
command: circleci-agent step halt # this interrupts the job successfully.
|
|
|
|
# Valid configuration, we can continue
|
2022-05-18 17:43:51 +03:00
|
|
|
- checkout_code_with_cache
|
2021-10-29 01:46:53 +03:00
|
|
|
- run_yarn
|
|
|
|
- attach_workspace:
|
|
|
|
at: .
|
2022-06-09 21:18:30 +03:00
|
|
|
- *attach_hermes_workspace
|
2022-08-31 18:54:06 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
equal: ["Hermes", << parameters.jsengine >>]
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Set HERMES_ENGINE_TARBALL_PATH
|
|
|
|
command: |
|
|
|
|
echo "export HERMES_ENGINE_TARBALL_PATH=$(ls -AU $HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-*.tar.gz | head -1)" >> $BASH_ENV
|
2021-10-29 01:46:53 +03:00
|
|
|
- run:
|
|
|
|
name: Create iOS template project
|
|
|
|
command: |
|
|
|
|
REPO_ROOT=$(pwd)
|
|
|
|
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"
|
2022-08-31 18:54:06 +03:00
|
|
|
node cli.js init $PROJECT_NAME --directory "/tmp/$PROJECT_NAME" --template $REPO_ROOT --verbose --skip-install
|
|
|
|
- run:
|
2022-09-06 13:25:45 +03:00
|
|
|
name: Install iOS dependencies - Configuration << parameters.flavor >>; New Architecture << parameters.architecture >>; JS Engine << parameters.jsengine>>; Flipper << parameters.flipper >>
|
2022-08-31 18:54:06 +03:00
|
|
|
command: |
|
|
|
|
cd /tmp/$PROJECT_NAME
|
|
|
|
yarn install
|
|
|
|
cd ios
|
|
|
|
|
|
|
|
bundle install
|
|
|
|
|
|
|
|
if [[ << parameters.flavor >> == "Release" ]]; then
|
|
|
|
export PRODUCTION=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ << parameters.architecture >> == "NewArch" ]]; then
|
|
|
|
export RCT_NEW_ARCH_ENABLED=1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ << parameters.jsengine >> == "JSC" ]]; then
|
|
|
|
export USE_HERMES=0
|
|
|
|
fi
|
|
|
|
|
2022-09-06 13:25:45 +03:00
|
|
|
if [[ << parameters.flipper >> == "WithoutFlipper" ]]; then
|
|
|
|
export NO_FLIPPER=1
|
|
|
|
fi
|
|
|
|
|
2022-08-31 18:54:06 +03:00
|
|
|
bundle exec pod install
|
2021-10-29 01:46:53 +03:00
|
|
|
- run:
|
|
|
|
name: Build template project
|
|
|
|
command: |
|
|
|
|
xcodebuild build \
|
2022-08-31 18:54:06 +03:00
|
|
|
-configuration << parameters.flavor >> \
|
2022-08-08 14:44:48 +03:00
|
|
|
-workspace /tmp/$PROJECT_NAME/ios/$PROJECT_NAME.xcworkspace \
|
2021-10-29 01:46:53 +03:00
|
|
|
-scheme $PROJECT_NAME \
|
|
|
|
-sdk iphonesimulator
|
|
|
|
|
2022-02-03 22:08:56 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Test iOS RNTester
|
|
|
|
# -------------------------
|
|
|
|
test_ios_rntester:
|
|
|
|
executor: reactnativeios
|
|
|
|
steps:
|
2022-05-18 17:43:51 +03:00
|
|
|
- checkout_code_with_cache
|
2022-02-03 22:08:56 +03:00
|
|
|
- run_yarn
|
2022-08-03 13:34:29 +03:00
|
|
|
- *attach_hermes_workspace
|
2022-02-03 22:08:56 +03:00
|
|
|
|
2022-05-13 17:15:15 +03:00
|
|
|
# The macOS machine can run out of storage if Hermes is enabled and built from source.
|
|
|
|
# Since this job does not use the iOS Simulator, deleting it provides a quick way to
|
|
|
|
# free up space.
|
|
|
|
- run:
|
|
|
|
name: Delete iOS Simulators
|
|
|
|
background: true
|
|
|
|
command: sudo rm -rf /Library/Developer/CoreSimulator/Profiles/Runtimes/
|
|
|
|
|
2022-04-02 10:02:11 +03:00
|
|
|
- run:
|
|
|
|
name: Set USE_HERMES=1
|
|
|
|
command: echo "export USE_HERMES=1" >> $BASH_ENV
|
|
|
|
|
2022-04-07 17:20:15 +03:00
|
|
|
- run:
|
|
|
|
name: Set BUILD_HERMES_SOURCE=1
|
|
|
|
command: echo "export BUILD_HERMES_SOURCE=1" >> $BASH_ENV
|
|
|
|
|
2022-05-13 20:51:41 +03:00
|
|
|
- brew_install:
|
|
|
|
package: cmake
|
2022-02-03 22:08:56 +03:00
|
|
|
|
2022-07-20 19:12:47 +03:00
|
|
|
- with_hermes_tarball_cache_span:
|
2022-08-23 16:43:01 +03:00
|
|
|
set_tarball_path: True
|
2022-05-13 22:51:09 +03:00
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Install CocoaPods dependencies
|
|
|
|
command: |
|
|
|
|
rm -rf packages/rn-tester/Pods
|
|
|
|
cd packages/rn-tester && bundle exec pod install
|
2022-02-03 22:08:56 +03:00
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Build RNTester
|
|
|
|
command: |
|
|
|
|
xcodebuild build \
|
|
|
|
-workspace packages/rn-tester/RNTesterPods.xcworkspace \
|
|
|
|
-scheme RNTester \
|
|
|
|
-sdk iphonesimulator
|
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Windows
|
|
|
|
# -------------------------
|
|
|
|
test_windows:
|
|
|
|
executor:
|
|
|
|
name: win/default
|
|
|
|
parameters:
|
|
|
|
run_disabled_tests:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
|
|
|
environment:
|
|
|
|
- ANDROID_HOME: "C:\\Android\\android-sdk"
|
2021-01-04 20:12:53 +03:00
|
|
|
- ANDROID_NDK: "C:\\Android\\android-sdk\\ndk\\20.1.5948944"
|
2021-11-24 23:23:45 +03:00
|
|
|
- ANDROID_BUILD_VERSION: 31
|
|
|
|
- ANDROID_TOOLS_VERSION: 31.0.0
|
2020-04-01 03:36:31 +03:00
|
|
|
- GRADLE_OPTS: -Dorg.gradle.daemon=false
|
|
|
|
steps:
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout_code_with_cache
|
2020-04-01 03:36:31 +03:00
|
|
|
|
2021-06-04 17:18:34 +03:00
|
|
|
- run:
|
|
|
|
name: Install Node
|
|
|
|
# Note: Version set separately for non-Windows builds, see above.
|
|
|
|
command: |
|
2022-01-28 16:05:20 +03:00
|
|
|
nvm install 16
|
|
|
|
nvm use 16
|
2021-06-04 17:18:34 +03:00
|
|
|
|
2020-04-01 03:36:31 +03:00
|
|
|
# Setup Dependencies
|
|
|
|
- run:
|
|
|
|
name: Install Yarn
|
|
|
|
command: choco install yarn
|
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Display Environment info
|
|
|
|
command: npx envinfo@latest
|
|
|
|
|
|
|
|
- restore_cache:
|
|
|
|
keys:
|
2022-05-12 21:08:29 +03:00
|
|
|
- *windows_yarn_cache_key
|
2020-04-01 03:36:31 +03:00
|
|
|
- run:
|
|
|
|
name: "Yarn: Install Dependencies"
|
|
|
|
command: yarn install --frozen-lockfile --non-interactive
|
|
|
|
- save_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *windows_yarn_cache_key
|
2020-04-01 03:36:31 +03:00
|
|
|
paths:
|
|
|
|
- C:\Users\circleci\AppData\Local\Yarn
|
|
|
|
|
2021-02-04 01:59:17 +03:00
|
|
|
# Try to install the SDK up to 3 times, since network flakiness can cause install failures
|
|
|
|
# Using a timeout of 9 mins, as circle ci will timeout if there is no output for 10 mins
|
2020-04-01 03:36:31 +03:00
|
|
|
- run:
|
|
|
|
name: Install Android SDK Tools
|
2021-02-04 01:59:17 +03:00
|
|
|
command: choco install android-sdk --timeout 540; if (!$?) { choco install android-sdk --timeout 540 --force --forcedependencies}; if (!$?) { choco install android-sdk --force --forcedependencies}
|
2020-04-01 03:36:31 +03:00
|
|
|
|
|
|
|
- run:
|
|
|
|
name: Setup Android SDKs
|
|
|
|
command: |
|
|
|
|
sdkmanager --licenses
|
2020-10-21 02:58:29 +03:00
|
|
|
sdkmanager "system-images;android-21;google_apis;armeabi-v7a"
|
2020-04-01 03:36:31 +03:00
|
|
|
sdkmanager "platforms;android-%ANDROID_BUILD_VERSION%"
|
|
|
|
sdkmanager "build-tools;%ANDROID_TOOLS_VERSION%"
|
|
|
|
sdkmanager "add-ons;addon-google_apis-google-23"
|
|
|
|
sdkmanager "extras;android;m2repository"
|
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# Run Tests
|
|
|
|
- run:
|
|
|
|
name: "Flow: Check Android"
|
|
|
|
command: yarn flow-check-android
|
|
|
|
- run:
|
|
|
|
name: "Flow: Check iOS"
|
|
|
|
command: yarn flow-check-ios
|
|
|
|
- run:
|
|
|
|
name: "Run Tests: JavaScript Tests"
|
|
|
|
command: yarn test
|
|
|
|
|
|
|
|
# Optionally, run disabled tests
|
|
|
|
- when:
|
|
|
|
condition: << parameters.run_disabled_tests >>
|
|
|
|
steps:
|
|
|
|
- run: echo "Failing tests may be moved here temporarily."
|
|
|
|
- run:
|
|
|
|
name: Android Build
|
2020-08-20 03:54:30 +03:00
|
|
|
command: ./gradlew.bat packages:rn-tester:android:app:assembleRelease
|
2020-04-01 03:36:31 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Coverage
|
|
|
|
# -------------------------
|
|
|
|
# Collect JavaScript test coverage
|
2018-12-01 06:45:56 +03:00
|
|
|
js_coverage:
|
2020-02-14 10:11:41 +03:00
|
|
|
executor: nodelts
|
2018-12-03 22:44:07 +03:00
|
|
|
environment:
|
|
|
|
- CI_BRANCH: $CIRCLE_BRANCH
|
|
|
|
- CI_PULL_REQUEST: $CIRCLE_PULL_REQUEST
|
|
|
|
- CI_BUILD_NUMBER: $CIRCLE_BUILD_NUM
|
|
|
|
- CI_BUILD_URL: $CIRCLE_BUILD_URL
|
2018-12-01 06:45:56 +03:00
|
|
|
steps:
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2019-05-31 01:07:45 +03:00
|
|
|
- setup_artifacts
|
|
|
|
- run_yarn
|
2019-02-24 04:01:34 +03:00
|
|
|
- run:
|
2019-12-12 23:17:29 +03:00
|
|
|
name: Collect test coverage information
|
2019-02-24 04:01:34 +03:00
|
|
|
command: |
|
2019-12-12 23:17:29 +03:00
|
|
|
scripts/circleci/exec_swallow_error.sh yarn test --coverage --maxWorkers=2
|
|
|
|
if [[ -e ./coverage/lcov.info ]]; then
|
|
|
|
cat ./coverage/lcov.info | scripts/circleci/exec_swallow_error.sh ./node_modules/.bin/coveralls
|
|
|
|
fi
|
2018-12-01 06:45:56 +03:00
|
|
|
- store_artifacts:
|
|
|
|
path: ~/react-native/coverage/
|
|
|
|
|
2022-03-08 04:02:08 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Build hermesc
|
|
|
|
# -------------------------
|
2022-04-02 10:02:11 +03:00
|
|
|
prepare_hermes_workspace:
|
2022-03-08 04:02:08 +03:00
|
|
|
docker:
|
2022-09-02 13:23:45 +03:00
|
|
|
- image: debian:11.4
|
2022-03-08 04:02:08 +03:00
|
|
|
environment:
|
|
|
|
- HERMES_WS_DIR: *hermes_workspace_root
|
2022-05-06 18:02:33 +03:00
|
|
|
- HERMES_VERSION_FILE: "sdks/.hermesversion"
|
2022-03-08 04:02:08 +03:00
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
2022-05-06 18:02:33 +03:00
|
|
|
apt update
|
2022-05-13 10:08:04 +03:00
|
|
|
apt install -y wget git curl
|
|
|
|
curl -sL https://deb.nodesource.com/setup_16.x | bash -
|
|
|
|
apt install -y nodejs
|
|
|
|
npm install --global yarn
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2022-05-13 10:08:04 +03:00
|
|
|
- run_yarn
|
2022-03-08 04:02:08 +03:00
|
|
|
- run:
|
2022-05-06 18:02:33 +03:00
|
|
|
name: Set up Hermes workspace and caching
|
|
|
|
command: |
|
|
|
|
mkdir -p "/tmp/hermes" "/tmp/hermes/download" "/tmp/hermes/hermes"
|
|
|
|
|
|
|
|
if [ -f "$HERMES_VERSION_FILE" ]; then
|
|
|
|
cat $HERMES_VERSION_FILE > /tmp/hermes/hermesversion
|
|
|
|
else
|
|
|
|
HERMES_TAG_SHA=$(git ls-remote https://github.com/facebook/hermes main | cut -f 1 | tr -d '[:space:]')
|
|
|
|
echo $HERMES_TAG_SHA > /tmp/hermes/hermesversion
|
|
|
|
fi
|
2022-08-03 13:34:29 +03:00
|
|
|
cat /tmp/hermes/hermesversion
|
2022-05-06 18:02:33 +03:00
|
|
|
- restore_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *hermes_cache_key
|
2022-03-23 23:18:52 +03:00
|
|
|
- run:
|
|
|
|
name: Download Hermes tarball
|
2022-03-08 04:02:08 +03:00
|
|
|
command: |
|
2022-07-20 18:53:38 +03:00
|
|
|
node scripts/hermes/prepare-hermes-for-build $CIRCLE_PULL_REQUEST
|
2022-05-13 10:08:04 +03:00
|
|
|
cp sdks/download/* $HERMES_WS_DIR/download/.
|
|
|
|
cp -r sdks/hermes/* $HERMES_WS_DIR/hermes/.
|
2022-08-03 13:34:29 +03:00
|
|
|
|
|
|
|
cat /tmp/hermes/hermesversion
|
2022-05-06 18:02:33 +03:00
|
|
|
- save_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *hermes_cache_key
|
2022-05-06 18:02:33 +03:00
|
|
|
paths:
|
|
|
|
- /tmp/hermes/download/
|
|
|
|
- /tmp/hermes/hermes/
|
2022-03-08 04:02:08 +03:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: *hermes_workspace_root
|
|
|
|
paths:
|
2022-03-23 23:18:52 +03:00
|
|
|
- download
|
2022-03-08 04:02:08 +03:00
|
|
|
- hermes
|
2022-03-23 23:18:52 +03:00
|
|
|
- hermesversion
|
2022-03-08 04:02:08 +03:00
|
|
|
|
2022-04-02 10:02:11 +03:00
|
|
|
build_hermesc_linux:
|
2022-03-08 04:02:08 +03:00
|
|
|
docker:
|
2022-04-27 21:48:25 +03:00
|
|
|
- image: debian:bullseye
|
|
|
|
resource_class: "xlarge"
|
|
|
|
working_directory: /root
|
2022-03-08 04:02:08 +03:00
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
2022-04-27 21:48:25 +03:00
|
|
|
apt update
|
|
|
|
apt install -y git openssh-client cmake build-essential \
|
|
|
|
libreadline-dev libicu-dev zip python3
|
|
|
|
- *attach_hermes_workspace
|
2022-05-06 18:02:33 +03:00
|
|
|
- restore_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *hermes_cache_key
|
2022-03-08 04:02:08 +03:00
|
|
|
- run:
|
|
|
|
name: Set up workspace
|
|
|
|
command: |
|
2022-04-27 21:48:25 +03:00
|
|
|
mkdir -p /tmp/hermes/linux64-bin
|
2022-03-08 04:02:08 +03:00
|
|
|
- run:
|
2022-04-27 21:48:25 +03:00
|
|
|
name: Build HermesC for Linux
|
2022-03-08 04:02:08 +03:00
|
|
|
command: |
|
2022-05-06 18:02:33 +03:00
|
|
|
if [ -f /tmp/hermes/linux64-bin/hermesc ]; then
|
|
|
|
echo 'Skipping; Clean "/tmp/hermes/linux64-bin" to rebuild.'
|
|
|
|
else
|
|
|
|
cd /tmp/hermes
|
|
|
|
cmake -S hermes -B build -DHERMES_STATIC_LINK=ON -DCMAKE_BUILD_TYPE=Release \
|
|
|
|
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DCMAKE_CXX_FLAGS=-s -DCMAKE_C_FLAGS=-s \
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS="-Wl,--whole-archive -lpthread -Wl,--no-whole-archive"
|
|
|
|
cmake --build build --target check-hermes -j 4
|
|
|
|
cp /tmp/hermes/build/bin/hermesc /tmp/hermes/linux64-bin/.
|
|
|
|
fi
|
|
|
|
- save_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *hermes_cache_key
|
2022-05-06 18:02:33 +03:00
|
|
|
paths:
|
|
|
|
- /tmp/hermes/linux64-bin/
|
|
|
|
- /tmp/hermes/hermes/destroot/
|
2022-04-27 21:48:25 +03:00
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/hermes/linux64-bin/
|
2022-03-23 23:18:52 +03:00
|
|
|
- persist_to_workspace:
|
2022-04-27 21:48:25 +03:00
|
|
|
root: /tmp/hermes/
|
2022-03-23 23:18:52 +03:00
|
|
|
paths:
|
2022-04-27 21:48:25 +03:00
|
|
|
- linux64-bin
|
2022-03-08 04:02:08 +03:00
|
|
|
|
2022-05-23 22:14:29 +03:00
|
|
|
build_hermes_macos:
|
2022-04-02 02:19:29 +03:00
|
|
|
executor: reactnativeios
|
2022-03-08 04:02:08 +03:00
|
|
|
environment:
|
|
|
|
- HERMES_WS_DIR: *hermes_workspace_root
|
|
|
|
steps:
|
2022-05-18 17:43:51 +03:00
|
|
|
- checkout_code_with_cache
|
2022-03-08 04:02:08 +03:00
|
|
|
- *attach_hermes_workspace
|
2022-05-06 18:02:33 +03:00
|
|
|
- restore_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *hermes_cache_key
|
2022-04-27 21:48:25 +03:00
|
|
|
- run:
|
|
|
|
name: Set up workspace
|
|
|
|
command: |
|
|
|
|
mkdir -p /tmp/hermes/osx-bin
|
2022-05-23 22:14:29 +03:00
|
|
|
mkdir -p ~/react-native/sdks/hermes
|
|
|
|
cp -r $HERMES_WS_DIR/hermes/* ~/react-native/sdks/hermes/.
|
2022-03-08 04:02:08 +03:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: |
|
2022-05-12 01:49:48 +03:00
|
|
|
brew install cmake
|
2022-07-20 19:12:47 +03:00
|
|
|
- with_hermes_tarball_cache_span:
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Build the Hermes iOS frameworks
|
|
|
|
command: |
|
|
|
|
cd ~/react-native/sdks/hermes
|
|
|
|
./utils/build-ios-framework.sh
|
|
|
|
- run:
|
|
|
|
name: Build the Hermes Mac frameworks
|
|
|
|
command: |
|
|
|
|
cd ~/react-native/sdks/hermes
|
|
|
|
./utils/build-mac-framework.sh
|
|
|
|
cp build_macosx/bin/hermesc /tmp/hermes/osx-bin/.
|
|
|
|
- run:
|
|
|
|
name: Package the Hermes Apple frameworks
|
|
|
|
command: |
|
|
|
|
cd ~/react-native/sdks/hermes
|
|
|
|
. ./utils/build-apple-framework.sh
|
|
|
|
|
|
|
|
mkdir -p /tmp/cocoapods-package-root/destroot
|
|
|
|
mkdir -p /tmp/hermes/output
|
|
|
|
cp -R ./destroot /tmp/cocoapods-package-root
|
|
|
|
cp LICENSE /tmp/cocoapods-package-root
|
|
|
|
|
|
|
|
tar -C /tmp/cocoapods-package-root/ -czvf /tmp/hermes/output/hermes-runtime-darwin-v$(get_release_version).tar.gz .
|
|
|
|
|
|
|
|
mkdir -p /tmp/hermes/hermes-runtime-darwin
|
|
|
|
cp /tmp/hermes/output/hermes-runtime-darwin-v$(get_release_version).tar.gz /tmp/hermes/hermes-runtime-darwin/.
|
|
|
|
- save_cache:
|
|
|
|
key: *hermes_cache_key
|
|
|
|
paths:
|
|
|
|
- ~/react-native/sdks/hermes/build_host_hermesc
|
|
|
|
- ~/react-native/sdks/hermes/build_iphoneos
|
|
|
|
- ~/react-native/sdks/hermes/build_catalyst
|
|
|
|
- ~/react-native/sdks/hermes/build_iphonesimulator
|
|
|
|
- ~/react-native/sdks/hermes/build_macosx
|
|
|
|
- ~/react-native/sdks/hermes/destroot
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/hermes/hermes-runtime-darwin/
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/hermes/osx-bin/
|
|
|
|
- persist_to_workspace:
|
|
|
|
root: /tmp/hermes/
|
|
|
|
paths:
|
|
|
|
- hermes-runtime-darwin
|
|
|
|
- osx-bin
|
2022-03-08 04:02:08 +03:00
|
|
|
|
2022-04-02 10:02:11 +03:00
|
|
|
build_hermesc_windows:
|
2022-03-08 04:02:08 +03:00
|
|
|
executor:
|
|
|
|
name: win/default
|
|
|
|
shell: powershell.exe
|
|
|
|
environment:
|
|
|
|
- HERMES_WS_DIR: 'C:\tmp\hermes'
|
|
|
|
- ICU_URL: "https://github.com/unicode-org/icu/releases/download/release-64-2/icu4c-64_2-Win64-MSVC2017.zip"
|
|
|
|
- MSBUILD_DIR: 'C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin'
|
|
|
|
- CMAKE_DIR: 'C:\Program Files\CMake\bin'
|
|
|
|
steps:
|
|
|
|
- *attach_hermes_workspace
|
2022-05-06 18:02:33 +03:00
|
|
|
- restore_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *hermes_windows_cache_key
|
2022-03-08 04:02:08 +03:00
|
|
|
- run:
|
|
|
|
name: Set up workspace
|
|
|
|
command: |
|
|
|
|
New-Item -ItemType Directory $Env:HERMES_WS_DIR
|
|
|
|
New-Item -ItemType Directory $Env:HERMES_WS_DIR\icu
|
|
|
|
New-Item -ItemType Directory $Env:HERMES_WS_DIR\deps
|
2022-04-27 21:48:25 +03:00
|
|
|
New-Item -ItemType Directory $Env:HERMES_WS_DIR\win64-bin
|
2022-03-08 04:02:08 +03:00
|
|
|
New-Item -ItemType SymbolicLink -Target tmp\hermes\hermes -Path $Env:HERMES_WS_DIR -Name hermes
|
|
|
|
- run:
|
2022-04-27 21:48:25 +03:00
|
|
|
name: Build HermesC for Windows
|
2022-03-08 04:02:08 +03:00
|
|
|
command: |
|
2022-05-06 18:02:33 +03:00
|
|
|
if (-not(Test-Path -Path $Env:HERMES_WS_DIR\win64-bin\hermesc.exe)) {
|
|
|
|
choco install --no-progress cmake --version 3.14.7
|
|
|
|
if (-not $?) { throw "Failed to install CMake" }
|
|
|
|
choco install --no-progress python3
|
|
|
|
if (-not $?) { throw "Failed to install Python" }
|
|
|
|
|
|
|
|
cd $Env:HERMES_WS_DIR\icu
|
|
|
|
# If Invoke-WebRequest shows a progress bar, it will fail with
|
|
|
|
# Win32 internal error "Access is denied" 0x5 occurred [...]
|
|
|
|
$progressPreference = 'silentlyContinue'
|
|
|
|
Invoke-WebRequest -Uri "$Env:ICU_URL" -OutFile "icu.zip"
|
|
|
|
Expand-Archive -Path "icu.zip" -DestinationPath "."
|
|
|
|
|
|
|
|
cd $Env:HERMES_WS_DIR
|
|
|
|
Copy-Item -Path "icu\bin64\icu*.dll" -Destination "deps"
|
|
|
|
# Include MSVC++ 2015 redistributables
|
|
|
|
Copy-Item -Path "c:\windows\system32\msvcp140.dll" -Destination "deps"
|
|
|
|
Copy-Item -Path "c:\windows\system32\vcruntime140.dll" -Destination "deps"
|
|
|
|
Copy-Item -Path "c:\windows\system32\vcruntime140_1.dll" -Destination "deps"
|
|
|
|
|
|
|
|
$Env:PATH += ";$Env:CMAKE_DIR;$Env:MSBUILD_DIR"
|
|
|
|
$Env:ICU_ROOT = "$Env:HERMES_WS_DIR\icu"
|
|
|
|
|
|
|
|
cmake -S hermes -B build_release -G 'Visual Studio 16 2019' -Ax64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INTERPROCEDURAL_OPTIMIZATION=True -DHERMES_ENABLE_WIN10_ICU_FALLBACK=OFF
|
|
|
|
if (-not $?) { throw "Failed to configure Hermes" }
|
|
|
|
cd build_release
|
|
|
|
cmake --build . --target hermesc --config Release
|
|
|
|
if (-not $?) { throw "Failed to build Hermes" }
|
|
|
|
|
|
|
|
cd $Env:HERMES_WS_DIR
|
|
|
|
Copy-Item -Path "build_release\bin\Release\hermesc.exe" -Destination "win64-bin"
|
|
|
|
# Include Windows runtime dependencies
|
|
|
|
Copy-Item -Path "deps\*" -Destination "win64-bin"
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
Write-Host "Skipping; Clean c:\tmp\hermes\win64-bin to rebuild."
|
|
|
|
}
|
|
|
|
- save_cache:
|
2022-05-12 21:08:29 +03:00
|
|
|
key: *hermes_windows_cache_key
|
2022-05-06 18:02:33 +03:00
|
|
|
paths:
|
|
|
|
- C:\tmp\hermes\win64-bin\
|
|
|
|
- C:\tmp\hermes\hermes\icu\
|
|
|
|
- C:\tmp\hermes\hermes\deps\
|
|
|
|
- C:\tmp\hermes\hermes\build_release\
|
2022-04-27 21:48:25 +03:00
|
|
|
- store_artifacts:
|
2022-05-06 18:02:33 +03:00
|
|
|
path: C:\tmp\hermes\win64-bin\
|
2022-03-08 04:02:08 +03:00
|
|
|
- persist_to_workspace:
|
2022-05-06 18:02:33 +03:00
|
|
|
root: C:\tmp\hermes\
|
2022-03-08 04:02:08 +03:00
|
|
|
paths:
|
2022-04-27 21:48:25 +03:00
|
|
|
- win64-bin
|
2022-03-08 04:02:08 +03:00
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Releases
|
|
|
|
# -------------------------
|
2021-12-01 03:48:47 +03:00
|
|
|
prepare_package_for_release:
|
2022-01-25 01:06:49 +03:00
|
|
|
parameters:
|
|
|
|
version:
|
|
|
|
type: string
|
|
|
|
latest:
|
|
|
|
type: boolean
|
|
|
|
default: false
|
2021-12-01 03:48:47 +03:00
|
|
|
executor: reactnativeios
|
|
|
|
steps:
|
2022-05-18 17:43:51 +03:00
|
|
|
- checkout_code_with_cache
|
2021-12-04 00:15:38 +03:00
|
|
|
- run_yarn
|
2021-12-01 03:48:47 +03:00
|
|
|
- add_ssh_keys:
|
|
|
|
fingerprints:
|
|
|
|
- "1c:98:e0:3a:52:79:95:29:12:cd:b4:87:5b:41:e2:bb"
|
|
|
|
- run:
|
|
|
|
name: "Set new react-native version and commit changes"
|
|
|
|
command: |
|
2022-01-25 01:06:49 +03:00
|
|
|
node ./scripts/prepare-package-for-release.js -v << parameters.version >> -l << parameters.latest >>
|
2021-12-01 03:48:47 +03:00
|
|
|
|
2021-09-29 02:26:08 +03:00
|
|
|
build_npm_package:
|
2020-03-14 07:46:45 +03:00
|
|
|
parameters:
|
|
|
|
publish_npm_args:
|
|
|
|
type: string
|
2021-09-29 02:26:08 +03:00
|
|
|
default: --dry-run
|
2019-05-31 01:07:45 +03:00
|
|
|
executor: reactnativeandroid
|
2022-03-23 23:18:52 +03:00
|
|
|
environment:
|
|
|
|
- HERMES_WS_DIR: *hermes_workspace_root
|
2018-07-23 23:28:17 +03:00
|
|
|
steps:
|
2020-03-24 21:04:57 +03:00
|
|
|
- run:
|
|
|
|
name: Add github.com to SSH known hosts
|
|
|
|
command: |
|
|
|
|
mkdir -p ~/.ssh
|
|
|
|
echo '|1|If6MU203eXTaaWL678YEfWkVMrw=|kqLeIAyTy8pzpj8x8Ae4Fr8Mtlc= ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
|
2022-08-23 16:43:01 +03:00
|
|
|
- checkout
|
2022-04-20 23:03:29 +03:00
|
|
|
- *attach_hermes_workspace
|
|
|
|
- run:
|
2022-04-27 21:48:25 +03:00
|
|
|
name: Copy HermesC binaries
|
2022-04-20 23:03:29 +03:00
|
|
|
command: |
|
2022-04-27 21:48:25 +03:00
|
|
|
mkdir -p ./sdks/hermesc ./sdks/hermesc/osx-bin ./sdks/hermesc/win64-bin ./sdks/hermesc/linux64-bin
|
|
|
|
cp -r $HERMES_WS_DIR/osx-bin/* ./sdks/hermesc/osx-bin/.
|
|
|
|
cp -r $HERMES_WS_DIR/win64-bin/* ./sdks/hermesc/win64-bin/.
|
|
|
|
cp -r $HERMES_WS_DIR/linux64-bin/* ./sdks/hermesc/linux64-bin/.
|
2022-04-01 12:41:04 +03:00
|
|
|
|
2019-05-31 01:07:45 +03:00
|
|
|
- run_yarn
|
|
|
|
- download_gradle_dependencies
|
2022-03-23 23:18:52 +03:00
|
|
|
|
|
|
|
# START: Stables and nightlies
|
|
|
|
# This conditional step sets up the necessary credentials for publishing react-native to npm,
|
|
|
|
# and for interacting with GitHub as the react-native-bot account. Important: these steps
|
|
|
|
# should not be allowed to run on commits from pull requests.
|
2021-09-29 02:26:08 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
or:
|
|
|
|
- equal: [ --release, << parameters.publish_npm_args >> ]
|
|
|
|
- equal: [ --nightly, << parameters.publish_npm_args >> ]
|
|
|
|
steps:
|
|
|
|
- run: echo "//registry.npmjs.org/:_authToken=${CIRCLE_NPM_TOKEN}" > ~/.npmrc
|
|
|
|
- run: |
|
|
|
|
git config --global user.email "react-native-bot@users.noreply.github.com"
|
|
|
|
git config --global user.name "npm Deployment Script"
|
|
|
|
echo "machine github.com login react-native-bot password $GITHUB_TOKEN" > ~/.netrc
|
2022-03-23 23:18:52 +03:00
|
|
|
# END: Stables and nightlies
|
|
|
|
|
2020-03-14 07:46:45 +03:00
|
|
|
- run: node ./scripts/publish-npm.js << parameters.publish_npm_args >>
|
2022-05-06 20:50:10 +03:00
|
|
|
- run:
|
|
|
|
name: Zip Hermes Native Symbols
|
|
|
|
command: zip -r /tmp/hermes-native-symbols.zip ~/react-native/ReactAndroid/hermes-engine/build/intermediates/cmake/
|
|
|
|
- store_artifacts:
|
|
|
|
path: /tmp/hermes-native-symbols.zip
|
2022-03-23 23:18:52 +03:00
|
|
|
|
|
|
|
# START: Commitlies
|
|
|
|
# Provide a react-native package for this commit as a Circle CI release artifact.
|
2021-09-24 23:47:36 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
equal: [ --dry-run, << parameters.publish_npm_args >> ]
|
|
|
|
steps:
|
2021-09-25 20:04:47 +03:00
|
|
|
- run:
|
|
|
|
name: Build release package as a job artifact
|
|
|
|
command: |
|
|
|
|
mkdir -p build
|
|
|
|
FILENAME=$(npm pack)
|
|
|
|
mv $FILENAME build/
|
2021-10-29 01:46:53 +03:00
|
|
|
echo $FILENAME > build/react-native-package-version
|
2021-09-24 23:47:36 +03:00
|
|
|
- store_artifacts:
|
2021-09-25 20:04:47 +03:00
|
|
|
path: ~/react-native/build/
|
2021-09-24 23:47:36 +03:00
|
|
|
destination: build
|
2021-10-29 01:46:53 +03:00
|
|
|
- persist_to_workspace:
|
|
|
|
root: .
|
|
|
|
paths:
|
|
|
|
- build/*
|
2022-03-23 23:18:52 +03:00
|
|
|
# END: Commitlies
|
2021-10-29 01:46:53 +03:00
|
|
|
|
2022-03-23 23:18:52 +03:00
|
|
|
# START: Commits from pull requests
|
|
|
|
# When building commits from pull requests, leave a comment on the PR with a link to build artifacts
|
2021-10-09 03:53:18 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
matches: { pattern: '^pull\/.*$', value: << pipeline.git.branch >> }
|
|
|
|
steps:
|
2021-10-12 07:23:38 +03:00
|
|
|
- install_github_bot_deps
|
2021-10-09 03:53:18 +03:00
|
|
|
- run:
|
|
|
|
name: Post link to PR build artifacts (pull-bot)
|
2021-11-06 03:27:23 +03:00
|
|
|
command: GITHUB_TOKEN="$PUBLIC_PULLBOT_GITHUB_TOKEN_A""$PUBLIC_PULLBOT_GITHUB_TOKEN_B" scripts/circleci/post-artifacts-link.sh || true
|
2022-03-23 23:18:52 +03:00
|
|
|
# END: Commits from pull requests
|
2018-07-23 23:28:17 +03:00
|
|
|
|
2022-03-23 23:18:52 +03:00
|
|
|
# START: Stable releases
|
2021-11-12 22:31:21 +03:00
|
|
|
- when:
|
|
|
|
condition:
|
|
|
|
equal: [ --release, << parameters.publish_npm_args >> ]
|
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Update rn-diff-purge to generate upgrade-support diff
|
|
|
|
command: |
|
|
|
|
curl -X POST https://api.github.com/repos/react-native-community/rn-diff-purge/dispatches \
|
|
|
|
-H "Accept: application/vnd.github.v3+json" \
|
|
|
|
-u "$PAT_USERNAME:$PAT_TOKEN" \
|
|
|
|
-d "{\"event_type\": \"publish\", \"client_payload\": { \"version\": \"${CIRCLE_TAG:1}\" }}"
|
2022-07-14 23:42:08 +03:00
|
|
|
- run:
|
|
|
|
name: Install dependencies
|
|
|
|
command: apt update && apt install -y jq jo
|
|
|
|
- run:
|
|
|
|
name: Create draft GitHub Release and upload Hermes binaries
|
|
|
|
command: |
|
|
|
|
ARTIFACTS=("$HERMES_WS_DIR/hermes-runtime-darwin/hermes-runtime-darwin-$CIRCLE_TAG.tar.gz")
|
|
|
|
./scripts/circleci/create_github_release.sh $CIRCLE_TAG $CIRCLE_PROJECT_USERNAME $CIRCLE_PROJECT_REPONAME $GITHUB_TOKEN "${ARTIFACTS[@]}"
|
2022-03-23 23:18:52 +03:00
|
|
|
# END: Stable releases
|
2021-11-12 22:31:21 +03:00
|
|
|
|
2020-02-27 05:07:09 +03:00
|
|
|
# -------------------------
|
|
|
|
# JOBS: Nightly
|
|
|
|
# -------------------------
|
|
|
|
nightly_job:
|
2021-10-02 01:31:24 +03:00
|
|
|
machine:
|
|
|
|
image: ubuntu-2004:202010-01
|
2020-02-27 05:07:09 +03:00
|
|
|
steps:
|
|
|
|
- run:
|
|
|
|
name: Nightly
|
|
|
|
command: |
|
|
|
|
echo "Nightly build run"
|
|
|
|
|
2022-01-25 01:06:49 +03:00
|
|
|
|
|
|
|
# -------------------------
|
|
|
|
# PIPELINE PARAMETERS
|
|
|
|
# -------------------------
|
|
|
|
parameters:
|
|
|
|
run_package_release_workflow_only:
|
|
|
|
default: false
|
|
|
|
type: boolean
|
|
|
|
|
|
|
|
release_latest:
|
|
|
|
default: false
|
|
|
|
type: boolean
|
|
|
|
|
|
|
|
release_version:
|
|
|
|
default: "9999"
|
|
|
|
type: string
|
|
|
|
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
|
|
|
# WORK FLOWS
|
2022-01-25 01:06:49 +03:00
|
|
|
#
|
|
|
|
# When creating a new workflow, make sure to include condition `unless: << pipeline.parameters.run_package_release_workflow_only >>`
|
|
|
|
# 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
|
2019-02-24 04:01:34 +03:00
|
|
|
# -------------------------
|
2017-09-21 23:34:02 +03:00
|
|
|
workflows:
|
2020-02-27 05:07:09 +03:00
|
|
|
version: 2
|
|
|
|
|
2018-02-13 19:08:18 +03:00
|
|
|
tests:
|
2022-01-25 01:06:49 +03:00
|
|
|
unless: << pipeline.parameters.run_package_release_workflow_only >>
|
2017-09-21 23:34:02 +03:00
|
|
|
jobs:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
2022-09-07 12:57:28 +03:00
|
|
|
- test_codegen
|
2022-04-02 10:02:11 +03:00
|
|
|
- build_hermesc_linux:
|
2022-03-23 23:18:52 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
2022-05-23 22:14:29 +03:00
|
|
|
- build_hermes_macos:
|
2022-03-23 23:18:52 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
|
|
|
- build_hermesc_windows:
|
2022-03-23 23:18:52 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
2021-10-29 01:46:53 +03:00
|
|
|
- build_npm_package:
|
|
|
|
# Build a release package on every untagged commit, but do not publish to npm.
|
|
|
|
publish_npm_args: --dry-run
|
2022-04-20 23:03:29 +03:00
|
|
|
requires:
|
2022-04-27 21:48:25 +03:00
|
|
|
- build_hermesc_linux
|
2022-05-23 22:14:29 +03:00
|
|
|
- build_hermes_macos
|
2022-04-27 21:48:25 +03:00
|
|
|
- build_hermesc_windows
|
2021-09-15 11:33:10 +03:00
|
|
|
- test_js:
|
|
|
|
run_disabled_tests: false
|
|
|
|
- test_android:
|
|
|
|
run_disabled_tests: false
|
2021-09-24 11:02:07 +03:00
|
|
|
- test_android_template:
|
2022-02-09 19:23:43 +03:00
|
|
|
requires:
|
|
|
|
- build_npm_package
|
2022-08-08 14:44:48 +03:00
|
|
|
matrix:
|
|
|
|
parameters:
|
|
|
|
newarchitecture: [true, false]
|
|
|
|
flavor: ["Debug", "Release"]
|
2022-08-11 12:46:00 +03:00
|
|
|
- test_buck
|
2021-10-29 01:46:53 +03:00
|
|
|
- test_ios_template:
|
|
|
|
requires:
|
|
|
|
- build_npm_package
|
2022-08-31 18:54:06 +03:00
|
|
|
matrix:
|
|
|
|
parameters:
|
|
|
|
architecture: ["NewArch", "OldArch"]
|
|
|
|
flavor: ["Debug", "Release"]
|
|
|
|
jsengine: ["Hermes", "JSC"]
|
2022-09-06 13:25:45 +03:00
|
|
|
flipper: ["WithFlipper", "WithoutFlipper"]
|
2022-07-20 19:12:47 +03:00
|
|
|
- test_ios_rntester:
|
|
|
|
requires:
|
|
|
|
- build_hermes_macos
|
2022-04-28 18:53:24 +03:00
|
|
|
- test_ios:
|
2022-04-21 23:49:40 +03:00
|
|
|
run_unit_tests: true
|
2022-07-20 19:12:47 +03:00
|
|
|
requires:
|
|
|
|
- build_hermes_macos
|
2020-12-29 01:26:55 +03:00
|
|
|
# DISABLED: USE_FRAMEWORKS=1 not supported by Flipper
|
2022-04-28 18:53:24 +03:00
|
|
|
# - test_ios:
|
|
|
|
# name: test_ios_frameworks
|
2020-12-29 01:26:55 +03:00
|
|
|
# use_frameworks: true
|
|
|
|
# run_unit_tests: true
|
2022-04-02 10:02:11 +03:00
|
|
|
# requires:
|
|
|
|
# - build_ios_frameworks
|
2019-05-31 01:07:45 +03:00
|
|
|
- test_js:
|
2020-02-14 10:11:41 +03:00
|
|
|
name: test_js_prev_lts
|
|
|
|
executor: nodeprevlts
|
2020-04-01 03:36:31 +03:00
|
|
|
- test_windows:
|
|
|
|
run_disabled_tests: false
|
|
|
|
|
2022-01-25 01:06:49 +03:00
|
|
|
# This workflow should only be triggered by release script
|
|
|
|
package_release:
|
|
|
|
when: << pipeline.parameters.run_package_release_workflow_only >>
|
2018-12-01 06:45:56 +03:00
|
|
|
jobs:
|
2022-01-25 01:06:49 +03:00
|
|
|
# This job will trigger publish_release workflow
|
2021-12-01 03:48:47 +03:00
|
|
|
- prepare_package_for_release:
|
|
|
|
name: prepare_package_for_release
|
2022-01-25 01:06:49 +03:00
|
|
|
version: << pipeline.parameters.release_version >>
|
|
|
|
latest : << pipeline.parameters.release_latest >>
|
2021-12-01 03:48:47 +03:00
|
|
|
|
2022-01-25 01:06:49 +03:00
|
|
|
publish_release:
|
|
|
|
unless: << pipeline.parameters.run_package_release_workflow_only >>
|
|
|
|
jobs:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace:
|
2022-03-23 23:18:52 +03:00
|
|
|
filters: *only_release_tags
|
2022-04-02 10:02:11 +03:00
|
|
|
- build_hermesc_linux:
|
2022-04-28 20:44:06 +03:00
|
|
|
filters: *only_release_tags
|
2022-03-23 23:18:52 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
2022-05-23 22:14:29 +03:00
|
|
|
- build_hermes_macos:
|
2022-04-28 20:44:06 +03:00
|
|
|
filters: *only_release_tags
|
2022-03-23 23:18:52 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
|
|
|
- build_hermesc_windows:
|
2022-04-28 20:44:06 +03:00
|
|
|
filters: *only_release_tags
|
2022-03-23 23:18:52 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
2022-01-25 01:06:49 +03:00
|
|
|
# This job will trigger when a version tag is pushed (by package_release)
|
2021-09-29 02:26:08 +03:00
|
|
|
- build_npm_package:
|
|
|
|
name: build_and_publish_npm_package
|
2021-11-12 22:31:21 +03:00
|
|
|
context: react-native-bot
|
2021-09-29 02:26:08 +03:00
|
|
|
publish_npm_args: --release
|
2022-03-08 04:02:08 +03:00
|
|
|
filters: *only_release_tags
|
2022-04-20 23:03:29 +03:00
|
|
|
requires:
|
2022-04-27 21:48:25 +03:00
|
|
|
- build_hermesc_linux
|
2022-05-23 22:14:29 +03:00
|
|
|
- build_hermes_macos
|
2022-04-27 21:48:25 +03:00
|
|
|
- build_hermesc_windows
|
2018-06-14 23:48:15 +03:00
|
|
|
|
2018-12-01 06:45:56 +03:00
|
|
|
analysis:
|
2022-01-25 01:06:49 +03:00
|
|
|
unless: << pipeline.parameters.run_package_release_workflow_only >>
|
2018-12-01 06:45:56 +03:00
|
|
|
jobs:
|
2022-03-08 04:02:08 +03:00
|
|
|
# Run lints on every commit
|
|
|
|
- analyze_code
|
2019-05-31 01:07:45 +03:00
|
|
|
|
2022-05-23 11:12:25 +03:00
|
|
|
# Run code checks on PRs
|
|
|
|
- analyze_pr
|
2018-12-01 06:45:56 +03:00
|
|
|
|
2019-06-01 02:42:18 +03:00
|
|
|
# Gather coverage
|
2022-03-08 04:02:08 +03:00
|
|
|
- js_coverage
|
2021-09-15 11:33:10 +03:00
|
|
|
|
2020-02-27 05:07:09 +03:00
|
|
|
nightly:
|
2022-01-25 01:06:49 +03:00
|
|
|
unless: << pipeline.parameters.run_package_release_workflow_only >>
|
2020-02-27 05:07:09 +03:00
|
|
|
triggers:
|
|
|
|
- schedule:
|
2021-09-29 10:09:53 +03:00
|
|
|
cron: "0 20 * * *"
|
2020-02-27 05:07:09 +03:00
|
|
|
filters:
|
|
|
|
branches:
|
|
|
|
only:
|
2021-07-15 22:22:38 +03:00
|
|
|
- main
|
2020-02-27 05:07:09 +03:00
|
|
|
jobs:
|
|
|
|
- nightly_job
|
2020-03-14 07:46:45 +03:00
|
|
|
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
|
|
|
- build_hermesc_linux:
|
2022-03-08 04:02:08 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
2022-05-23 22:14:29 +03:00
|
|
|
- build_hermes_macos:
|
2022-03-08 04:02:08 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
|
|
|
- build_hermesc_windows:
|
2022-03-08 04:02:08 +03:00
|
|
|
requires:
|
2022-04-02 10:02:11 +03:00
|
|
|
- prepare_hermes_workspace
|
2021-09-29 02:26:08 +03:00
|
|
|
- build_npm_package:
|
2020-03-14 07:46:45 +03:00
|
|
|
publish_npm_args: --nightly
|
2022-04-20 23:03:29 +03:00
|
|
|
requires:
|
2022-04-27 21:48:25 +03:00
|
|
|
- build_hermesc_linux
|
2022-05-23 22:14:29 +03:00
|
|
|
- build_hermes_macos
|
2022-04-27 21:48:25 +03:00
|
|
|
- build_hermesc_windows
|