Compare commits

...

3 Commits

Author SHA1 Message Date
13c44daf9a deb: allow use parallel building
All checks were successful
CI / build (push) Successful in 10m29s
2026-01-26 10:31:58 +01:00
dfd197415f unshare: fix device creation code 2026-01-26 10:26:16 +01:00
73a61042e8 deb: disable gcc-15 test for CI 2026-01-26 10:25:53 +01:00
3 changed files with 26 additions and 1 deletions

View File

@@ -208,7 +208,7 @@ impl UnshareDriver {
}
cmd.arg("--").arg("bash").arg("-c").arg(format!(
"mount -t proc proc /proc; mount -t devpts devpts /dev/pts; mount --bind /dev/pts/ptmx /dev/ptmx; {} {}",
"mount -t proc proc /proc; mkdir /dev/pts; mount -t devpts devpts /dev/pts; touch /dev/ptmx; mount --bind /dev/pts/ptmx /dev/ptmx; {} {}",
program,
args.join(" ")
));

View File

@@ -24,6 +24,26 @@ pub fn build(
let ctx = context::current();
// Parallel building: find local number of cores, and use that
let num_cores = ctx
.command("nproc")
.output()
.map(|output| {
if output.status.success() {
String::from_utf8_lossy(&output.stdout)
.trim()
.parse::<usize>()
.unwrap_or(1)
} else {
1 // Default to 1 if nproc fails
}
})
.unwrap_or(1); // Default to 1 if we can't execute the command
env.insert(
"DEB_BUILD_OPTIONS".to_string(),
format!("parallel={}", num_cores),
);
if cross {
log::debug!("Setting up environment for local cross build...");
cross::setup_environment(&mut env, arch)?;

View File

@@ -277,6 +277,11 @@ mod tests {
/// The GCC package is complex and hard to build, with specific stages
/// and system-bound scripts. Building it requires specific things that
/// we want to ensure are not broken.
/// NOTE: Ideally, we want to run this in CI, but it takes more than 20h
/// to fully build the gcc-15 package on an amd64 builder, which is too
/// much time.
#[ignore]
#[cfg(target_arch = "x86_64")]
#[tokio::test]
#[test_log::test]
#[serial]