@@ -161,6 +161,8 @@ pub enum RunType {
161
161
TryJob { job_patterns : Option < Vec < String > > } ,
162
162
/// Merge attempt workflow
163
163
AutoJob ,
164
+ /// Fake job only used for sharing Github Actions cache.
165
+ MasterJob ,
164
166
}
165
167
166
168
/// Maximum number of custom try jobs that can be requested in a single
@@ -210,6 +212,7 @@ fn calculate_jobs(
210
212
( jobs, "try" , & db. envs . try_env )
211
213
}
212
214
RunType :: AutoJob => ( db. auto_jobs . clone ( ) , "auto" , & db. envs . auto_env ) ,
215
+ RunType :: MasterJob => return Ok ( vec ! [ ] ) ,
213
216
} ;
214
217
let jobs = substitute_github_vars ( jobs. clone ( ) )
215
218
. context ( "Failed to substitute GitHub context variables in jobs" ) ?;
@@ -262,14 +265,15 @@ pub fn calculate_job_matrix(
262
265
eprintln ! ( "Run type: {run_type:?}" ) ;
263
266
264
267
let jobs = calculate_jobs ( & run_type, & db, channel) ?;
265
- if jobs. is_empty ( ) {
268
+ if jobs. is_empty ( ) && ! matches ! ( run_type , RunType :: MasterJob ) {
266
269
return Err ( anyhow:: anyhow!( "Computed job list is empty" ) ) ;
267
270
}
268
271
269
272
let run_type = match run_type {
270
273
RunType :: PullRequest => "pr" ,
271
274
RunType :: TryJob { .. } => "try" ,
272
275
RunType :: AutoJob => "auto" ,
276
+ RunType :: MasterJob => "master" ,
273
277
} ;
274
278
275
279
eprintln ! ( "Output" ) ;
0 commit comments