diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index 4f7ddae83b0f..48b4c4b371d4 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -298,7 +298,7 @@ jobs: echo "Rustc binary: $(file $(which rustc) || echo 'not found')" rustc --version --verbose || true node -v - npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" + pnpm install --frozen-lockfile --filter @next/swc TURBO_CACHE_FLAG="${NEXT_SKIP_BUILD_CACHE:+--force}" pnpm dlx turbo@${TURBO_VERSION} run ${{ matrix.build_task }} ${TURBO_ARGS} ${TURBO_CACHE_FLAG} -- --target ${{ matrix.target }} if [ "${{ matrix.os }}" != "windows" ]; then diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml index 7b4457a8039c..b16a96b68769 100644 --- a/.github/workflows/build_and_test.yml +++ b/.github/workflows/build_and_test.yml @@ -69,6 +69,7 @@ jobs: needs: ['changes'] if: ${{ needs.changes.outputs.docs-only == 'false' }} with: + needsRust: 'yes' skipInstallBuild: 'yes' stepName: 'build-native' uploadNativeArtifact: 'next-swc-linux' @@ -80,6 +81,7 @@ jobs: needs: ['changes'] if: ${{ needs.changes.outputs.docs-only == 'false' }} with: + needsRust: 'yes' skipInstallBuild: 'yes' stepName: 'build-native-windows' runs_on_labels: '["windows","self-hosted","x64"]' diff --git a/.github/workflows/build_reusable.yml b/.github/workflows/build_reusable.yml index 8dd4cc443d01..466d33e2900a 100644 --- a/.github/workflows/build_reusable.yml +++ b/.github/workflows/build_reusable.yml @@ -97,7 +97,6 @@ on: type: string default: 'chromium' env: - NAPI_CLI_VERSION: 2.18.4 TURBO_VERSION: 2.9.4 TURBO_ARGS: '-v --env-mode loose --remote-cache-timeout 300 --log-order stream' NODE_LTS_VERSION: 20.9.0 @@ -252,7 +251,7 @@ jobs: - run: rustc --version if: ${{ (inputs.uploadNativeArtifact != '') || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }} - - run: corepack prepare --activate yarn@1.22.19 && npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" + - run: corepack prepare --activate yarn@1.22.19 # clean up any previous artifacts to avoid hitting disk space limits - run: git clean -xdf && rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-* /tmp/yarn-* /tmp/ncc-cache target @@ -304,9 +303,13 @@ jobs: - run: git checkout . if: ${{ inputs.skipInstallBuild != 'yes' }} - - run: pnpm install + - run: pnpm install --frozen-lockfile if: ${{ inputs.skipInstallBuild != 'yes' }} + # run a minimal install to make sure we pick up the napi CLI + - run: pnpm install --frozen-lockfile --ignore-scripts --filter @next/swc + if: ${{ inputs.skipInstallBuild == 'yes' && inputs.needsRust == 'yes' }} + - name: Install node-file-trace test dependencies if: ${{ inputs.needsNextest == 'yes' }} working-directory: turbopack/crates/turbopack-tracing/tests/node-file-trace