[ci] Try to parallelize devtools builds (#32266)
Building DevTools is currently the long pole for the runtime CI job. Let's see if we can get the overall runtime for runtime build and test down by speeding this one step up. --- [//]: # (BEGIN SAPLING FOOTER) Stack created with [Sapling](https://sapling-scm.com). Best reviewed with [ReviewStack](https://reviewstack.dev/facebook/react/pull/32266). * #32267 * __->__ #32266
lauren committed
Jan 30, 2025 at 11:49 UTC
14f7c072719564ee4269c5fdadb6b8a737546422
2 files changed
+18
-14
.github/workflows/runtime_build_and_test.yml
+8
-10
@@ -501,6 +501,9 @@ jobs:
501
name: Build DevTools and process artifacts
502
needs: build_and_lint
503
runs-on: ubuntu-latest
504
+ strategy:
505
+ matrix:
506
+ browser: [chrome, firefox, edge]
507
steps:
508
- uses: actions/checkout@v4
509
with:
@@ -525,7 +528,7 @@ jobs:
528
pattern: _build_*
529
path: build
530
merge-multiple: true
528
- - run: ./scripts/ci/pack_and_store_devtools_artifacts.sh
531
+ - run: ./scripts/ci/pack_and_store_devtools_artifacts.sh ${{ matrix.browser }}
532
env:
533
RELEASE_CHANNEL: experimental
534
- name: Display structure of build
@@ -533,19 +536,14 @@ jobs:
536
- name: Archive devtools build
537
uses: actions/upload-artifact@v4
538
with:
536
- name: react-devtools
539
+ name: react-devtools-${{ matrix.browser }}
540
path: build/devtools.tgz
541
# Simplifies getting the extension for local testing
539
- - name: Archive chrome extension
540
- uses: actions/upload-artifact@v4
541
- with:
542
- name: react-devtools-chrome-extension
543
- path: build/devtools/chrome-extension.zip
544
- - name: Archive firefox extension
542
+ - name: Archive ${{ matrix.browser }} extension
543
uses: actions/upload-artifact@v4
544
with:
547
- name: react-devtools-firefox-extension
548
- path: build/devtools/firefox-extension.zip
545
+ name: react-devtools-${{ matrix.browser }}-extension
546
+ path: build/devtools/${{ matrix.browser }}-extension.zip
547
548
run_devtools_e2e_tests:
549
name: Run DevTools e2e tests
scripts/ci/pack_and_store_devtools_artifacts.sh
+10
-4
@@ -17,10 +17,16 @@ npm pack
17
mv ./react-devtools-inline*.tgz ../../build/devtools/
18
19
cd ../react-devtools-extensions
20
-yarn build
21
-mv ./chrome/build/ReactDevTools.zip ../../build/devtools/chrome-extension.zip
22
-mv ./firefox/build/ReactDevTools.zip ../../build/devtools/firefox-extension.zip
20
+if [[ -n "$1" ]]; then
21
+ yarn build:$1
22
+ mv ./$1/build/ReactDevTools.zip ../../build/devtools/$1-extension.zip
23
+else
24
+ yarn build
25
+ for browser in chrome firefox edge; do
26
+ mv ./$browser/build/ReactDevTools.zip ../../build/devtools/$browser-extension.zip
27
+ done
28
+fi
29
30
# Compress all DevTools artifacts into a single tarball for easy download
31
cd ../../build/devtools
26
-tar -zcvf ../devtools.tgz .
\ No newline at end of file
32
+tar -zcvf ../devtools.tgz .