about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2019-07-16 11:38:55 -0400
committerGitHub <noreply@github.com>2019-07-16 11:38:55 -0400
commite47cb534df7dbe45be336f74efa62eb830edf705 (patch)
tree23830e50e902196dd5a37c95afc3ca51bcbecce3 /src/bootstrap
parentc9be624c26ca4555478d7e7c0bfd8898cb014c2d (diff)
parent3dd00bac7c60452055b657903da9c736149140ad (diff)
downloadrust-e47cb534df7dbe45be336f74efa62eb830edf705.tar.gz
rust-e47cb534df7dbe45be336f74efa62eb830edf705.zip
Rollup merge of #62693 - alexcrichton:rm-travis-appveyor, r=Mark-Simulacrum
ci: Remove Travis/AppVeyor configuration

Now that we've fully moved to Azure Pipelines and bors has been updated
to only gate on Azure this commit removes the remaining Travis/AppVeyor
support contained in this repository. Most of the deletions here are
related to producing better output on Travis by folding certain
sections. This isn't supported by Azure so there's no need to keep it
around, and if Azure ever adds support we can always add it back!
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/check.rs5
-rw-r--r--src/bootstrap/compile.rs4
-rw-r--r--src/bootstrap/lib.rs15
-rw-r--r--src/bootstrap/native.rs3
-rw-r--r--src/bootstrap/test.rs15
-rw-r--r--src/bootstrap/tool.rs2
-rw-r--r--src/bootstrap/util.rs76
7 files changed, 4 insertions, 116 deletions
diff --git a/src/bootstrap/check.rs b/src/bootstrap/check.rs
index bdf5306d4b5..11b082ac3f6 100644
--- a/src/bootstrap/check.rs
+++ b/src/bootstrap/check.rs
@@ -50,7 +50,6 @@ impl Step for Std {
         let mut cargo = builder.cargo(compiler, Mode::Std, target, cargo_subcommand(builder.kind));
         std_cargo(builder, &compiler, target, &mut cargo);
 
-        let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage));
         builder.info(&format!("Checking std artifacts ({} -> {})", &compiler.host, target));
         run_cargo(builder,
                   &mut cargo,
@@ -99,7 +98,6 @@ impl Step for Rustc {
             cargo_subcommand(builder.kind));
         rustc_cargo(builder, &mut cargo);
 
-        let _folder = builder.fold_output(|| format!("stage{}-rustc", compiler.stage));
         builder.info(&format!("Checking compiler artifacts ({} -> {})", &compiler.host, target));
         run_cargo(builder,
                   &mut cargo,
@@ -153,7 +151,6 @@ impl Step for CodegenBackend {
 
         // We won't build LLVM if it's not available, as it shouldn't affect `check`.
 
-        let _folder = builder.fold_output(|| format!("stage{}-rustc_codegen_llvm", compiler.stage));
         run_cargo(builder,
                   &mut cargo,
                   args(builder.kind),
@@ -190,7 +187,6 @@ impl Step for Test {
         let mut cargo = builder.cargo(compiler, Mode::Test, target, cargo_subcommand(builder.kind));
         test_cargo(builder, &compiler, target, &mut cargo);
 
-        let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage));
         builder.info(&format!("Checking test artifacts ({} -> {})", &compiler.host, target));
         run_cargo(builder,
                   &mut cargo,
@@ -239,7 +235,6 @@ impl Step for Rustdoc {
                                            SourceType::InTree,
                                            &[]);
 
-        let _folder = builder.fold_output(|| format!("stage{}-rustdoc", compiler.stage));
         println!("Checking rustdoc artifacts ({} -> {})", &compiler.host, target);
         run_cargo(builder,
                   &mut cargo,
diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs
index 576267e6948..9ced04a5c80 100644
--- a/src/bootstrap/compile.rs
+++ b/src/bootstrap/compile.rs
@@ -95,7 +95,6 @@ impl Step for Std {
         let mut cargo = builder.cargo(compiler, Mode::Std, target, "build");
         std_cargo(builder, &compiler, target, &mut cargo);
 
-        let _folder = builder.fold_output(|| format!("stage{}-std", compiler.stage));
         builder.info(&format!("Building stage{} std artifacts ({} -> {})", compiler.stage,
                 &compiler.host, target));
         run_cargo(builder,
@@ -422,7 +421,6 @@ impl Step for Test {
         let mut cargo = builder.cargo(compiler, Mode::Test, target, "build");
         test_cargo(builder, &compiler, target, &mut cargo);
 
-        let _folder = builder.fold_output(|| format!("stage{}-test", compiler.stage));
         builder.info(&format!("Building stage{} test artifacts ({} -> {})", compiler.stage,
                 &compiler.host, target));
         run_cargo(builder,
@@ -555,7 +553,6 @@ impl Step for Rustc {
         let mut cargo = builder.cargo(compiler, Mode::Rustc, target, "build");
         rustc_cargo(builder, &mut cargo);
 
-        let _folder = builder.fold_output(|| format!("stage{}-rustc", compiler.stage));
         builder.info(&format!("Building stage{} compiler artifacts ({} -> {})",
                  compiler.stage, &compiler.host, target));
         run_cargo(builder,
@@ -710,7 +707,6 @@ impl Step for CodegenBackend {
 
         let tmp_stamp = out_dir.join(".tmp.stamp");
 
-        let _folder = builder.fold_output(|| format!("stage{}-rustc_codegen_llvm", compiler.stage));
         let files = run_cargo(builder,
                               cargo.arg("--features").arg(features),
                               vec![],
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 4d297fa918a..7011b7f1664 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -128,7 +128,7 @@ use build_helper::{
 };
 use filetime::FileTime;
 
-use crate::util::{exe, libdir, OutputFolder, CiEnv};
+use crate::util::{exe, libdir, CiEnv};
 
 mod cc_detect;
 mod channel;
@@ -1092,19 +1092,6 @@ impl Build {
         }
     }
 
-    /// Fold the output of the commands after this method into a group. The fold
-    /// ends when the returned object is dropped. Folding can only be used in
-    /// the Travis CI environment.
-    pub fn fold_output<D, F>(&self, name: F) -> Option<OutputFolder>
-        where D: Into<String>, F: FnOnce() -> D
-    {
-        if !self.config.dry_run && self.ci_env == CiEnv::Travis {
-            Some(OutputFolder::new(name().into()))
-        } else {
-            None
-        }
-    }
-
     /// Updates the actual toolstate of a tool.
     ///
     /// The toolstates are saved to the file specified by the key
diff --git a/src/bootstrap/native.rs b/src/bootstrap/native.rs
index 8b6e856a8ab..f8d1abe2994 100644
--- a/src/bootstrap/native.rs
+++ b/src/bootstrap/native.rs
@@ -104,7 +104,6 @@ impl Step for Llvm {
             }
         }
 
-        let _folder = builder.fold_output(|| "llvm");
         let descriptor = if emscripten { "Emscripten " } else { "" };
         builder.info(&format!("Building {}LLVM for {}", descriptor, target));
         let _time = util::timeit(&builder);
@@ -493,7 +492,6 @@ impl Step for Lld {
             return out_dir
         }
 
-        let _folder = builder.fold_output(|| "lld");
         builder.info(&format!("Building LLD for {}", target));
         let _time = util::timeit(&builder);
         t!(fs::create_dir_all(&out_dir));
@@ -560,7 +558,6 @@ impl Step for TestHelpers {
             return
         }
 
-        let _folder = builder.fold_output(|| "build_test_helpers");
         builder.info("Building test helpers");
         t!(fs::create_dir_all(&dst));
         let mut cfg = cc::Build::new();
diff --git a/src/bootstrap/test.rs b/src/bootstrap/test.rs
index 6c0c770bf08..26fd7585ab5 100644
--- a/src/bootstrap/test.rs
+++ b/src/bootstrap/test.rs
@@ -713,7 +713,6 @@ impl Step for Tidy {
             cmd.arg("--verbose");
         }
 
-        let _folder = builder.fold_output(|| "tidy");
         builder.info("tidy check");
         try_run(builder, &mut cmd);
     }
@@ -1310,7 +1309,6 @@ impl Step for Compiletest {
 
         builder.ci_env.force_coloring_in_ci(&mut cmd);
 
-        let _folder = builder.fold_output(|| format!("test_{}", suite));
         builder.info(&format!(
             "Check compiletest suite={} mode={} ({} -> {})",
             suite, mode, &compiler.host, target
@@ -1320,7 +1318,6 @@ impl Step for Compiletest {
 
         if let Some(compare_mode) = compare_mode {
             cmd.arg("--compare-mode").arg(compare_mode);
-            let _folder = builder.fold_output(|| format!("test_{}_{}", suite, compare_mode));
             builder.info(&format!(
                 "Check compiletest suite={} mode={} compare_mode={} ({} -> {})",
                 suite, mode, compare_mode, &compiler.host, target
@@ -1364,7 +1361,6 @@ impl Step for DocTest {
         // tests for all files that end in `*.md`
         let mut stack = vec![builder.src.join(self.path)];
         let _time = util::timeit(&builder);
-        let _folder = builder.fold_output(|| format!("test_{}", self.name));
 
         let mut files = Vec::new();
         while let Some(p) = stack.pop() {
@@ -1495,7 +1491,6 @@ impl Step for ErrorIndex {
             .env("CFG_BUILD", &builder.config.build)
             .env("RUSTC_ERROR_METADATA_DST", builder.extended_error_dir());
 
-        let _folder = builder.fold_output(|| "test_error_index");
         builder.info(&format!("Testing error-index stage{}", compiler.stage));
         let _time = util::timeit(&builder);
         builder.run(&mut tool);
@@ -1819,14 +1814,6 @@ impl Step for Crate {
             );
         }
 
-        let _folder = builder.fold_output(|| {
-            format!(
-                "{}_stage{}-{}",
-                test_kind.subcommand(),
-                compiler.stage,
-                krate
-            )
-        });
         builder.info(&format!(
             "{} {} stage{} ({} -> {})",
             test_kind, krate, compiler.stage, &compiler.host, target
@@ -1894,8 +1881,6 @@ impl Step for CrateRustdoc {
             cargo.arg("--quiet");
         }
 
-        let _folder = builder
-            .fold_output(|| format!("{}_stage{}-rustdoc", test_kind.subcommand(), compiler.stage));
         builder.info(&format!(
             "{} rustdoc stage{} ({} -> {})",
             test_kind, compiler.stage, &compiler.host, target
diff --git a/src/bootstrap/tool.rs b/src/bootstrap/tool.rs
index a9269a7ad24..15a329a5b91 100644
--- a/src/bootstrap/tool.rs
+++ b/src/bootstrap/tool.rs
@@ -74,7 +74,6 @@ impl Step for ToolBuild {
             &self.extra_features,
         );
 
-        let _folder = builder.fold_output(|| format!("stage{}-{}", compiler.stage, tool));
         builder.info(&format!("Building stage{} tool {} ({})", compiler.stage, tool, target));
         let mut duplicates = Vec::new();
         let is_expected = compile::stream_cargo(builder, &mut cargo, vec![], &mut |msg| {
@@ -509,7 +508,6 @@ impl Step for Rustdoc {
             &[],
         );
 
-        let _folder = builder.fold_output(|| format!("stage{}-rustdoc", target_compiler.stage));
         builder.info(&format!("Building rustdoc for stage{} ({})",
             target_compiler.stage, target_compiler.host));
         builder.run(&mut cargo);
diff --git a/src/bootstrap/util.rs b/src/bootstrap/util.rs
index 47f5edd1563..98ae7b692bb 100644
--- a/src/bootstrap/util.rs
+++ b/src/bootstrap/util.rs
@@ -6,10 +6,10 @@
 use std::env;
 use std::str;
 use std::fs;
-use std::io::{self, Write};
+use std::io;
 use std::path::{Path, PathBuf};
 use std::process::Command;
-use std::time::{SystemTime, Instant};
+use std::time::Instant;
 
 use build_helper::t;
 
@@ -254,78 +254,12 @@ pub fn symlink_dir(config: &Config, src: &Path, dest: &Path) -> io::Result<()> {
     }
 }
 
-/// An RAII structure that indicates all output until this instance is dropped
-/// is part of the same group.
-///
-/// On Travis CI, these output will be folded by default, together with the
-/// elapsed time in this block. This reduces noise from unnecessary logs,
-/// allowing developers to quickly identify the error.
-///
-/// Travis CI supports folding by printing `travis_fold:start:<name>` and
-/// `travis_fold:end:<name>` around the block. Time elapsed is recognized
-/// similarly with `travis_time:[start|end]:<name>`. These are undocumented, but
-/// can easily be deduced from source code of the [Travis build commands].
-///
-/// [Travis build commands]:
-/// https://github.com/travis-ci/travis-build/blob/f603c0089/lib/travis/build/templates/header.sh
-pub struct OutputFolder {
-    name: String,
-    start_time: SystemTime, // we need SystemTime to get the UNIX timestamp.
-}
-
-impl OutputFolder {
-    /// Creates a new output folder with the given group name.
-    pub fn new(name: String) -> OutputFolder {
-        // "\r" moves the cursor to the beginning of the line, and "\x1b[0K" is
-        // the ANSI escape code to clear from the cursor to end of line.
-        // Travis seems to have trouble when _not_ using "\r\x1b[0K", that will
-        // randomly put lines to the top of the webpage.
-        print!("travis_fold:start:{0}\r\x1b[0Ktravis_time:start:{0}\r\x1b[0K", name);
-        OutputFolder {
-            name,
-            start_time: SystemTime::now(),
-        }
-    }
-}
-
-impl Drop for OutputFolder {
-    fn drop(&mut self) {
-        use std::time::*;
-        use std::u64;
-
-        fn to_nanos(duration: Result<Duration, SystemTimeError>) -> u64 {
-            match duration {
-                Ok(d) => d.as_secs() * 1_000_000_000 + d.subsec_nanos() as u64,
-                Err(_) => u64::MAX,
-            }
-        }
-
-        let end_time = SystemTime::now();
-        let duration = end_time.duration_since(self.start_time);
-        let start = self.start_time.duration_since(UNIX_EPOCH);
-        let finish = end_time.duration_since(UNIX_EPOCH);
-        println!(
-            "travis_fold:end:{0}\r\x1b[0K\n\
-                travis_time:end:{0}:start={1},finish={2},duration={3}\r\x1b[0K",
-            self.name,
-            to_nanos(start),
-            to_nanos(finish),
-            to_nanos(duration)
-        );
-        io::stdout().flush().unwrap();
-    }
-}
-
 /// The CI environment rustbuild is running in. This mainly affects how the logs
 /// are printed.
 #[derive(Copy, Clone, PartialEq, Eq, Debug)]
 pub enum CiEnv {
     /// Not a CI environment.
     None,
-    /// The Travis CI environment, for Linux (including Docker) and macOS builds.
-    Travis,
-    /// The AppVeyor environment, for Windows builds.
-    AppVeyor,
     /// The Azure Pipelines environment, for Linux (including Docker), Windows, and macOS builds.
     AzurePipelines,
 }
@@ -333,11 +267,7 @@ pub enum CiEnv {
 impl CiEnv {
     /// Obtains the current CI environment.
     pub fn current() -> CiEnv {
-        if env::var("TRAVIS").ok().map_or(false, |e| &*e == "true") {
-            CiEnv::Travis
-        } else if env::var("APPVEYOR").ok().map_or(false, |e| &*e == "True") {
-            CiEnv::AppVeyor
-        } else if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") {
+        if env::var("TF_BUILD").ok().map_or(false, |e| &*e == "True") {
             CiEnv::AzurePipelines
         } else {
             CiEnv::None