Commit 92ff58eb authored by Benjamin Woodruff's avatar Benjamin Woodruff

CI: Remove `pnpm dlx`/`npx` from CI workflows

parent b7fd578c
...@@ -19,7 +19,6 @@ concurrency: ...@@ -19,7 +19,6 @@ concurrency:
env: env:
NAPI_CLI_VERSION: 2.18.4 NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
# --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default # --env-mode loose is a breaking change required with turbo 2.x since Strict mode is now the default
# TODO: we should add the relevant envs later to to switch to strict mode # TODO: we should add the relevant envs later to to switch to strict mode
TURBO_ARGS: '-v --env-mode loose --remote-cache-timeout 90 --summarize --log-order stream' TURBO_ARGS: '-v --env-mode loose --remote-cache-timeout 90 --summarize --log-order stream'
...@@ -256,7 +255,7 @@ jobs: ...@@ -256,7 +255,7 @@ jobs:
# Try to restore previously-built native binary from turbo cache # Try to restore previously-built native binary from turbo cache
- name: pull build cache - name: pull build cache
if: ${{ matrix.docker }} if: ${{ matrix.docker }}
run: TURBO_VERSION=${TURBO_VERSION} node ./scripts/pull-turbo-cache.js ${{ matrix.target }} run: ./scripts/pull-turbo-cache.js ${{ matrix.target }}
- name: check build exists - name: check build exists
if: ${{ matrix.docker }} if: ${{ matrix.docker }}
...@@ -269,7 +268,7 @@ jobs: ...@@ -269,7 +268,7 @@ jobs:
docker run --rm \ docker run --rm \
-e CI -e RUST_BACKTRACE -e CARGO_TERM_COLOR \ -e CI -e RUST_BACKTRACE -e CARGO_TERM_COLOR \
-e CARGO_INCREMENTAL=0 -e CARGO_REGISTRIES_CRATES_IO_PROTOCOL -e TURBO_API \ -e CARGO_INCREMENTAL=0 -e CARGO_REGISTRIES_CRATES_IO_PROTOCOL -e TURBO_API \
-e TURBO_TEAM -e TURBO_TOKEN -e TURBO_VERSION -e TURBO_CACHE="remote:rw" \ -e TURBO_TEAM -e TURBO_TOKEN -e TURBO_CACHE="remote:rw" \
-e TARGET="${{ matrix.target }}" \ -e TARGET="${{ matrix.target }}" \
-e ABI="${{ matrix.abi }}" \ -e ABI="${{ matrix.abi }}" \
-e ARCH="${{ matrix.arch }}" \ -e ARCH="${{ matrix.arch }}" \
...@@ -284,7 +283,7 @@ jobs: ...@@ -284,7 +283,7 @@ jobs:
- name: cache build - name: cache build
if: ${{ matrix.docker && steps.build-exists.outputs.BUILD_EXISTS == 'no' }} if: ${{ matrix.docker && steps.build-exists.outputs.BUILD_EXISTS == 'no' }}
run: pnpm dlx turbo@${TURBO_VERSION} run cache-build-native --force -- ${{ matrix.target }} run: pnpm exec turbo run cache-build-native --force -- ${{ matrix.target }}
- name: 'Build' - name: 'Build'
if: ${{ !matrix.docker }} if: ${{ !matrix.docker }}
...@@ -299,7 +298,7 @@ jobs: ...@@ -299,7 +298,7 @@ jobs:
rustc --version --verbose || true rustc --version --verbose || true
node -v node -v
npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}" npm i -g "@napi-rs/cli@${NAPI_CLI_VERSION}"
pnpm dlx turbo@${TURBO_VERSION} run ${{ matrix.build_task }} ${TURBO_ARGS} -- --target ${{ matrix.target }} pnpm exec turbo run ${{ matrix.build_task }} ${TURBO_ARGS} -- --target ${{ matrix.target }}
if [ "${{ matrix.os }}" != "windows" ]; then if [ "${{ matrix.os }}" != "windows" ]; then
strip -x packages/next-swc/native/next-swc.*.node strip -x packages/next-swc/native/next-swc.*.node
fi fi
...@@ -390,7 +389,7 @@ jobs: ...@@ -390,7 +389,7 @@ jobs:
run: node scripts/normalize-version-bump.js run: node scripts/normalize-version-bump.js
- name: Build - name: Build
run: pnpm dlx turbo@${TURBO_VERSION} run build-wasm ${TURBO_ARGS} -- --target ${{ matrix.target }} run: pnpm exec turbo run build-wasm ${TURBO_ARGS} -- --target ${{ matrix.target }}
- name: Add target to folder name - name: Add target to folder name
run: '[[ -d "crates/wasm/pkg" ]] && mv crates/wasm/pkg crates/wasm/pkg-${{ matrix.target }} || ls crates/wasm' run: '[[ -d "crates/wasm/pkg" ]] && mv crates/wasm/pkg crates/wasm/pkg-${{ matrix.target }} || ls crates/wasm'
...@@ -553,7 +552,7 @@ jobs: ...@@ -553,7 +552,7 @@ jobs:
- run: pnpm install --frozen-lockfile - run: pnpm install --frozen-lockfile
- name: Build packages - name: Build packages
run: pnpx turbo@canary run build --only --filter='./turbopack/packages/*' run: pnpm exec turbo run build --only --filter='./turbopack/packages/*'
- name: Write NPM_TOKEN - name: Write NPM_TOKEN
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN_ELEVATED}" > ~/.npmrc run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN_ELEVATED}" > ~/.npmrc
......
...@@ -192,7 +192,7 @@ jobs: ...@@ -192,7 +192,7 @@ jobs:
needsRust: 'yes' needsRust: 'yes'
needsNextest: 'yes' needsNextest: 'yes'
skipNativeBuild: 'yes' skipNativeBuild: 'yes'
afterBuild: pnpm dlx turbo@${TURBO_VERSION} run test-cargo-unit --remote-cache-timeout 60 --log-order stream afterBuild: pnpm exec turbo run test-cargo-unit --remote-cache-timeout 60 --log-order stream
stepName: 'test-cargo-unit' stepName: 'test-cargo-unit'
secrets: inherit secrets: inherit
...@@ -214,7 +214,7 @@ jobs: ...@@ -214,7 +214,7 @@ jobs:
needsRust: 'yes' needsRust: 'yes'
skipInstallBuild: 'yes' skipInstallBuild: 'yes'
skipNativeBuild: 'yes' skipNativeBuild: 'yes'
afterBuild: pnpm dlx turbo@${TURBO_VERSION} run rust-check afterBuild: pnpm exec turbo run rust-check
stepName: 'rust-check' stepName: 'rust-check'
secrets: inherit secrets: inherit
...@@ -602,7 +602,7 @@ jobs: ...@@ -602,7 +602,7 @@ jobs:
afterBuild: | afterBuild: |
rustup target add wasm32-unknown-unknown rustup target add wasm32-unknown-unknown
node ./scripts/normalize-version-bump.js node ./scripts/normalize-version-bump.js
pnpm dlx turbo@${TURBO_VERSION} run build-wasm -- --target nodejs pnpm exec turbo run build-wasm -- --target nodejs
git checkout . git checkout .
export NEXT_TEST_MODE=start export NEXT_TEST_MODE=start
...@@ -630,7 +630,7 @@ jobs: ...@@ -630,7 +630,7 @@ jobs:
skipNativeInstall: 'yes' skipNativeInstall: 'yes'
afterBuild: | afterBuild: |
rustup target add wasm32-wasip1-threads rustup target add wasm32-wasip1-threads
pnpm dlx turbo@${TURBO_VERSION} run build-native-wasi pnpm exec turbo run build-native-wasi
stepName: 'test-next-napi-bindings-wasi' stepName: 'test-next-napi-bindings-wasi'
secrets: inherit secrets: inherit
......
...@@ -92,7 +92,6 @@ on: ...@@ -92,7 +92,6 @@ on:
default: 'chromium' default: 'chromium'
env: env:
NAPI_CLI_VERSION: 2.18.4 NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20.9.0 NODE_LTS_VERSION: 20.9.0
# run-tests.js reads `TEST_CONCURRENCY` if no explicit `--concurrency` or `-c` # run-tests.js reads `TEST_CONCURRENCY` if no explicit `--concurrency` or `-c`
# argument is provided # argument is provided
...@@ -267,7 +266,7 @@ jobs: ...@@ -267,7 +266,7 @@ jobs:
- run: node scripts/normalize-version-bump.js - run: node scripts/normalize-version-bump.js
name: normalize versions name: normalize versions
- run: pnpm dlx turbo@${TURBO_VERSION} run build-native-${{ inputs.rustBuildProfile }} -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }} - run: pnpm exec turbo run build-native-${{ inputs.rustBuildProfile }} -v --env-mode loose --remote-cache-timeout 90 --summarize -- --target ${{ inputs.buildNativeTarget }}
if: ${{ inputs.skipNativeBuild != 'yes' }} if: ${{ inputs.skipNativeBuild != 'yes' }}
- name: Upload next-swc artifact - name: Upload next-swc artifact
...@@ -312,7 +311,7 @@ jobs: ...@@ -312,7 +311,7 @@ jobs:
- name: Fetch test timings via turbo - name: Fetch test timings via turbo
if: ${{ inputs.testTimingsArtifact == '' }} if: ${{ inputs.testTimingsArtifact == '' }}
run: pnpm dlx turbo@${TURBO_VERSION} run get-test-timings -- --build ${{ github.sha }} run: pnpm exec turbo run get-test-timings -- --build ${{ github.sha }}
- run: ${{ inputs.afterBuild }} - run: ${{ inputs.afterBuild }}
# defaults.run.shell sets a stronger options (`-leo pipefail`) # defaults.run.shell sets a stronger options (`-leo pipefail`)
......
...@@ -17,7 +17,6 @@ name: Code Freeze ...@@ -17,7 +17,6 @@ name: Code Freeze
env: env:
NAPI_CLI_VERSION: 2.18.4 NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20 NODE_LTS_VERSION: 20
jobs: jobs:
......
...@@ -19,7 +19,6 @@ name: Create Release Branch ...@@ -19,7 +19,6 @@ name: Create Release Branch
env: env:
NAPI_CLI_VERSION: 2.18.4 NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20 NODE_LTS_VERSION: 20
jobs: jobs:
......
...@@ -14,7 +14,6 @@ concurrency: ...@@ -14,7 +14,6 @@ concurrency:
env: env:
NAPI_CLI_VERSION: 2.18.4 NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20 NODE_LTS_VERSION: 20
TEST_CONCURRENCY: 6 TEST_CONCURRENCY: 6
......
...@@ -32,7 +32,6 @@ name: Trigger Release ...@@ -32,7 +32,6 @@ name: Trigger Release
env: env:
NAPI_CLI_VERSION: 2.18.4 NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20 NODE_LTS_VERSION: 20
jobs: jobs:
......
...@@ -51,7 +51,7 @@ const env = { ...@@ -51,7 +51,7 @@ const env = {
} }
try { try {
execSync('npx taskr next_bundle_dev_server', { execSync('pnpm exec taskr next_bundle_dev_server', {
cwd: nextDir, cwd: nextDir,
stdio: verbose ? 'inherit' : 'pipe', stdio: verbose ? 'inherit' : 'pipe',
env, env,
......
...@@ -202,7 +202,7 @@ function setBundled(useBundled) { ...@@ -202,7 +202,7 @@ function setBundled(useBundled) {
fs.writeFileSync(cliSource, newContent) fs.writeFileSync(cliSource, newContent)
// Rebuild CLI // Rebuild CLI
console.log(`Rebuilding CLI (${useBundled ? 'bundled' : 'unbundled'})...`) console.log(`Rebuilding CLI (${useBundled ? 'bundled' : 'unbundled'})...`)
execSync('npx taskr cli', { cwd: nextDir, stdio: 'ignore' }) execSync('pnpm exec taskr cli', { cwd: nextDir, stdio: 'ignore' })
} }
} }
......
...@@ -72,7 +72,7 @@ async function runWithRetry(command, maxAttempts) { ...@@ -72,7 +72,7 @@ async function runWithRetry(command, maxAttempts) {
;(async function () { ;(async function () {
const target = process.argv[process.argv.length - 1] const target = process.argv[process.argv.length - 1]
const turboCommand = `pnpm dlx turbo@${process.env.TURBO_VERSION || 'latest'}` const turboCommand = `pnpm exec turbo`
// First, do a dry run to check cache status // First, do a dry run to check cache status
const { code, signal, output } = await runCommand( const { code, signal, output } = await runCommand(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment