about summary refs log tree commit diff
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2023-08-23 17:46:35 +0200
committerGitHub <noreply@github.com>2023-08-23 17:46:35 +0200
commitb88610fdb7f38ed312f1042c3838703cfa8aaf3b (patch)
treecd116a87577153262240a41e6af11205fba04c49
parent8c24ce115ea295127d4b7f601ec8d8f5e9d5ade2 (diff)
parent35187c7e6474d346eea3113c4ae34d26d6b18756 (diff)
downloadrust-b88610fdb7f38ed312f1042c3838703cfa8aaf3b.tar.gz
rust-b88610fdb7f38ed312f1042c3838703cfa8aaf3b.zip
Rollup merge of #115109 - cuviper:yaml-404, r=albertlarsan68
Skip ExpandYamlAnchors when the config is missing

The dist-src tarball does not include `.github/` at all, so we can't
check whether it needs to be regenerated.
-rw-r--r--src/bootstrap/test.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index db3b7ffbea4..d1018978f78 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -1174,6 +1174,11 @@ impl Step for ExpandYamlAnchors {
     /// appropriate configuration for all our CI providers. This step ensures the tool was called
     /// by the user before committing CI changes.
     fn run(self, builder: &Builder<'_>) {
+        // Note: `.github/` is not included in dist-src tarballs
+        if !builder.src.join(".github/workflows/ci.yml").exists() {
+            builder.info("Skipping YAML anchors check: GitHub Actions config not found");
+            return;
+        }
         builder.info("Ensuring the YAML anchors in the GitHub Actions config were expanded");
         builder.run_delaying_failure(
             &mut builder.tool_cmd(Tool::ExpandYamlAnchors).arg("check").arg(&builder.src),