Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable building of DevTools and scheduling profiler in CI #19691

Merged
merged 11 commits into from
Sep 21, 2020
46 changes: 38 additions & 8 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ aliases:
- &environment
TZ: /usr/share/zoneinfo/America/Los_Angeles

- &restore_yarn_cache
restore_cache:
name: Restore yarn cache
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn

- &restore_node_modules
restore_cache:
name: Restore node_modules cache
Expand Down Expand Up @@ -52,9 +57,7 @@ jobs:
- run:
name: Nodejs Version
command: node --version
- restore_cache:
name: Restore yarn cache
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn
- *restore_yarn_cache
- run:
name: Install Packages
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
Expand Down Expand Up @@ -273,18 +276,43 @@ jobs:
build_devtools_and_process_artifacts:
docker: *docker
environment: *environment
parallelism: 20
steps:
- checkout
- attach_workspace: *attach_workspace
- *restore_yarn_cache
- *restore_node_modules
- run:
name: Install Packages
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
- run:
environment:
RELEASE_CHANNEL: experimental
command: ./scripts/circleci/pack_and_store_devtools_artifacts.sh
- store_artifacts:
path: ./build/devtools.tgz

build_devtools_scheduling_profiler:
docker: *docker
environment: *environment
steps:
- checkout
- attach_workspace: *attach_workspace
- *restore_yarn_cache
- *restore_node_modules
- run:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be tagged with RELEASE_CHANNEL: experimental?

The scheduling profiler uses unstable_createRoot. The stable yarn_build command doesn't build a version of ReactDOM that exposes this API.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so, unless I'm missing something. The yarn_build CI job builds everything with the experimental channel. Because we depend on those packages, I don't think the scheduling profiler's build will be affected by a RELEASE_CHANNEL tag.

I've also confirmed that the built artifact works:

image

image

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, huh. I guess I'm a little out of date on our how Circle CI config is setup. build_devtools_and_process_artifacts specifies RELEASE_CHANNEL: experimental, but maybe it's unnecessary since, as you say, yarn_build is in the experimental channel (and RELEASE_CHANNEL_stable_yarn_build is stable)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, there's a good chance that that's unnecessary, but I didn't investigate that as it was already there 😆

name: Install Packages
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
- run:
name: Build and archive
command: |
mkdir -p build/devtools
cd packages/react-devtools-scheduling-profiler
yarn build
cd dist
tar -zcvf ../../../build/devtools-scheduling-profiler.tgz .
- store_artifacts:
path: ./build/devtools-scheduling-profiler.tgz

# These jobs are named differently so we can distinguish the stable and
# and experimental artifacts
process_artifacts: *process_artifacts
Expand Down Expand Up @@ -517,10 +545,12 @@ workflows:
- yarn_test_build_devtools:
requires:
- yarn_build
# FIXME: Temporarily disabled to unblock master.
# - build_devtools_and_process_artifacts:
# requires:
# - yarn_build
- build_devtools_and_process_artifacts:
requires:
- yarn_build
- build_devtools_scheduling_profiler:
requires:
- yarn_build

fuzz_tests:
triggers:
Expand Down