From ac5b6bf1b90ff12f85b77e48a9adaadef0973fcb Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 26 Aug 2024 15:41:17 +0000 Subject: [PATCH 1/6] ci: Don't fail profiling bindings job on cache miss --- .github/workflows/build.yml | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 516b1d47b624..f776011061af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1416,6 +1416,11 @@ jobs: with: ref: ${{ env.HEAD_COMMIT }} + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + - name: Restore dependency cache uses: actions/cache/restore@v4 id: restore-dependencies @@ -1423,7 +1428,11 @@ jobs: path: ${{ env.CACHED_DEPENDENCY_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} enableCrossOsArchive: true - fail-on-cache-miss: true + + - name: Install dependencies + if: steps.restore-dependencies.outputs.cache-hit != 'true' + run: yarn install --ignore-engines --frozen-lockfile + shell: bash - name: Restore build cache uses: actions/cache/restore@v4 @@ -1432,15 +1441,17 @@ jobs: path: ${{ env.CACHED_BUILD_PATHS }} key: ${{ needs.job_build.outputs.dependency_cache_key }} enableCrossOsArchive: true - fail-on-cache-miss: true + + - name: Build packages + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + if: steps.restore-build.outputs.cache-hit != 'true' + run: yarn build - name: Configure safe directory run: | git config --global --add safe.directory "*" - - name: Install yarn - run: npm i -g yarn@1.22.19 --force - - name: Increase yarn network timeout on Windows if: contains(matrix.os, 'windows') run: yarn config set network-timeout 600000 -g @@ -1452,15 +1463,6 @@ jobs: with: python-version: '3.8.10' - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node }} - - - name: Install Dependencies - if: steps.restore-dependencies.outputs.cache-hit != 'true' - run: yarn install --frozen-lockfile --ignore-engines --ignore-scripts - - name: Setup (arm64| ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }}) if: matrix.arch == 'arm64' && !contains(matrix.container, 'alpine') && matrix.target_platform != 'darwin' run: | From fe06ccfd49b9e283af5484eba96c84e101e8afb3 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Mon, 26 Aug 2024 15:51:10 +0000 Subject: [PATCH 2/6] force to run --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f776011061af..a2c5a87328fa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1263,10 +1263,10 @@ jobs: needs: [job_get_metadata, job_build] # Compiling bindings can be very slow (especially on windows), so only run precompile # Skip precompile unless we are on a release branch as precompile slows down CI times. - if: | - (needs.job_get_metadata.outputs.changed_profiling_node == 'true') || - (needs.job_get_metadata.outputs.is_release == 'true') || - (github.event_name != 'pull_request') + # if: | + # (needs.job_get_metadata.outputs.changed_profiling_node == 'true') || + # (needs.job_get_metadata.outputs.is_release == 'true') || + # (github.event_name != 'pull_request') runs-on: ${{ matrix.os }} container: ${{ matrix.container }} timeout-minutes: 30 From e2442f21367136b4d5ccbbb8b04b5a7c9ab57ecf Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 27 Aug 2024 07:56:49 +0000 Subject: [PATCH 3/6] dont restore build cache and dont build entire monorepo --- .github/workflows/build.yml | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2c5a87328fa..a1661b7cf8ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1434,20 +1434,6 @@ jobs: run: yarn install --ignore-engines --frozen-lockfile shell: bash - - name: Restore build cache - uses: actions/cache/restore@v4 - id: restore-build - with: - path: ${{ env.CACHED_BUILD_PATHS }} - key: ${{ needs.job_build.outputs.dependency_cache_key }} - enableCrossOsArchive: true - - - name: Build packages - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - if: steps.restore-build.outputs.cache-hit != 'true' - run: yarn build - - name: Configure safe directory run: | git config --global --add safe.directory "*" From 242cf8a3956ca73591cf3a5b8b2a09fb8a60f061 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 27 Aug 2024 08:35:44 +0000 Subject: [PATCH 4/6] ? --- .github/workflows/build.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a1661b7cf8ba..4553f3bf6a3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1432,7 +1432,6 @@ jobs: - name: Install dependencies if: steps.restore-dependencies.outputs.cache-hit != 'true' run: yarn install --ignore-engines --frozen-lockfile - shell: bash - name: Configure safe directory run: | From c78f0f5c6f953e455f0bbbdde2d4c715782aec08 Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 27 Aug 2024 08:56:07 +0000 Subject: [PATCH 5/6] help --- .github/workflows/build.yml | 2 ++ dev-packages/browser-integration-tests/package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4553f3bf6a3c..23d67a9449f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1430,6 +1430,8 @@ jobs: enableCrossOsArchive: true - name: Install dependencies + env: + NO_PLAYWRIGHT_BROWSERS: "1" if: steps.restore-dependencies.outputs.cache-hit != 'true' run: yarn install --ignore-engines --frozen-lockfile diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index 2e2e6cab12ab..e25393e88ef8 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -9,7 +9,7 @@ "private": true, "scripts": { "clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp", - "install-browsers": "npx playwright install --with-deps", + "install-browsers": "[[ -z \"$NO_PLAYWRIGHT_BROWSERS\" ]] && yarn install-browsers || echo 'Skipping browser installation'", "lint": "eslint . --format stylish", "fix": "eslint . --format stylish --fix", "type-check": "tsc", From b31fd9b01483a511d129b056853984b13464ab7f Mon Sep 17 00:00:00 2001 From: Luca Forstner Date: Tue, 27 Aug 2024 10:47:37 +0000 Subject: [PATCH 6/6] cleanup --- .github/workflows/build.yml | 10 +++++----- dev-packages/browser-integration-tests/package.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 23d67a9449f2..d427fed7d70f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1263,10 +1263,10 @@ jobs: needs: [job_get_metadata, job_build] # Compiling bindings can be very slow (especially on windows), so only run precompile # Skip precompile unless we are on a release branch as precompile slows down CI times. - # if: | - # (needs.job_get_metadata.outputs.changed_profiling_node == 'true') || - # (needs.job_get_metadata.outputs.is_release == 'true') || - # (github.event_name != 'pull_request') + if: | + (needs.job_get_metadata.outputs.changed_profiling_node == 'true') || + (needs.job_get_metadata.outputs.is_release == 'true') || + (github.event_name != 'pull_request') runs-on: ${{ matrix.os }} container: ${{ matrix.container }} timeout-minutes: 30 @@ -1431,7 +1431,7 @@ jobs: - name: Install dependencies env: - NO_PLAYWRIGHT_BROWSERS: "1" + SKIP_PLAYWRIGHT_BROWSER_INSTALL: "1" if: steps.restore-dependencies.outputs.cache-hit != 'true' run: yarn install --ignore-engines --frozen-lockfile diff --git a/dev-packages/browser-integration-tests/package.json b/dev-packages/browser-integration-tests/package.json index e25393e88ef8..dfd3b78c2c14 100644 --- a/dev-packages/browser-integration-tests/package.json +++ b/dev-packages/browser-integration-tests/package.json @@ -9,7 +9,7 @@ "private": true, "scripts": { "clean": "rimraf -g suites/**/dist loader-suites/**/dist tmp", - "install-browsers": "[[ -z \"$NO_PLAYWRIGHT_BROWSERS\" ]] && yarn install-browsers || echo 'Skipping browser installation'", + "install-browsers": "[[ -z \"$SKIP_PLAYWRIGHT_BROWSER_INSTALL\" ]] && yarn install-browsers || echo 'Skipping browser installation'", "lint": "eslint . --format stylish", "fix": "eslint . --format stylish --fix", "type-check": "tsc",