Commit Graph

158 Commits

Author SHA1 Message Date
Lauren Tan
5b19dc0f06 Allow forcing a build in artifacts workflow dispatch
Sometimes it is useful to bypass the revision check when we need to make
changes to the runtime_commit_artifacts script. The `force` input can be
passed via the GitHub UI for manual runs of the workflow.

ghstack-source-id: cf9e32c01a
Pull Request resolved: https://github.com/facebook/react/pull/31027
2024-09-23 15:38:05 -04:00
Lauren Tan
79bcf6eb23 Fix missing trailing / in commit artifacts workflow
The trailing / was being omitted, so instead of moving the cjs
directory itself, it would move only its contents instead. This broke
some internal path assumptions.

Additionally, updates the step to create the react-dom directory prior
to moving.

ghstack-source-id: b6eedb0c88cd3aa3a786a3d3d280ede5ee81a063
Pull Request resolved: https://github.com/facebook/react/pull/31026
2024-09-23 14:58:19 -04:00
Jack Pope
e4953922a9 Update react-native/react-dom build directory (#31006)
Commit artifact actions are breaking after
https://github.com/facebook/react/pull/30711

See:
https://github.com/facebook/react/actions/runs/10930658977/job/30344033974

> mv: cannot stat 'build/facebook-react-native/react/dom/': No such file
or directory

After build, the new artifacts are in `/react-dom/cjs`, not
`/react/dom/`
```
$> yarn build
$> ls build/facebook-react-native/react/
# ... no dom
$> ls build/facebook-react-native/react-dom/cjs
```
2024-09-19 18:04:06 -04:00
Timothy Yung
e72127a4ec Build react-dom in builds/facebook-fbsource (#30711)
## Summary

Builds `react-dom` for React Native so that it also populates the
`builds/facebook-fbsource` branch.

**NOTE:** For Meta employees, D61354219 is the internal integration.

## How did you test this change?

```
$ yarn build
…
$ ls build/facebook-react-native/react-dom/cjs
ReactDOM-dev.js       ReactDOM-prod.js      ReactDOM-profiling.js
```
2024-09-18 14:44:55 -07:00
Lauren Tan
dcae56f8b7 [ez] Remove trailing space from babel-refresh header
ghstack-source-id: d78c53462b3be7b93733cdd0a7def96d7112087e
Pull Request resolved: https://github.com/facebook/react/pull/30806
2024-08-26 13:16:03 -04:00
Lauren Tan
1d989965a6 [ez] Add noformat etc headers into some files
These are only needed internally so I'm opting to just do it in the
commit artifacts job instead of amending the build config.

ghstack-source-id: 6a5382b028
Pull Request resolved: https://github.com/facebook/react/pull/30775
2024-08-21 11:49:02 -04:00
Jan Kassens
0e6d8c3d1a [ci] fix path in compiler_typescript.yml (#30651)
The path was incorrect, so the job didn\t run on changes to it.
2024-08-09 13:21:24 -04:00
Lauren Tan
9f0508fcf4 [final] Actually publish packages to npm
ghstack-source-id: 78a358a81726f1e9898be7f46de23e80005b5bfd
Pull Request resolved: https://github.com/facebook/react/pull/30618
2024-08-06 15:12:03 -04:00
Lauren Tan
47d85282bc [ci] Add prerelease nightly and manual script for compiler
Publishes the compiler packages on the same schedule as the React ones.
For now the manual script can only build from `main` but in the future
we can add support for building specific commits

ghstack-source-id: 66676c578b795b90bf3c5715be8900438868b6ee
Pull Request resolved: https://github.com/facebook/react/pull/30615
2024-08-06 14:48:33 -04:00
Arthur
eb52f3788f [CI] fix the shared_lint cached key (#30609)
<!--
  Thanks for submitting a pull request!
We appreciate you spending the time to work on these changes. Please
provide enough information so that others can review your pull request.
The three fields below are mandatory.

Before submitting a pull request, please make sure the following is
done:

1. Fork [the repository](https://github.com/facebook/react) and create
your branch from `main`.
  2. Run `yarn` in the repository root.
3. If you've fixed a bug or added code that should be tested, add tests!
4. Ensure the test suite passes (`yarn test`). Tip: `yarn test --watch
TestName` is helpful in development.
5. Run `yarn test --prod` to test in the production environment. It
supports the same options as `yarn test`.
6. If you need a debugger, run `yarn test --debug --watch TestName`,
open `chrome://inspect`, and press "Inspect".
7. Format your code with
[prettier](https://github.com/prettier/prettier) (`yarn prettier`).
8. Make sure your code lints (`yarn lint`). Tip: `yarn linc` to only
check changed files.
  9. Run the [Flow](https://flowtype.org/) type checks (`yarn flow`).
  10. If you haven't already, complete the CLA.

Learn more about contributing:
https://reactjs.org/docs/how-to-contribute.html
-->

## Summary

<!--
Explain the **motivation** for making this change. What existing problem
does the pull request solve?
-->

In the shared_lint,

for the first Prettier job, use `${{ runner.arch }}-${{ runner.os
}}-modules-${{ hashFiles('yarn.lock') }}` as the cache key.

For the following jobs, use `${{ runner.arch }}-${{ runner.os
}}-modules-${{ hashFiles('**/yarn.lock') }}` as the cache key.

Some of the jobs do not hit the cache if the hash does not match.

## How did you test this change?

<!--
Demonstrate the code is solid. Example: The exact commands you ran and
their output, screenshots / videos if the pull request changes the user
interface.
How exactly did you verify that your PR solves the issue you wanted to
solve?
  If you leave this empty, your PR will very likely be closed.
-->

I run [act](https://github.com/nektos/act) locally to test it.
2024-08-06 14:43:10 -04:00
Lauren Tan
73b21a05e3 [ci] Read node version from .nvmrc instead of hardcoding
ghstack-source-id: 336ac1a45f
Pull Request resolved: https://github.com/facebook/react/pull/30530
2024-07-30 11:54:48 -04:00
Lauren Tan
a7f3b49be2 [ci] Make some workflows dispatchable
The previous checks for prerelease_commit_sha was incorrectly
implemented for devtools regression tests so I fixed it. I also made
some other workflows dispatchable so they can be manually run from
GitHub's UI as needed.

Test plan: https://github.com/facebook/react/actions/runs/10165564989

ghstack-source-id: b30c7b48e7
Pull Request resolved: https://github.com/facebook/react/pull/30529
2024-07-30 11:54:48 -04:00
Lauren Tan
927ba5799a [rfc] Delete devtools_check_repro workflow
With GitHub issue templates this workflow is not truly necessary and
can deny other workflows from running due to a limited amount of CI
workers in the pool.

I propose deleting this workflow and relying on issue templates instead.

ghstack-source-id: a798621f36
Pull Request resolved: https://github.com/facebook/react/pull/30518
2024-07-30 10:57:35 -04:00
Lauren Tan
8ebe42f17c [ci] Cleanup --ci flag
This can be restored back to being a boolean instead of an enum

ghstack-source-id: aca58fb7ea386ee489dd895e028f1aa2fc507193
Pull Request resolved: https://github.com/facebook/react/pull/30508
2024-07-29 19:18:03 -04:00
Lauren Tan
e415b22494 [ci] Rename scripts/circleci to scripts/ci
ghstack-source-id: 5d9cb7d3dbd0f5c54856ad194517524f14cf1ccb
Pull Request resolved: https://github.com/facebook/react/pull/30507
2024-07-29 19:18:03 -04:00
Lauren Tan
70885cfebe [ci] Cleanup forked build files
Unforks these scripts now that we are fully migrated to GH.

ghstack-source-id: e1e15452f2d2e178a5b56203ebd0b42151e6a9ba
Pull Request resolved: https://github.com/facebook/react/pull/30506
2024-07-29 19:18:02 -04:00
Lauren Tan
87b1a942ef [ci] Override actions/cache default timeout
actions/cache has a default timeout of 10 minutes. Occasionally the
cache service download gets stuck and it waits this amount of time
before proceeding like it was a cache miss.

10 minutes is way too long so let's shorten this to a minute.

ghstack-source-id: 95dee31bd9
Pull Request resolved: https://github.com/facebook/react/pull/30512
2024-07-29 17:36:43 -04:00
Lauren Tan
941e1b4a0a [ci] Fix passing secrets to runtime_prereleases
Second try, seems like you need to explicitly pass secrets to reusable
workflows.

ghstack-source-id: 05ffdae13474dba64119182bf72c15d07f83efd2
Pull Request resolved: https://github.com/facebook/react/pull/30504
2024-07-29 14:27:21 -04:00
Lauren Tan
93b12b824c [ci] Fix prerelease script npm authtoken
Try again to specify the npm token so the publish script can succeed.

ghstack-source-id: cd6e01b2ea
Pull Request resolved: https://github.com/facebook/react/pull/30503
2024-07-29 13:46:57 -04:00
Lauren Tan
03072a7a11 [ci] Fix prereleases reusable workflow
Turns out I had configured the reusable workflow with the wrong `on`
command.

Also removes the workflow_dispatch config from the nightly workflow as
that was not meant to be triggered manually.

ghstack-source-id: 426d07279d
Pull Request resolved: https://github.com/facebook/react/pull/30498
2024-07-29 12:37:05 -04:00
Lauren Tan
9af9764f55 [ci] Add prerelease workflows to GH actions
Migrates the last 2 remaining circleci jobs to GH actions. The behavior
of these workflows have been kept the same.

Overview:
- Reusable workflow `runtime_prereleases.yml` added
- Nightly workflow on cron triggers the reusable workflow with the
  current HEAD sha
- Manual workflow which can be triggered from the github UI with a
  `prerelease_commit_sha` which triggers the reusable workflow

ghstack-source-id: 84ef33c732
Pull Request resolved: https://github.com/facebook/react/pull/30495
2024-07-29 11:29:29 -04:00
Lauren Tan
b9af819f8b [ci] Fix invalid username and email in synthetic commit
ghstack-source-id: 951d0ef445
Pull Request resolved: https://github.com/facebook/react/pull/30486
2024-07-26 15:15:00 -04:00
Lauren Tan
0023cff871 [ci] Update runtime_commit_artifacts step versions
These were outdated and emitting warnings

ghstack-source-id: 2e22c29253
Pull Request resolved: https://github.com/facebook/react/pull/30479
2024-07-26 11:58:20 -04:00
Lauren Tan
2883d28b2d [ci] Unfork runtime_commit_artifacts
Promotes v2 to the primary workflow file so that we don't double write
to the protected branches.

Note: this may break DiffTrain temporarily, I will fix forward if so

ghstack-source-id: f6505a72f2
Pull Request resolved: https://github.com/facebook/react/pull/30477
2024-07-26 11:34:26 -04:00
Lauren Tan
417e93ca19 [ci] Add commit steps to new runtime_commit_artifacts_v2
Adds back the missing steps with a few tweaks to where previously some
`github` context value was referenced, I changed it to read from the
triggering workflow_run (ie the build on `main`) instead.

ghstack-source-id: 4b0fa135f0
Pull Request resolved: https://github.com/facebook/react/pull/30476
2024-07-26 11:34:25 -04:00
Lauren Tan
27d5dba884 [ci] Temporary fork runtime_commit_artifacts
Unfortunately creating a workflow that depends on another worfklow run
requires it to first be merged into main, so I can't really test porting
this without landing it first.

To do this safely, I've left the original job intact for DiffTrain and
added a forked file. This fork only currently downloads the artifact
from the HEAD commit in GH actions; I've removed the steps that push to
the protected branches for now while I test to see if this works as
expected.

This workflow needs to depend on the runtime_build_and_test workflow
being complete because otherwise it will fail since the artifacts
haven't been built yet.

ghstack-source-id: 0f9cebc525
Pull Request resolved: https://github.com/facebook/react/pull/30472
2024-07-25 18:09:32 -04:00
Lauren Tan
fe225e3a1f [ci] Add devtools regression workflow
More or less a straight copy from the circleci config. I spotted some
inefficiencies but will fix those later to make reviewing this easier.

ghstack-source-id: cb3456c602
Pull Request resolved: https://github.com/facebook/react/pull/30406
2024-07-25 17:27:38 -04:00
Lauren Tan
66df94460e [ci] Update sizebot node_modules caching strategy
The download job for sizebot requires both modules from the root repo
but also has a nested yarn lockfile in scripts/release. Calculate the
hash for the cache using both lockfiles.

ghstack-source-id: fc1703b547ab906ee244cfa3540414a6df8c660e
Pull Request resolved: https://github.com/facebook/react/pull/30393
2024-07-18 17:42:46 -04:00
Lauren Tan
abc0b712aa [ci] Fix sizebot job omitting build_and_lint dependency
ghstack-source-id: 3d457818c9812e320ddbd2bb3f35d5b2e3b92bdc
Pull Request resolved: https://github.com/facebook/react/pull/30392
2024-07-18 17:42:45 -04:00
Lauren Tan
3f4391d589 [ci] Only run sizebot on pull requests
Oops, forgot to port this bit over.

ghstack-source-id: 7fae8021d80a2ea58e89759147553e6910b49a0f
Pull Request resolved: https://github.com/facebook/react/pull/30390
2024-07-18 17:42:45 -04:00
Lauren Tan
4fb11acd79 [ci] Add sizebot to gh actions
Wires up sizebot in gh actions. I also fixed sizebot incorrectly
reporting that ReactAllWarnings was deleted.

ghstack-source-id: d3b1bb2088651409e8656c66f1eb28ab534a0604
Pull Request resolved: https://github.com/facebook/react/pull/30380
2024-07-18 16:41:22 -04:00
Lauren Tan
76f8cf5277 [ci] Rename temporary build parts
Adds an _ prefix to temporary build parts from parallelization to allow
easier merging in later passes.

ghstack-source-id: 714da85972e138d389224f67601dc7aaa6676e11
Pull Request resolved: https://github.com/facebook/react/pull/30385
2024-07-18 16:41:20 -04:00
Lauren Tan
512b09b24d [ci][ez] Rename artifact from process_artifacts_combined
Build artifacts are uniquely associated to a single workflow run, so
appending the sha was unnecessary. I originally included it to make it
easier to download later but this turns out to be unneeded.

Drops the sha suffix to make downloading the artifact in a separate
script / workflow more straightforward.

ghstack-source-id: 36ac4df4c3
Pull Request resolved: https://github.com/facebook/react/pull/30364
2024-07-18 11:53:05 -04:00
Lauren Tan
243c0670ac [ci] Add RELEASE_CHANNEL_stable_yarn_test_dom_fixtures to gh actions
ghstack-source-id: 53a431f952
Pull Request resolved: https://github.com/facebook/react/pull/30358
2024-07-16 15:49:04 -04:00
Lauren Tan
9a8f3de0a8 [ci] Add run_fixtures_flight_tests to gh actions
ghstack-source-id: 76761e302f
Pull Request resolved: https://github.com/facebook/react/pull/30356
2024-07-16 15:49:04 -04:00
Lauren Tan
43d535f545 [ci] Add check_error_codes to gh actions
ghstack-source-id: b6dbee275b
Pull Request resolved: https://github.com/facebook/react/pull/30354
2024-07-16 15:48:23 -04:00
Lauren Tan
b7c628042d [ci] Try sharding test_build
The tests for the build currently take about 3.5 minutes and is at the
moment the long pole for the whole workflow. By sharding we can make
this workflow faster and save about a minute or so in overall wall time.

ghstack-source-id: c23df7b6d7
Pull Request resolved: https://github.com/facebook/react/pull/30349
2024-07-16 12:32:39 -04:00
Lauren Tan
acd5355b40 [ci] Add DevTools jobs to gh actions
Adds the devtools build and test jobs to GH actions. This is more or
less a straight copy of the jobs from circleci

ghstack-source-id: f1071d754e
Pull Request resolved: https://github.com/facebook/react/pull/30347
2024-07-16 12:32:39 -04:00
Lauren Tan
1e8efe7fd4 [ci] Combine Runtime workflows
Merges most workflows into a single workflow, which should make the
"Checks" tab easier to visualize sincee it will all be graphed in a
single interface. There should be no change in behavior, this is a
mechanical change.

ghstack-source-id: a5241a2420
Pull Request resolved: https://github.com/facebook/react/pull/30324
2024-07-12 12:53:06 -04:00
Lauren Tan
922c7971ba [ci] Standardize node version and timezones
Quick change to standardize on a single timezone across all workflows
and to use the same version of node (18.20.1).

Also updates .nvmrc

ghstack-source-id: e1d43006ec
Pull Request resolved: https://github.com/facebook/react/pull/30323
2024-07-12 12:53:05 -04:00
Lauren Tan
df5f273629 [ci] Add check_release_dependencies job
ghstack-source-id: 492e7e0a29
Pull Request resolved: https://github.com/facebook/react/pull/30169
2024-07-12 12:09:15 -04:00
Lauren Tan
a6b8959169 [ci] Add yarn_test_build job to gh actions
ghstack-source-id: 5cff977861
Pull Request resolved: https://github.com/facebook/react/pull/30072
2024-07-12 12:09:15 -04:00
Lauren Tan
bc576bfabe [ci] Add process_artifacts_combined job
ghstack-source-id: 784640da83
Pull Request resolved: https://github.com/facebook/react/pull/30073
2024-07-12 12:09:15 -04:00
Lauren Tan
3bc79cd41c [ci] Parallelize yarn build
ghstack-source-id: 8a13b456f1
Pull Request resolved: https://github.com/facebook/react/pull/30071
2024-07-12 12:09:14 -04:00
Lauren Tan
4347d391e1 [ci] Add yarn build_and_lint gh action
Basic copy of the yarn build job combined with linting from circleci
without any parallelization

ghstack-source-id: 849023cb13
Pull Request resolved: https://github.com/facebook/react/pull/30070
2024-07-12 12:09:14 -04:00
Jan Kassens
8ae78f39fb CI: reduce job waterfall for runtime test jobs (#30303)
The first job was just printing static JSON. This simplifies the job config a bit and allows the test jobs to start earlier.
2024-07-10 10:33:13 -04:00
Lauren Tan
27e9476f0a [ci] Cleanup
- Made each workflow's name consistent
- Rename each workflow file with consistent naming scheme
- Promote flow-ci-ghaction to flow-ci

ghstack-source-id: 490b643dcd
Pull Request resolved: https://github.com/facebook/react/pull/30037
2024-06-22 12:37:42 -04:00
Lauren Tan
a7c5c07ed4 [ci] Add new fizz GitHub action
Copies the existing circleci workflow for checking the inlined Fizz
runtime into GitHub actions. I didn't remove the circleci job for now
just to check for parity.

ghstack-source-id: 09480b1a20
Pull Request resolved: https://github.com/facebook/react/pull/30035
2024-06-22 12:37:42 -04:00
Lauren Tan
85215413cb [ci] Improve parallelism of yarn test
This PR adds parallelism similar to our existing circleci setup for
running yarn tests with the various test params. It does this by
sharding tests into `$SHARD_COUNT` number of groups, then spawning a job
for each of them and using jest's built in `--shard` option.

Effectively this means that the job will spawn an additional (where `n`
is the number of test params)

`n * $SHARD_COUNT` number of jobs to run tests in parallel

for a total of `n + (n * $SHARD_COUNT)` jobs. This does mean the
GitHub UI at the bottom of each PR gets longer and unfortunately it's
not sorted in any way as far as I can tell. But if something goes wrong
it should still be easy to find out what the problem is.

The PR also changes the `ci` argument for jest-cli to be an enum instead
so the tests use all available workers in GitHub actions. This will have
to live around for a bit until we can fully migrate off of circleci.

ghstack-source-id: 08f2d16353
Pull Request resolved: https://github.com/facebook/react/pull/30033
2024-06-22 12:37:42 -04:00
Lauren Tan
28c1336c91 [ci] Add new yarn test GitHub action
Copies the existing circleci workflow for yarn test into GitHub
actions. I didn't remove the circleci job for now just to check for
parity.

Opted to keep the same hardcoded list of params rather than use GitHub's
matrix permutations since this was intentional in the circleci config.

ghstack-source-id: b77a091254
Pull Request resolved: https://github.com/facebook/react/pull/30032
2024-06-22 12:37:41 -04:00