@@ -111,11 +111,13 @@ enum EnvironmentCmd {
111
111
} ,
112
112
}
113
113
114
- fn is_try_build ( ) -> bool {
114
+ /// Are we supposed to only build the bare minimum of components to get a working toolchain?
115
+ fn is_fast_try_build ( ) -> bool {
115
116
std:: env:: var ( "DIST_TRY_BUILD" ) . unwrap_or_else ( |_| "0" . to_string ( ) ) != "0"
116
117
}
117
118
118
119
fn create_environment ( args : Args ) -> anyhow:: Result < ( Environment , Vec < String > ) > {
120
+ let is_fast_try_build = is_fast_try_build ( ) ;
119
121
let ( env, args) = match args. env {
120
122
EnvironmentCmd :: Local {
121
123
target_triple,
@@ -144,6 +146,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
144
146
. skipped_tests ( skipped_tests)
145
147
. benchmark_cargo_config ( benchmark_cargo_config)
146
148
. run_tests ( run_tests)
149
+ . fast_try_build ( is_fast_try_build)
147
150
. build ( ) ?;
148
151
149
152
( env, shared. build_args )
@@ -167,6 +170,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
167
170
. use_bolt ( !is_aarch64)
168
171
. skipped_tests ( vec ! [ ] )
169
172
. run_tests ( true )
173
+ . fast_try_build ( is_fast_try_build)
170
174
. build ( ) ?;
171
175
172
176
( env, shared. build_args )
@@ -187,6 +191,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
187
191
. use_bolt ( false )
188
192
. skipped_tests ( vec ! [ ] )
189
193
. run_tests ( true )
194
+ . fast_try_build ( is_fast_try_build)
190
195
. build ( ) ?;
191
196
192
197
( env, shared. build_args )
@@ -352,7 +357,7 @@ fn execute_pipeline(
352
357
// possible regressions.
353
358
// The tests are not executed for try builds, which can be in various broken states, so we don't
354
359
// want to gatekeep them with tests.
355
- if !is_try_build ( ) && env. run_tests ( ) {
360
+ if !is_fast_try_build ( ) && env. run_tests ( ) {
356
361
timer. section ( "Run tests" , |_| run_tests ( env) ) ?;
357
362
}
358
363
@@ -397,7 +402,7 @@ fn main() -> anyhow::Result<()> {
397
402
let ( env, mut build_args) = create_environment ( args) . context ( "Cannot create environment" ) ?;
398
403
399
404
// Skip components that are not needed for try builds to speed them up
400
- if is_try_build ( ) {
405
+ if is_fast_try_build ( ) {
401
406
log:: info!( "Skipping building of unimportant components for a try build" ) ;
402
407
for target in [
403
408
"rust-docs" ,
0 commit comments