From 806db821cdc0dd1dc9906a353457cbf143bc5560 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 14:28:20 -0400 Subject: [PATCH 1/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 63 ++++++++++++++++++++++++++++- scripts/rollup/build-ghaction.js | 4 +- 2 files changed, 62 insertions(+), 5 deletions(-) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index a380c2c85c722..0e229eda42b65 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -54,7 +54,7 @@ jobs: - name: Archive build uses: actions/upload-artifact@v4 with: - name: ${{ matrix.bundle_type }}-${{ matrix.release_channel }} + name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} path: | build/** @@ -82,6 +82,65 @@ jobs: - name: Restore archived build uses: actions/download-artifact@v4 with: - name: ${{ matrix.bundle_type }}-${{ matrix.release_channel }} + name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} - run: yarn install --frozen-lockfile - run: yarn lint-build + + test_build: + name: yarn test-build + needs: [define_build_params, build] + strategy: + matrix: + bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }} + release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }} + test_params: [ + # Intentionally passing these as strings instead of creating a + # separate parameter per CLI argument, since it's easier to + # control/see which combinations we want to run. + -r=stable --env=development, + -r=stable --env=production, + -r=experimental --env=development, + -r=experimental --env=production, + + # Dev Tools + --project=devtools -r=experimental, + + # TODO: Update test config to support www build tests + # - "-r=www-classic --env=development --variant=false" + # - "-r=www-classic --env=production --variant=false" + # - "-r=www-classic --env=development --variant=true" + # - "-r=www-classic --env=production --variant=true" + # - "-r=www-modern --env=development --variant=false" + # - "-r=www-modern --env=production --variant=false" + # - "-r=www-modern --env=development --variant=true" + # - "-r=www-modern --env=production --variant=true" + + # TODO: Update test config to support xplat build tests + # - "-r=xplat --env=development --variant=false" + # - "-r=xplat --env=development --variant=true" + # - "-r=xplat --env=production --variant=false" + # - "-r=xplat --env=production --variant=true" + + # TODO: Test more persistent configurations? + ] + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.x + cache: "yarn" + cache-dependency-path: yarn.lock + - name: Restore cached node_modules + uses: actions/cache@v4 + id: node_modules + with: + path: "**/node_modules" + key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - name: Restore archived build + uses: actions/download-artifact@v4 + with: + name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} + - run: yarn install --frozen-lockfile + - run: yarn test --build ${{ matrix.test_params }} --ci=github + diff --git a/scripts/rollup/build-ghaction.js b/scripts/rollup/build-ghaction.js index 60871e3e9208c..ce2ee7addb878 100644 --- a/scripts/rollup/build-ghaction.js +++ b/scripts/rollup/build-ghaction.js @@ -846,9 +846,7 @@ async function buildEverything(bundleTypeToBuild) { ); await Promise.all( - bundles.map(([bundle, bundleType]) => { - return createBundle(bundle, bundleType); - }) + bundles.map(([bundle, bundleType]) => createBundle(bundle, bundleType)) ); await Packaging.copyAllShims(); From f106958b9adb9c14a4150fc5fb5bc05dec39192b Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 14:36:49 -0400 Subject: [PATCH 2/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index 0e229eda42b65..9b8d3d341e6c8 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -83,6 +83,9 @@ jobs: uses: actions/download-artifact@v4 with: name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} + path: build + - name: Display structure of build + run: ls -R build - run: yarn install --frozen-lockfile - run: yarn lint-build @@ -141,6 +144,9 @@ jobs: uses: actions/download-artifact@v4 with: name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} + path: build + - name: Display structure of build + run: ls -R build - run: yarn install --frozen-lockfile - run: yarn test --build ${{ matrix.test_params }} --ci=github From f753d171905de12d073954a54c8ff21adfbe1b8e Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 14:54:07 -0400 Subject: [PATCH 3/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index 9b8d3d341e6c8..ee4c2bd848f23 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -60,11 +60,7 @@ jobs: lint_build: name: yarn lint-build - needs: [define_build_params, build] - strategy: - matrix: - bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }} - release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }} + needs: build runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -82,8 +78,8 @@ jobs: - name: Restore archived build uses: actions/download-artifact@v4 with: - name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} path: build + merge-multiple: true - name: Display structure of build run: ls -R build - run: yarn install --frozen-lockfile @@ -91,11 +87,9 @@ jobs: test_build: name: yarn test-build - needs: [define_build_params, build] + needs: build strategy: matrix: - bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }} - release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }} test_params: [ # Intentionally passing these as strings instead of creating a # separate parameter per CLI argument, since it's easier to @@ -143,8 +137,8 @@ jobs: - name: Restore archived build uses: actions/download-artifact@v4 with: - name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} path: build + merge-multiple: true - name: Display structure of build run: ls -R build - run: yarn install --frozen-lockfile From 5c3640ecdb214b4a090c48e762f54aaa39ac271f Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 15:16:35 -0400 Subject: [PATCH 4/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index ee4c2bd848f23..8421ab59b9fc9 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -60,7 +60,11 @@ jobs: lint_build: name: yarn lint-build - needs: build + needs: [define_build_params, build] + strategy: + matrix: + bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }} + release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }} runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -75,14 +79,14 @@ jobs: with: path: "**/node_modules" key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile - name: Restore archived build uses: actions/download-artifact@v4 with: + name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} path: build - merge-multiple: true - name: Display structure of build run: ls -R build - - run: yarn install --frozen-lockfile - run: yarn lint-build test_build: @@ -134,6 +138,7 @@ jobs: with: path: "**/node_modules" key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} + - run: yarn install --frozen-lockfile - name: Restore archived build uses: actions/download-artifact@v4 with: @@ -141,6 +146,5 @@ jobs: merge-multiple: true - name: Display structure of build run: ls -R build - - run: yarn install --frozen-lockfile - run: yarn test --build ${{ matrix.test_params }} --ci=github From 8f9c02621f09005c2085981013010cbdcc4978bc Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 15:43:36 -0400 Subject: [PATCH 5/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 8 ++++++-- .../src/__tests__/storeStressTestConcurrent-test.js | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index 8421ab59b9fc9..5889369ee135e 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -26,7 +26,7 @@ jobs: id: define_release_channels with: script: | - return ['stable', 'experimental']; + return ["stable", "experimental"]; build: name: yarn build @@ -51,12 +51,14 @@ jobs: key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - run: yarn install --frozen-lockfile - run: yarn build --b=${{ matrix.bundle_type }} --r=${{ matrix.release_channel }} --ci=github + - name: Display structure of build + run: ls -R build - name: Archive build uses: actions/upload-artifact@v4 with: name: ${{ matrix.bundle_type }}_${{ matrix.release_channel }} path: | - build/** + build lint_build: name: yarn lint-build @@ -65,6 +67,7 @@ jobs: matrix: bundle_type: ${{ fromJSON(needs.define_build_params.outputs.bundle_type) }} release_channel: ${{ fromJSON(needs.define_build_params.outputs.release_channel) }} + continue-on-error: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -124,6 +127,7 @@ jobs: # TODO: Test more persistent configurations? ] + continue-on-error: true runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js b/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js index 472ad31671a76..e7f3c664dc825 100644 --- a/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js +++ b/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js @@ -829,6 +829,8 @@ describe('StoreStressConcurrent', () => { // @reactVersion >= 18.0 it('should handle a stress test for Suspense without type change (Concurrent Mode)', async () => { + jest.setTimeout(15000); + const A = () => 'a'; const B = () => 'b'; const C = () => 'c'; From 06a526c26e38acf0b72cd8f7e209239fd2354db6 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 16:13:04 -0400 Subject: [PATCH 6/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 5 ++--- .../__tests__/storeStressTestConcurrent-test.js | 4 ++-- packages/shared/ReactVersion.js | 16 +--------------- 3 files changed, 5 insertions(+), 20 deletions(-) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index 5889369ee135e..80a8757948e45 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -146,9 +146,8 @@ jobs: - name: Restore archived build uses: actions/download-artifact@v4 with: - path: build - merge-multiple: true + path: build-temp - name: Display structure of build run: ls -R build - - run: yarn test --build ${{ matrix.test_params }} --ci=github + # - run: yarn test --build ${{ matrix.test_params }} --ci=github diff --git a/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js b/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js index e7f3c664dc825..8dd4ce428438f 100644 --- a/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js +++ b/packages/react-devtools-shared/src/__tests__/storeStressTestConcurrent-test.js @@ -16,6 +16,8 @@ describe('StoreStressConcurrent', () => { let store; let print; + jest.setTimeout(15000); + beforeEach(() => { global.IS_REACT_ACT_ENVIRONMENT = true; @@ -829,8 +831,6 @@ describe('StoreStressConcurrent', () => { // @reactVersion >= 18.0 it('should handle a stress test for Suspense without type change (Concurrent Mode)', async () => { - jest.setTimeout(15000); - const A = () => 'a'; const B = () => 'b'; const C = () => 'c'; diff --git a/packages/shared/ReactVersion.js b/packages/shared/ReactVersion.js index 13dd40e747e0d..c215912df2204 100644 --- a/packages/shared/ReactVersion.js +++ b/packages/shared/ReactVersion.js @@ -1,15 +1 @@ -/** - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */ - -// TODO: this is special because it gets imported during build. -// -// It exists as a placeholder so that DevTools can support work tag changes between releases. -// When we next publish a release, update the matching TODO in backend/renderer.js -// TODO: This module is used both by the release scripts and to expose a version -// at runtime. We should instead inject the version number as part of the build -// process, and use the ReactVersions.js module as the single source of truth. -export default '19.0.0'; +export default '19.0.0-rc-3a600d54b3-20240624'; From 8a897de0754fb9188792c596f6b351f6513d4811 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 16:20:58 -0400 Subject: [PATCH 7/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index 80a8757948e45..e57a153832fb4 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -148,6 +148,6 @@ jobs: with: path: build-temp - name: Display structure of build - run: ls -R build + run: ls -R build-temp # - run: yarn test --build ${{ matrix.test_params }} --ci=github From 61606906aad45330a6e9061e2e1eaffc4a60fd10 Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Mon, 24 Jun 2024 16:38:04 -0400 Subject: [PATCH 8/8] Update [ghstack-poisoned] --- .github/workflows/runtime_build.yml | 9 ++++++--- scripts/rollup/stats.js | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index e57a153832fb4..cff4b6a8351e2 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -51,6 +51,8 @@ jobs: key: ${{ runner.arch }}-${{ runner.os }}-modules-${{ hashFiles('yarn.lock') }} - run: yarn install --frozen-lockfile - run: yarn build --b=${{ matrix.bundle_type }} --r=${{ matrix.release_channel }} --ci=github + env: + CI: github - name: Display structure of build run: ls -R build - name: Archive build @@ -146,8 +148,9 @@ jobs: - name: Restore archived build uses: actions/download-artifact@v4 with: - path: build-temp + path: build + merge-multiple: true - name: Display structure of build - run: ls -R build-temp - # - run: yarn test --build ${{ matrix.test_params }} --ci=github + run: ls -R build + - run: yarn test --build ${{ matrix.test_params }} --ci=github diff --git a/scripts/rollup/stats.js b/scripts/rollup/stats.js index 5a5b376c8b1a2..b3fe94ef78eca 100644 --- a/scripts/rollup/stats.js +++ b/scripts/rollup/stats.js @@ -18,7 +18,7 @@ const currentBuildResults = { }; function saveResults() { - if (process.env.CIRCLE_NODE_TOTAL) { + if (process.env.CIRCLE_NODE_TOTAL || process.env.CI === 'github') { // In CI, write the bundle sizes to a subdirectory and append the node index // to the filename. A downstream job will consolidate these into a // single file.