Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion suite/scripts/variations/build-cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ hyperfine --ignore-failure \
${BENCH_INCLUDE_AUBE:+--command-name="aube" "$BENCH_COMMAND_AUBE"} \
${BENCH_INCLUDE_UPM:+--prepare="$BENCH_INSTALL_PREPARE_UPM || true; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output; $BENCH_WARM_BUILD_UPM || true"} \
${BENCH_INCLUDE_UPM:+--command-name="upm" "$BENCH_COMMAND_UPM"} \
${BENCH_INCLUDE_NX:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output; $BENCH_WARM_BUILD_NX || true"} \
${BENCH_INCLUDE_NX:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true; $BENCH_SETUP_NX; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output; $BENCH_WARM_BUILD_NX || true"} \
${BENCH_INCLUDE_NX:+--command-name="nx" "$BENCH_COMMAND_NX"} \
${BENCH_INCLUDE_TURBO:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output; $BENCH_WARM_BUILD_TURBO || true"} \
${BENCH_INCLUDE_TURBO:+--command-name="turbo" "$BENCH_COMMAND_TURBO"} \
Expand Down
2 changes: 1 addition & 1 deletion suite/scripts/variations/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ hyperfine --ignore-failure \
${BENCH_INCLUDE_AUBE:+--command-name="aube" "$BENCH_COMMAND_AUBE"} \
${BENCH_INCLUDE_UPM:+--prepare="$BENCH_INSTALL_PREPARE_UPM || true; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output"} \
${BENCH_INCLUDE_UPM:+--command-name="upm" "$BENCH_COMMAND_UPM"} \
${BENCH_INCLUDE_NX:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output"} \
${BENCH_INCLUDE_NX:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true; $BENCH_SETUP_NX; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output"} \
${BENCH_INCLUDE_NX:+--command-name="nx" "$BENCH_COMMAND_NX"} \
${BENCH_INCLUDE_TURBO:+--prepare="$BENCH_INSTALL_PREPARE_NPM || true; bash $BENCH_SCRIPTS/clean-helpers.sh clean_build_output"} \
${BENCH_INCLUDE_TURBO:+--command-name="turbo" "$BENCH_COMMAND_TURBO"} \
Expand Down
10 changes: 9 additions & 1 deletion suite/scripts/variations/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,15 @@ BENCH_SETUP_BUN=""
BENCH_SETUP_DENO=""
BENCH_SETUP_AUBE="npm pkg delete packageManager >/dev/null 2>&1 || true"
BENCH_SETUP_UPM=""
BENCH_SETUP_NX=""
# nx needs a local copy of itself and an Nx workspace; a global nx alone fails
# with "isn't part of an Nx workspace" / "Could not find Nx modules". The next
# fixture has neither, and adding nx as a devDependency would change what every
# install variation on next measures. So the nx build prepares install the same
# nx version as the global one (setup.sh) without saving it, and mark
# package.json as a workspace. Cleanup restores package.json (git checkout) and
# removes node_modules.
BENCH_NX_VERSION="$(node -p "require('$(npm root -g)/nx/package.json').version" 2>/dev/null || echo latest)"
BENCH_SETUP_NX="npm install --no-save --no-audit --no-fund --ignore-scripts --silent nx@$BENCH_NX_VERSION && npm pkg set nx='{}' --json"
BENCH_SETUP_TURBO=""
# vp install delegates to Yarn 4, so it needs the same yarn.lock as berry above.
BENCH_SETUP_VP="touch yarn.lock"
Expand Down