Skip to content

Commit bdff988

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 b2357ec commit bdff988

File tree

2 files changed

+20
-14
lines changed

2 files changed

+20
-14
lines changed

.github/workflows/runtime_build_and_test.yml

Lines changed: 9 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,23 @@ 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+
- if: matrix.browser != 'edge'
543+
name: Archive ${{ matrix.browser }} extension
545544
uses: actions/upload-artifact@v4
546545
with:
547-
name: react-devtools-firefox-extension
548-
path: build/devtools/firefox-extension.zip
546+
name: react-devtools-${{ matrix.browser }}-extension
547+
path: build/devtools/${{ matrix.browser }}-extension.zip
549548

550549
run_devtools_e2e_tests:
551550
name: Run DevTools e2e tests

scripts/ci/pack_and_store_devtools_artifacts.sh

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,17 @@ 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+
if [[ "$1" != "edge" ]]; then
23+
mv ./$1/build/ReactDevTools.zip ../../build/devtools/$1-extension.zip
24+
fi
25+
else
26+
yarn build
27+
mv ./chrome/build/ReactDevTools.zip ../../build/devtools/chrome-extension.zip
28+
mv ./firefox/build/ReactDevTools.zip ../../build/devtools/firefox-extension.zip
29+
fi
2330

2431
# Compress all DevTools artifacts into a single tarball for easy download
2532
cd ../../build/devtools
26-
tar -zcvf ../devtools.tgz .
33+
tar -zcvf ../devtools.tgz .

0 commit comments

Comments
 (0)