Don't release Miri if its tests only failed on Windows
This commit is contained in:
parent
a3ed564c13
commit
f82315a37e
3 changed files with 14 additions and 13 deletions
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
|
@ -349,6 +349,7 @@ jobs:
|
|||
env:
|
||||
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"
|
||||
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
|
||||
os: windows-latest-xl
|
||||
- name: i686-mingw-1
|
||||
env:
|
||||
|
|
|
@ -531,6 +531,7 @@ jobs:
|
|||
env:
|
||||
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
|
||||
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
|
||||
<<: *job-windows-xl
|
||||
|
||||
# 32/64-bit MinGW builds.
|
||||
|
|
|
@ -257,21 +257,20 @@ impl Builder {
|
|||
/// If a tool does not pass its tests, don't ship it.
|
||||
/// Right now, we do this only for Miri.
|
||||
fn check_toolstate(&mut self) {
|
||||
let toolstates: Option<HashMap<String, String>> =
|
||||
File::open(self.input.join("toolstates-linux.json"))
|
||||
for file in &["toolstates-linux.json", "toolstates-windows.json"] {
|
||||
let toolstates: Option<HashMap<String, String>> = File::open(self.input.join(file))
|
||||
.ok()
|
||||
.and_then(|f| serde_json::from_reader(&f).ok());
|
||||
let toolstates = toolstates.unwrap_or_else(|| {
|
||||
println!(
|
||||
"WARNING: `toolstates-linux.json` missing/malformed; \
|
||||
assuming all tools failed"
|
||||
);
|
||||
HashMap::default() // Use empty map if anything went wrong.
|
||||
});
|
||||
// Mark some tools as missing based on toolstate.
|
||||
if toolstates.get("miri").map(|s| &*s as &str) != Some("test-pass") {
|
||||
println!("Miri tests are not passing, removing component");
|
||||
self.versions.disable_version(&PkgType::Miri);
|
||||
let toolstates = toolstates.unwrap_or_else(|| {
|
||||
println!("WARNING: `{}` missing/malformed; assuming all tools failed", file);
|
||||
HashMap::default() // Use empty map if anything went wrong.
|
||||
});
|
||||
// Mark some tools as missing based on toolstate.
|
||||
if toolstates.get("miri").map(|s| &*s as &str) != Some("test-pass") {
|
||||
println!("Miri tests are not passing, removing component");
|
||||
self.versions.disable_version(&PkgType::Miri);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue