Unverified Commit 9a6ae144 authored by JJ Kasper's avatar JJ Kasper Committed by GitHub

Update swc runners config (#53939)

This fixes unexpected cache hits occurring causing latest next-swc
changes to not be built for the docker based builds. Noticed in our
turbo run summaries for these builds that no input files were detected
most likely due to older Node.js/pnpm versions being used from the old
Docker image.

This also updates to leverage new runner labels for better build perf
cutting build times down from over an hour down to around 20 min.

Fixes build issue on aarch64-linux-musl due to `TurboMalloc` not being
able to resolve. Test build done here
https://github.com/vercel/next.js/actions/runs/5850893681/job/15860929304

x-ref:
https://github.com/vercel/next.js/actions/runs/5843580924/job/15845848384

x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833506858
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833506925
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833507067
x-ref:
https://github.com/vercel/next.js/actions/runs/5837652747/job/15833507135
parent 261db496
This diff is collapsed.
......@@ -39,12 +39,11 @@ use next_core::{
use owo_colors::OwoColorize;
use tracing_subscriber::{prelude::*, EnvFilter, Registry};
use turbo_tasks::{
util::{FormatBytes, FormatDuration},
StatsType, TransientInstance, TurboTasks, TurboTasksBackendApi, UpdateInfo, Value, Vc,
util::FormatDuration, StatsType, TransientInstance, TurboTasks, TurboTasksBackendApi,
UpdateInfo, Value, Vc,
};
use turbopack_binding::{
turbo::{
malloc::TurboMalloc,
tasks_env::{CustomProcessEnv, ProcessEnv},
tasks_fs::{DiskFileSystem, FileSystem},
tasks_memory::MemoryBackend,
......@@ -591,10 +590,9 @@ pub async fn start_server(options: &DevServerOptions) -> Result<()> {
let stats_future = async move {
if options.log_detail {
println!(
"{event_type} - startup {start} ({memory})",
"{event_type} - startup {start}",
event_type = "event".purple(),
start = FormatDuration(start.elapsed()),
memory = FormatBytes(TurboMalloc::memory_usage())
);
}
......@@ -616,20 +614,18 @@ pub async fn start_server(options: &DevServerOptions) -> Result<()> {
match (options.log_detail, !reasons.is_empty()) {
(true, true) => {
println!(
"\x1b[2K{event_type} - {reasons} {elapsed} ({tasks} tasks, {memory})",
"\x1b[2K{event_type} - {reasons} {elapsed} ({tasks} tasks)",
event_type = "event".purple(),
elapsed = FormatDuration(elapsed),
tasks = count,
memory = FormatBytes(TurboMalloc::memory_usage())
);
}
(true, false) => {
println!(
"\x1b[2K{event_type} - compilation {elapsed} ({tasks} tasks, {memory})",
"\x1b[2K{event_type} - compilation {elapsed} ({tasks} tasks)",
event_type = "event".purple(),
elapsed = FormatDuration(elapsed),
tasks = count,
memory = FormatBytes(TurboMalloc::memory_usage())
);
}
(false, true) => {
......@@ -651,18 +647,10 @@ pub async fn start_server(options: &DevServerOptions) -> Result<()> {
}
} else {
progress_counter += 1;
if options.log_detail {
print!(
"\x1b[2K{event_type} - {progress_counter}s... ({memory})\r",
event_type = "event".purple(),
memory = FormatBytes(TurboMalloc::memory_usage())
);
} else {
print!(
"\x1b[2K{event_type} - {progress_counter}s...\r",
event_type = "event".purple(),
);
}
print!(
"\x1b[2K{event_type} - {progress_counter}s...\r",
event_type = "event".purple(),
);
let _ = stdout().lock().flush();
}
}
......
......@@ -31,7 +31,7 @@
}
},
"devDependencies": {
"@napi-rs/cli": "2.14.7",
"@napi-rs/cli": "2.16.2",
"cross-env": "6.0.3"
}
}
......@@ -135,7 +135,7 @@
"@hapi/accept": "5.0.2",
"@jest/transform": "29.5.0",
"@jest/types": "29.5.0",
"@napi-rs/cli": "2.14.7",
"@napi-rs/cli": "2.16.2",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.4.14-canary.3",
"@next/polyfill-nomodule": "13.4.14-canary.3",
......
......@@ -815,8 +815,8 @@ importers:
specifier: 29.5.0
version: 29.5.0
'@napi-rs/cli':
specifier: 2.14.7
version: 2.14.7
specifier: 2.16.2
version: 2.16.2
'@napi-rs/triples':
specifier: 1.1.0
version: 1.1.0
......@@ -1410,8 +1410,8 @@ importers:
packages/next-swc:
devDependencies:
'@napi-rs/cli':
specifier: 2.14.7
version: 2.14.7
specifier: 2.16.2
version: 2.16.2
cross-env:
specifier: 6.0.3
version: 6.0.3
......@@ -6649,8 +6649,8 @@ packages:
'@types/react': 18.2.7
react: 18.2.0
/@napi-rs/cli@2.14.7:
resolution: {integrity: sha512-H+YCgdbBNMWn8c878C3RsRYcMxamWI7rB0H+1TqOy9n6u31isikcRyW1VDyoNHp7ApfmzV0+tpPopVi0W7WHAA==}
/@napi-rs/cli@2.16.2:
resolution: {integrity: sha512-U2aZfnr0s9KkXpZlYC0l5WxWCXL7vJUNpCnWMwq3T9GG9rhYAAUM9CTZsi1Z+0iR2LcHbfq9EfMgoqnuTyUjfg==}
engines: {node: '>= 10'}
hasBin: true
dev: true
......
......@@ -6,7 +6,9 @@
"../../.cargo/**",
"../../packages/next-swc/crates/**",
"../../**/Cargo.toml",
"../../**/Cargo.lock"
"../../**/Cargo.lock",
"../../.github/workflows/build_and_deploy.yml",
"../../rust-toolchain"
],
"dependsOn": ["^build-native"],
"outputs": ["native/*.node"]
......@@ -16,7 +18,9 @@
"../../.cargo/**",
"../../packages/next-swc/crates/**",
"../../**/Cargo.toml",
"../../**/Cargo.lock"
"../../**/Cargo.lock",
"../../.github/workflows/build_and_deploy.yml",
"../../rust-toolchain"
],
"dependsOn": ["^build-native-release"],
"outputs": ["native/*.node"]
......@@ -26,7 +30,9 @@
"../../.cargo/**",
"../../packages/next-swc/crates/**",
"../../**/Cargo.toml",
"../../**/Cargo.lock"
"../../**/Cargo.lock",
"../../.github/workflows/build_and_deploy.yml",
"../../rust-toolchain"
],
"dependsOn": ["^build-native-no-plugin"],
"outputs": ["native/*.node"]
......@@ -36,7 +42,9 @@
"../../.cargo/**",
"../../packages/next-swc/crates/**",
"../../**/Cargo.toml",
"../../**/Cargo.lock"
"../../**/Cargo.lock",
"../../.github/workflows/build_and_deploy.yml",
"../../rust-toolchain"
],
"dependsOn": ["^build-native-no-plugin-woa"],
"outputs": ["native/*.node"]
......@@ -46,7 +54,9 @@
"../../.cargo/**",
"../../packages/next-swc/crates/**",
"../../**/Cargo.toml",
"../../**/Cargo.lock"
"../../**/Cargo.lock",
"../../.github/workflows/build_and_deploy.yml",
"../../rust-toolchain"
],
"dependsOn": ["^build-native-no-plugin-woa-release"],
"outputs": ["native/*.node"]
......@@ -56,7 +66,9 @@
"../../.cargo/**",
"../../packages/next-swc/crates/**",
"../../**/Cargo.toml",
"../../**/Cargo.lock"
"../../**/Cargo.lock",
"../../.github/workflows/build_and_deploy.yml",
"../../rust-toolchain"
],
"dependsOn": ["^build-wasm"],
"outputs": ["crates/wasm/pkg/*"]
......
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