(modes: &[RunnerMode], setup_cache_dir: Option<&Path>)
| 65 | } |
| 66 | |
| 67 | async fn setup(modes: &[RunnerMode], setup_cache_dir: Option<&Path>) -> Result<()> { |
| 68 | let system_info = SystemInfo::new()?; |
| 69 | let run_environment = run_environment::detect(); |
| 70 | let executors = get_executors_from_modes(modes); |
| 71 | start_group!("Setting up the environment"); |
| 72 | for executor in executors { |
| 73 | setup_executor( |
| 74 | executor.as_ref(), |
| 75 | &system_info, |
| 76 | setup_cache_dir, |
| 77 | &run_environment, |
| 78 | ) |
| 79 | .await?; |
| 80 | } |
| 81 | info!("Environment setup completed"); |
| 82 | end_group!(); |
| 83 | Ok(()) |
| 84 | } |
| 85 | |
| 86 | /// Set up a single executor based on its support level on the current system. |
| 87 | async fn setup_executor( |
no test coverage detected