about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorjyn <github@jyn.dev>2023-07-09 17:17:22 -0500
committerjyn <github@jyn.dev>2023-07-14 17:27:20 -0500
commitd3cdf27184845afc2c1a9ac2d8d0c2c04015e18d (patch)
tree84bcdd0821eddb969da30055b212b88258012fd6 /src/bootstrap
parent3b55d2385a85271808f301c4000c7ca178bccc41 (diff)
downloadrust-d3cdf27184845afc2c1a9ac2d8d0c2c04015e18d.tar.gz
rust-d3cdf27184845afc2c1a9ac2d8d0c2c04015e18d.zip
Add even more GHA log groups
This also adds a dynamic check that we don't emit nested groups, since GHA currently doesn't support them.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/doc.rs9
-rw-r--r--src/bootstrap/test.rs51
2 files changed, 45 insertions, 15 deletions
diff --git a/src/bootstrap/doc.rs b/src/bootstrap/doc.rs
index 0fd6b46d562..d20bfab4131 100644
--- a/src/bootstrap/doc.rs
+++ b/src/bootstrap/doc.rs
@@ -1060,7 +1060,16 @@ impl Step for RustcBook {
         // config.toml), then this needs to explicitly update the dylib search
         // path.
         builder.add_rustc_lib_path(self.compiler, &mut cmd);
+        let doc_generator_guard = builder.msg(
+            Kind::Run,
+            self.compiler.stage,
+            "lint-docs",
+            self.compiler.host,
+            self.target,
+        );
         builder.run(&mut cmd);
+        drop(doc_generator_guard);
+
         // Run rustbook/mdbook to generate the HTML pages.
         builder.ensure(RustbookSrc {
             target: self.target,
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 284efff348d..7704015fbf8 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -117,12 +117,7 @@ impl Step for CrateBootstrap {
             SourceType::InTree,
             &[],
         );
-        builder.info(&format!(
-            "{} {} stage0 ({})",
-            builder.kind.description(),
-            path,
-            bootstrap_host,
-        ));
+        let _group = builder.msg(Kind::Test, compiler.stage, path, compiler.host, bootstrap_host);
         let crate_name = path.rsplit_once('/').unwrap().1;
         run_cargo_test(cargo, &[], &[], crate_name, compiler, bootstrap_host, builder);
     }
@@ -163,6 +158,15 @@ You can skip linkcheck with --exclude src/tools/linkchecker"
         // Test the linkchecker itself.
         let bootstrap_host = builder.config.build;
         let compiler = builder.compiler(0, bootstrap_host);
+
+        let self_test_group = builder.msg(
+            Kind::Test,
+            compiler.stage,
+            "linkchecker self tests",
+            bootstrap_host,
+            bootstrap_host,
+        );
+
         let cargo = tool::prepare_tool_cargo(
             builder,
             compiler,
@@ -174,6 +178,7 @@ You can skip linkcheck with --exclude src/tools/linkchecker"
             &[],
         );
         run_cargo_test(cargo, &[], &[], "linkchecker", compiler, bootstrap_host, builder);
+        drop(self_test_group);
 
         if builder.doc_tests == DocTests::No {
             return;
@@ -182,12 +187,14 @@ You can skip linkcheck with --exclude src/tools/linkchecker"
         // Build all the default documentation.
         builder.default_doc(&[]);
 
+        // Build the linkchecker before calling `msg`, since GHA doesn't support nested groups.
+        let mut linkchecker = builder.tool_cmd(Tool::Linkchecker);
+
         // Run the linkchecker.
+        let _guard =
+            builder.msg(Kind::Test, compiler.stage, "Linkcheck", bootstrap_host, bootstrap_host);
         let _time = util::timeit(&builder);
-        try_run(
-            builder,
-            builder.tool_cmd(Tool::Linkchecker).arg(builder.out.join(host.triple).join("doc")),
-        );
+        try_run(builder, linkchecker.arg(builder.out.join(host.triple).join("doc")));
     }
 
     fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
@@ -2669,6 +2676,10 @@ impl Step for Bootstrap {
 
     /// Tests the build system itself.
     fn run(self, builder: &Builder<'_>) {
+        let host = builder.config.build;
+        let compiler = builder.compiler(0, host);
+        let _guard = builder.msg(Kind::Test, 0, "bootstrap", host, host);
+
         let mut check_bootstrap = Command::new(&builder.python());
         check_bootstrap
             .args(["-m", "unittest", "bootstrap_test.py"])
@@ -2679,8 +2690,6 @@ impl Step for Bootstrap {
         // Use `python -m unittest` manually if you want to pass arguments.
         try_run(builder, &mut check_bootstrap);
 
-        let host = builder.config.build;
-        let compiler = builder.compiler(0, host);
         let mut cmd = Command::new(&builder.initial_cargo);
         cmd.arg("test")
             .current_dir(builder.src.join("src/bootstrap"))
@@ -2748,7 +2757,13 @@ impl Step for TierCheck {
             cargo.arg("--verbose");
         }
 
-        builder.info("platform support check");
+        let _guard = builder.msg(
+            Kind::Test,
+            self.compiler.stage,
+            "platform support check",
+            self.compiler.host,
+            self.compiler.host,
+        );
         try_run(builder, &mut cargo.into());
     }
 }
@@ -2796,8 +2811,6 @@ impl Step for RustInstaller {
 
     /// Ensure the version placeholder replacement tool builds
     fn run(self, builder: &Builder<'_>) {
-        builder.info("test rust-installer");
-
         let bootstrap_host = builder.config.build;
         let compiler = builder.compiler(0, bootstrap_host);
         let cargo = tool::prepare_tool_cargo(
@@ -2810,6 +2823,14 @@ impl Step for RustInstaller {
             SourceType::InTree,
             &[],
         );
+
+        let _guard = builder.msg(
+            Kind::Test,
+            compiler.stage,
+            "rust-installer",
+            bootstrap_host,
+            bootstrap_host,
+        );
         run_cargo_test(cargo, &[], &[], "installer", compiler, bootstrap_host, builder);
 
         // We currently don't support running the test.sh script outside linux(?) environments.