Skip to content

Commit f82315a

Browse files
author
hyd-dev
committed
Don't release Miri if its tests only failed on Windows
1 parent a3ed564 commit f82315a

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,7 @@ jobs:
349349
env:
350350
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
351351
RUST_CONFIGURE_ARGS: "--build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json"
352+
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
352353
os: windows-latest-xl
353354
- name: i686-mingw-1
354355
env:

src/ci/github-actions/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ jobs:
531531
env:
532532
SCRIPT: src/ci/docker/host-x86_64/x86_64-gnu-tools/checktools.sh x.py /tmp/toolstate/toolstates.json windows
533533
RUST_CONFIGURE_ARGS: --build=x86_64-pc-windows-msvc --save-toolstates=/tmp/toolstate/toolstates.json
534+
DEPLOY_TOOLSTATES_JSON: toolstates-windows.json
534535
<<: *job-windows-xl
535536

536537
# 32/64-bit MinGW builds.

src/tools/build-manifest/src/main.rs

+12-13
Original file line numberDiff line numberDiff line change
@@ -257,21 +257,20 @@ impl Builder {
257257
/// If a tool does not pass its tests, don't ship it.
258258
/// Right now, we do this only for Miri.
259259
fn check_toolstate(&mut self) {
260-
let toolstates: Option<HashMap<String, String>> =
261-
File::open(self.input.join("toolstates-linux.json"))
260+
for file in &["toolstates-linux.json", "toolstates-windows.json"] {
261+
let toolstates: Option<HashMap<String, String>> = File::open(self.input.join(file))
262262
.ok()
263263
.and_then(|f| serde_json::from_reader(&f).ok());
264-
let toolstates = toolstates.unwrap_or_else(|| {
265-
println!(
266-
"WARNING: `toolstates-linux.json` missing/malformed; \
267-
assuming all tools failed"
268-
);
269-
HashMap::default() // Use empty map if anything went wrong.
270-
});
271-
// Mark some tools as missing based on toolstate.
272-
if toolstates.get("miri").map(|s| &*s as &str) != Some("test-pass") {
273-
println!("Miri tests are not passing, removing component");
274-
self.versions.disable_version(&PkgType::Miri);
264+
let toolstates = toolstates.unwrap_or_else(|| {
265+
println!("WARNING: `{}` missing/malformed; assuming all tools failed", file);
266+
HashMap::default() // Use empty map if anything went wrong.
267+
});
268+
// Mark some tools as missing based on toolstate.
269+
if toolstates.get("miri").map(|s| &*s as &str) != Some("test-pass") {
270+
println!("Miri tests are not passing, removing component");
271+
self.versions.disable_version(&PkgType::Miri);
272+
break;
273+
}
275274
}
276275
}
277276

0 commit comments

Comments
 (0)