]> git.lizzy.rs Git - rust.git/blobdiff - src/bootstrap/util.rs
Simplify Cache wrapper to single type, impl Deref on it, fix all compilation errors...
[rust.git] / src / bootstrap / util.rs
index 98ae7b692bb3c7524bc01bde8bbfea1b799f8fcf..6f8a630874570324e26b750ec700d05122fca01b 100644 (file)
@@ -262,6 +262,8 @@ pub enum CiEnv {
     None,
     /// The Azure Pipelines environment, for Linux (including Docker), Windows, and macOS builds.
     AzurePipelines,
+    /// The GitHub Actions environment, for Linux (including Docker), Windows and macOS builds.
+    GitHubActions,
 }
 
 impl CiEnv {
@@ -269,6 +271,8 @@ impl CiEnv {
     pub fn current() -> CiEnv {
         if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") {
             CiEnv::AzurePipelines
+        } else if env::var("GITHUB_ACTIONS").ok().map_or(false, |e| &*e == "true") {
+            CiEnv::GitHubActions
         } else {
             CiEnv::None
         }