Don't release Miri if its tests only failed on Windows
This commit is contained in:
parent
a3ed564c13
commit
f82315a37e
|
@ -349,6 +349,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
|
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
|
||||||
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
|
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
|
||||||
|
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
|
||||||
os: windows-latest-xl
|
os: windows-latest-xl
|
||||||
- name: i686-mingw-1
|
- name: i686-mingw-1
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -531,6 +531,7 @@ jobs:
|
||||||
env:
|
env:
|
||||||
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
|
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
|
||||||
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json
|
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json
|
||||||
|
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
|
||||||
<<: *job-windows-xl
|
<<: *job-windows-xl
|
||||||
|
|
||||||
# 32/64-bit MinGW builds.
|
# 32/64-bit MinGW builds.
|
||||||
|
|
|
@ -257,21 +257,20 @@ impl Builder {
|
||||||
/// If a tool does not pass its tests, don't ship it.
|
/// If a tool does not pass its tests, don't ship it.
|
||||||
/// Right now, we do this only for Miri.
|
/// Right now, we do this only for Miri.
|
||||||
fn check_toolstate(&mut self) {
|
fn check_toolstate(&mut self) {
|
||||||
let toolstates: Option<HashMap<String, String>> =
|
for file in &["toolstates-linux.json", "toolstates-windows.json"] {
|
||||||
File::open(self.input.join("toolstates-linux.json"))
|
let toolstates: Option<HashMap<String, String>> = File::open(self.input.join(file))
|
||||||
.ok()
|
.ok()
|
||||||
.and_then(|f| serde_json::from_reader(&f).ok());
|
.and_then(|f| serde_json::from_reader(&f).ok());
|
||||||
let toolstates = toolstates.unwrap_or_else(|| {
|
let toolstates = toolstates.unwrap_or_else(|| {
|
||||||
println!(
|
println!("WARNING: `{}` missing/malformed; assuming all tools failed", file);
|
||||||
"WARNING: `toolstates-linux.json` missing/malformed; \
|
HashMap::default() // Use empty map if anything went wrong.
|
||||||
assuming all tools failed"
|
});
|
||||||
);
|
// Mark some tools as missing based on toolstate.
|
||||||
HashMap::default() // Use empty map if anything went wrong.
|
if toolstates.get("miri").map(|s| &*s as &str) != Some("test-pass") {
|
||||||
});
|
println!("Miri tests are not passing, removing component");
|
||||||
// Mark some tools as missing based on toolstate.
|
self.versions.disable_version(&PkgType::Miri);
|
||||||
if toolstates.get("miri").map(|s| &*s as &str) != Some("test-pass") {
|
break;
|
||||||
println!("Miri tests are not passing, removing component");
|
}
|
||||||
self.versions.disable_version(&PkgType::Miri);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue