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:
env:
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
# 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'
......@@ -256,7 +255,7 @@ jobs:
# Try to restore previously-built native binary from turbo cache
- name: pull build cache
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
if: ${{ matrix.docker }}
......@@ -269,7 +268,7 @@ jobs:
docker run --rm \
-e CI -e RUST_BACKTRACE -e CARGO_TERM_COLOR \
-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 ABI="${{ matrix.abi }}" \
-e ARCH="${{ matrix.arch }}" \
......@@ -284,7 +283,7 @@ jobs:
- name: cache build
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'
if: ${{ !matrix.docker }}
......@@ -299,7 +298,7 @@ jobs:
rustc --version --verbose || true
node -v
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
strip -x packages/next-swc/native/next-swc.*.node
fi
......@@ -390,7 +389,7 @@ jobs:
run: node scripts/normalize-version-bump.js
- 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
run: '[[ -d "crates/wasm/pkg" ]] && mv crates/wasm/pkg crates/wasm/pkg-${{ matrix.target }} || ls crates/wasm'
......@@ -553,7 +552,7 @@ jobs:
- run: pnpm install --frozen-lockfile
- 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
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN_ELEVATED}" > ~/.npmrc
......
......@@ -192,7 +192,7 @@ jobs:
needsRust: 'yes'
needsNextest: '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'
secrets: inherit
......@@ -214,7 +214,7 @@ jobs:
needsRust: 'yes'
skipInstallBuild: 'yes'
skipNativeBuild: 'yes'
afterBuild: pnpm dlx turbo@${TURBO_VERSION} run rust-check
afterBuild: pnpm exec turbo run rust-check
stepName: 'rust-check'
secrets: inherit
......@@ -602,7 +602,7 @@ jobs:
afterBuild: |
rustup target add wasm32-unknown-unknown
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 .
export NEXT_TEST_MODE=start
......@@ -630,7 +630,7 @@ jobs:
skipNativeInstall: 'yes'
afterBuild: |
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'
secrets: inherit
......
......@@ -92,7 +92,6 @@ on:
default: 'chromium'
env:
NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20.9.0
# run-tests.js reads `TEST_CONCURRENCY` if no explicit `--concurrency` or `-c`
# argument is provided
......@@ -267,7 +266,7 @@ jobs:
- run: node scripts/normalize-version-bump.js
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' }}
- name: Upload next-swc artifact
......@@ -312,7 +311,7 @@ jobs:
- name: Fetch test timings via turbo
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 }}
# defaults.run.shell sets a stronger options (`-leo pipefail`)
......
......@@ -17,7 +17,6 @@ name: Code Freeze
env:
NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20
jobs:
......
......@@ -19,7 +19,6 @@ name: Create Release Branch
env:
NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20
jobs:
......
......@@ -14,7 +14,6 @@ concurrency:
env:
NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20
TEST_CONCURRENCY: 6
......
......@@ -32,7 +32,6 @@ name: Trigger Release
env:
NAPI_CLI_VERSION: 2.18.4
TURBO_VERSION: 2.9.4
NODE_LTS_VERSION: 20
jobs:
......
......@@ -51,7 +51,7 @@ const env = {
}
try {
execSync('npx taskr next_bundle_dev_server', {
execSync('pnpm exec taskr next_bundle_dev_server', {
cwd: nextDir,
stdio: verbose ? 'inherit' : 'pipe',
env,
......
......@@ -202,7 +202,7 @@ function setBundled(useBundled) {
fs.writeFileSync(cliSource, newContent)
// Rebuild CLI
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) {
;(async function () {
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
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