From bc576bfabec92438dddffe2db60e86d16268198d Mon Sep 17 00:00:00 2001 From: Lauren Tan Date: Fri, 12 Jul 2024 11:21:08 -0400 Subject: [PATCH] [ci] Add process_artifacts_combined job ghstack-source-id: 784640da83c93c49f1d924f8fcb848c7dc7d9e1c Pull Request resolved: https://github.com/facebook/react/pull/30073 --- .github/workflows/runtime_build.yml | 42 +++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/runtime_build.yml b/.github/workflows/runtime_build.yml index 9df8adf177..89eb83ead6 100644 --- a/.github/workflows/runtime_build.yml +++ b/.github/workflows/runtime_build.yml @@ -52,3 +52,45 @@ jobs: name: build_${{ matrix.worker_id }}_${{ matrix.release_channel }} path: | build + + process_artifacts_combined: + name: Process artifacts combined + needs: build_and_lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 18.20.1 + 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') }} + - run: yarn install --frozen-lockfile + - name: Restore archived build + uses: actions/download-artifact@v4 + with: + path: build + merge-multiple: true + - name: Display structure of build + run: ls -R build + - run: echo ${{ github.sha }} >> build/COMMIT_SHA + - name: Scrape warning messages + run: | + mkdir -p ./build/__test_utils__ + node ./scripts/print-warnings/print-warnings.js > build/__test_utils__/ReactAllWarnings.js + # Compress build directory into a single tarball for easy download + - run: tar -zcvf ./build.tgz ./build + # TODO: Migrate scripts to use `build` directory instead of `build2` + - run: cp ./build.tgz ./build2.tgz + - name: Archive build artifacts + uses: actions/upload-artifact@v4 + with: + name: combined_artifacts_${{ github.sha }} + path: | + ./build.tgz + ./build2.tgz