about summary refs log tree commit diff
path: root/src/ci
diff options
context:
space:
mode:
Diffstat (limited to 'src/ci')
-rw-r--r--src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile2
-rwxr-xr-xsrc/ci/docker/run.sh1
-rw-r--r--src/ci/github-actions/ci.yml1
-rw-r--r--src/ci/stage-build.py15
4 files changed, 17 insertions, 2 deletions
diff --git a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
index 04fdb15f5ac..c2fd2e3a91a 100644
--- a/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
+++ b/src/ci/docker/host-x86_64/dist-x86_64-linux/Dockerfile
@@ -55,7 +55,7 @@ RUN ./build-clang.sh
 ENV CC=clang CXX=clang++
 
 # rustc-perf version from 2023-03-15
-ENV PERF_COMMIT 9dfaa35193154b690922347ee1141a06ec87a199
+ENV PERF_COMMIT 8b2ac3042e1ff2c0074455a0a3618adef97156b1
 RUN curl -LS -o perf.zip https://github.com/rust-lang/rustc-perf/archive/$PERF_COMMIT.zip && \
     unzip perf.zip && \
     mv rustc-perf-$PERF_COMMIT rustc-perf && \
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index 8bea8cd4c87..2fe3438e0fe 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -264,6 +264,7 @@ docker \
   --env RUST_CI_OVERRIDE_RELEASE_CHANNEL \
   --env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
   --env BASE_COMMIT="$BASE_COMMIT" \
+  --env DIST_TRY_BUILD \
   --init \
   --rm \
   rust-ci \
diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml
index fd619467fc1..d3cb6b6ed52 100644
--- a/src/ci/github-actions/ci.yml
+++ b/src/ci/github-actions/ci.yml
@@ -757,6 +757,7 @@ jobs:
     <<: *base-ci-job
     name: try - ${{ matrix.name }}
     env:
+      DIST_TRY_BUILD: 1
       <<: [*shared-ci-variables, *prod-variables]
     if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'
     strategy:
diff --git a/src/ci/stage-build.py b/src/ci/stage-build.py
index 8d03d3759bf..4141296bd42 100644
--- a/src/ci/stage-build.py
+++ b/src/ci/stage-build.py
@@ -48,6 +48,11 @@ RUSTC_PGO_CRATES = [
 
 LLVM_BOLT_CRATES = LLVM_PGO_CRATES
 
+
+def is_try_build() -> bool:
+    return os.environ.get("DIST_TRY_BUILD", "0") != "0"
+
+
 class Pipeline:
     # Paths
     def checkout_path(self) -> Path:
@@ -175,7 +180,7 @@ class WindowsPipeline(Pipeline):
 
     def build_rustc_perf(self):
         # rustc-perf version from 2023-03-15
-        perf_commit = "9dfaa35193154b690922347ee1141a06ec87a199"
+        perf_commit = "8b2ac3042e1ff2c0074455a0a3618adef97156b1"
         rustc_perf_zip_path = self.opt_artifacts() / "perf.zip"
 
         def download_rustc_perf():
@@ -851,6 +856,13 @@ def run(runner: BenchmarkRunner):
 
     build_args = sys.argv[1:]
 
+    # Skip components that are not needed for try builds to speed them up
+    if is_try_build():
+        LOGGER.info("Skipping building of unimportant components for a try build")
+        for target in ("rust-docs", "rustc-docs", "rust-docs-json", "rust-analyzer",
+                       "rustc-src", "clippy", "miri", "rustfmt"):
+            build_args.extend(["--exclude", target])
+
     timer = Timer()
     pipeline = create_pipeline()
 
@@ -865,6 +877,7 @@ def run(runner: BenchmarkRunner):
 
     print_binary_sizes(pipeline)
 
+
 if __name__ == "__main__":
     runner = DefaultBenchmarkRunner()
     run(runner)