about summary refs log tree commit diff
diff options
context:
space:
mode:
authorhyd-dev <yd-huang@outlook.com>2021-02-03 00:33:42 +0800
committerhyd-dev <yd-huang@outlook.com>2021-02-05 22:44:50 +0800
commitf82315a37e02e8815e09a001779e2843a64f5591 (patch)
tree1e227826cb3bfe85a34e22289994c242b870ac62
parenta3ed564c130ec3f19e933a9ea31faca5a717ce91 (diff)
downloadrust-f82315a37e02e8815e09a001779e2843a64f5591.tar.gz
rust-f82315a37e02e8815e09a001779e2843a64f5591.zip
Don't release Miri if its tests only failed on Windows
-rw-r--r--.github/workflows/ci.yml1
-rw-r--r--src/ci/github-actions/ci.yml1
-rw-r--r--src/tools/build-manifest/src/main.rs25
3 files changed, 14 insertions, 13 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f10b6ca7ea9..13b312afa37 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -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:
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index 9eea6243dfa..5b9b7795c1b 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -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.
diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs
index 73a4cbd0792..9eeeb409d44 100644
--- a/src/tools/build-manifest/src/main.rs
+++ b/src/tools/build-manifest/src/main.rs
@@ -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;
+            }
         }
     }