Skip to content

Commit 04da0ff

Browse files
committed
use the new linux-micro image during tests
1 parent 02fe98e commit 04da0ff

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/buildtest/inside_docker.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use std::io::Write;
55
use std::path::Path;
66
use std::process::Command;
77

8-
static DOCKER_IMAGE_TAG: &str = "rustops/crates-build-env";
8+
static DOCKER_IMAGE_TAG: &str = "ghcr.io/rust-lang/crates-build-env/linux-micro";
99
static DOCKER_SOCKET: &str = "/var/run/docker.sock";
1010
static CONTAINER_PREFIX: &str = "/outside";
1111

tests/utils/mod.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
use failure::Error;
22
use log::LevelFilter;
3-
use rustwide::{Workspace, WorkspaceBuilder};
3+
use rustwide::{cmd::SandboxImage, Workspace, WorkspaceBuilder};
44
use std::path::{Path, PathBuf};
55

66
static USER_AGENT: &str = "rustwide-tests (https://github.com/rust-lang/rustwide)";
@@ -22,6 +22,13 @@ pub(crate) fn init_named_workspace(name: &str) -> Result<Workspace, Error> {
2222
builder = builder.running_inside_docker(true);
2323
}
2424

25+
// Use the micro image when running tests on Linux, speeding them up.
26+
if cfg!(target_os = "linux") {
27+
builder = builder.sandbox_image(SandboxImage::remote(
28+
"ghcr.io/rust-lang/crates-build-env/linux-micro",
29+
)?);
30+
}
31+
2532
builder.init()
2633
}
2734

0 commit comments

Comments
 (0)