Skip to content

Commit ec50f28

Browse files
committed
[ci] Try to parallelize devtools builds
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.
1 parent bb9a24d commit ec50f28

File tree

2 files changed

+18
-14
lines changed

2 files changed

+18
-14
lines changed

.github/workflows/runtime_build_and_test.yml

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,9 @@ jobs:
501501
name: Build DevTools and process artifacts
502502
needs: build_and_lint
503503
runs-on: ubuntu-latest
504+
strategy:
505+
matrix:
506+
browser: [chrome, firefox, edge]
504507
steps:
505508
- uses: actions/checkout@v4
506509
with:
@@ -525,27 +528,22 @@ jobs:
525528
pattern: _build_*
526529
path: build
527530
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 }}
529532
env:
530533
RELEASE_CHANNEL: experimental
531534
- name: Display structure of build
532535
run: ls -R build
533536
- name: Archive devtools build
534537
uses: actions/upload-artifact@v4
535538
with:
536-
name: react-devtools
539+
name: react-devtools-${{ matrix.browser }}
537540
path: build/devtools.tgz
538541
# 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
545543
uses: actions/upload-artifact@v4
546544
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
549547

550548
run_devtools_e2e_tests:
551549
name: Run DevTools e2e tests

scripts/ci/pack_and_store_devtools_artifacts.sh

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ npm pack
1717
mv ./react-devtools-inline*.tgz ../../build/devtools/
1818

1919
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
2329

2430
# Compress all DevTools artifacts into a single tarball for easy download
2531
cd ../../build/devtools
26-
tar -zcvf ../devtools.tgz .
32+
tar -zcvf ../devtools.tgz .

0 commit comments

Comments
 (0)