diff --git a/.github/actions/install-dependencies/action.yml b/.github/actions/install-dependencies/action.yml index 5f51f918c34b..052da6857343 100644 --- a/.github/actions/install-dependencies/action.yml +++ b/.github/actions/install-dependencies/action.yml @@ -22,7 +22,9 @@ runs: id: cache_dependencies with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ steps.compute_lockfile_hash.outputs.hash }} + key: + ${{ steps.compute_lockfile_hash.outputs.hash }}${{ runner.arch != 'X64' && format('-{0}', runner.arch) || '' + }} - name: Install dependencies if: steps.cache_dependencies.outputs.cache-hit != 'true' diff --git a/.github/actions/restore-cache/action.yml b/.github/actions/restore-cache/action.yml index daa5943f9877..372def6a0a7e 100644 --- a/.github/actions/restore-cache/action.yml +++ b/.github/actions/restore-cache/action.yml @@ -17,7 +17,7 @@ runs: uses: actions/cache/restore@v6.1.0 with: path: ${{ env.CACHED_DEPENDENCY_PATHS }} - key: ${{ inputs.dependency_cache_key }} + key: ${{ inputs.dependency_cache_key }}${{ runner.arch != 'X64' && format('-{0}', runner.arch) || '' }} - name: Restore build artifacts uses: actions/download-artifact@v7 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9c408c806846..847d5bf8b1d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,7 +72,7 @@ jobs: job_build: name: Build needs: job_get_metadata - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm timeout-minutes: 15 if: | needs.job_get_metadata.outputs.changed_any_code == 'true' || @@ -128,7 +128,7 @@ jobs: path: | .nx/cache .nx/workspace-data - key: ${{ env.NX_CACHE_KEY }} + key: ${{ env.NX_CACHE_KEY }}-${{ runner.arch }} - name: Upload build artifacts uses: actions/upload-artifact@v7 @@ -215,7 +215,7 @@ jobs: path: | .nx/cache .nx/workspace-data - key: ${{ env.NX_CACHE_KEY }} + key: ${{ env.NX_CACHE_KEY }}-${{ runner.arch }} - name: Restore caches uses: ./.github/actions/restore-cache @@ -238,7 +238,7 @@ jobs: name: Build bundles needs: [job_get_metadata, job_build] timeout-minutes: 10 - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v7 @@ -254,7 +254,7 @@ jobs: path: | .nx/cache .nx/workspace-data - key: ${{ env.NX_CACHE_KEY }} + key: ${{ env.NX_CACHE_KEY }}-${{ runner.arch }} - name: Restore caches uses: ./.github/actions/restore-cache @@ -292,7 +292,7 @@ jobs: name: Size Check needs: [job_get_metadata, job_build, job_build_bundles] timeout-minutes: 15 - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm if: github.event_name == 'pull_request' || needs.job_get_metadata.outputs.is_base_branch == 'true' || needs.job_get_metadata.outputs.is_release == 'true' @@ -327,7 +327,7 @@ jobs: # inter-package dependencies resolve cleanly. needs: [job_get_metadata, job_build] timeout-minutes: 10 - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v7 @@ -509,7 +509,7 @@ jobs: needs: [job_get_metadata, job_build] if: needs.job_build.outputs.changed_bun == 'true' || github.event_name != 'pull_request' timeout-minutes: 10 - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm strategy: fail-fast: false matrix: @@ -541,7 +541,7 @@ jobs: needs: [job_get_metadata, job_build] if: needs.job_build.outputs.changed_deno == 'true' || github.event_name != 'pull_request' timeout-minutes: 10 - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v7 @@ -569,7 +569,7 @@ jobs: name: Node (${{ matrix.node }}) Unit Tests needs: [job_get_metadata, job_build] timeout-minutes: 10 - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm # Node 27 is an alpha: its ABI and APIs can change, so its failures must not fail the required checks. continue-on-error: ${{ matrix.node == '^27.0.0-0' }} strategy: @@ -776,6 +776,7 @@ jobs: name: Node (${{ matrix.node }}) Integration Tests (${{ matrix.shard }}/3) needs: [job_get_metadata, job_build] if: needs.job_build.outputs.changed_node_integration == 'true' || github.event_name != 'pull_request' + # The tedious suite uses a SQL Server container that requires x86-64. runs-on: ubuntu-24.04 timeout-minutes: 20 # Node 27 is an alpha: its ABI and APIs can change, so its failures must not fail the required checks. @@ -868,7 +869,7 @@ jobs: if: needs.job_get_metadata.outputs.is_release != 'true' && (needs.job_build.outputs.changed_cloudflare_integration == 'true' || github.event_name != 'pull_request') - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm timeout-minutes: 15 strategy: fail-fast: false @@ -881,7 +882,7 @@ jobs: name: Bundler Plugin Integration Tests (Node ${{ matrix.node }}) needs: [job_get_metadata, job_build] if: needs.job_build.outputs.changed_bundler_plugin_integration == 'true' || github.event_name != 'pull_request' - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm timeout-minutes: 15 # Node 27 is an alpha: its ABI and APIs can change, so its failures must not fail the required checks. continue-on-error: ${{ matrix.node == '^27.0.0-0' }} @@ -911,6 +912,7 @@ jobs: name: Bun (${{ matrix.bun }}) Integration Tests (${{ matrix.shard }}/2) needs: [job_get_metadata, job_build] if: needs.job_build.outputs.changed_bun_integration == 'true' || github.event_name != 'pull_request' + # Shared Node suites include the x86-only SQL Server container. runs-on: ubuntu-24.04 timeout-minutes: 15 strategy: @@ -945,6 +947,7 @@ jobs: name: Deno Integration Tests (${{ matrix.shard }}/2) needs: [job_get_metadata, job_build] if: needs.job_build.outputs.changed_deno_integration == 'true' || github.event_name != 'pull_request' + # Shared Node suites include the x86-only SQL Server container. runs-on: ubuntu-24.04 timeout-minutes: 15 strategy: @@ -990,7 +993,7 @@ jobs: always() && needs.job_build.result == 'success' needs: [job_get_metadata, job_build] - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04-arm timeout-minutes: 15 steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) @@ -1007,7 +1010,7 @@ jobs: path: | .nx/cache .nx/workspace-data - key: ${{ env.NX_CACHE_KEY }} + key: ${{ env.NX_CACHE_KEY }}-${{ runner.arch }} - name: Restore caches uses: ./.github/actions/restore-cache