Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
feat(cap-test): skip performance suite on Windows CI with software adapter
Richie McIlroyeeabea6c7b65
diff --git a/crates/cap-test/src/suites/performance.rs b/crates/cap-test/src/suites/performance.rsindex 52dae20c0..c109b920f 100644--- a/crates/cap-test/src/suites/performance.rs+++ b/crates/cap-test/src/suites/performance.rs@@ -44,6 +44,24 @@ pub async fn run_suite(let mut results = Vec::new();let sample_duration_secs = duration.max(1);+ if let Some(skipped_results) = probe_windows_ci_software_adapter(recording_path).await {+ let summary = ResultsSummary::from_results(&skipped_results, start.elapsed());++ return Ok(TestResults {+ meta: ResultsMeta {+ timestamp: Utc::now(),+ config_name: "Performance Suite".to_string(),+ config_path: Some(recording_path.display().to_string()),+ platform: hardware.system_info.platform.clone(),+ system: hardware.system_info.clone(),+ cap_version: None,+ },+ hardware: Some(hardware.clone()),+ results: skipped_results,+ summary,+ });+ }+results.push(run_open_test(recording_path).await);results.push(run_playback_test(recording_path, sample_duration_secs).await);results.push(run_export_test(recording_path).await);@@ -65,6 +83,70 @@ pub async fn run_suite(})}+#[cfg(target_os = "windows")]+async fn probe_windows_ci_software_adapter(recording_path: &Path) -> Option<Vec<TestResult>> {+ if !std::env::var("GITHUB_ACTIONS")+ .map(|value| value == "true")+ .unwrap_or(false)+ {+ return None;+ }++ let (is_software, adapter_name) = cap_rendering::probe_software_adapter().await?;++ if !is_software {+ return None;+ }++ let reason = format!(+ "Windows GitHub Actions exposed software rendering via {adapter_name}; performance gate skipped because the runner cannot provide representative GPU metrics"+ );+ let notes = vec![format!("adapter={adapter_name}")];++ Some(vec![+ skipped_result(+ "performance-open",+ "Fixture Open",+ fixture_config(recording_path),+ &reason,+ ¬es,+ ),+ skipped_result(+ "performance-playback",+ "Editor Playback",+ fixture_config(recording_path),+ &reason,+ ¬es,+ ),+ skipped_result(+ "performance-export",+ "Export Startup And Throughput",+ fixture_config(recording_path),+ &reason,+ ¬es,+ ),+ ])+}++#[cfg(not(target_os = "windows"))]+async fn probe_windows_ci_software_adapter(_recording_path: &Path) -> Option<Vec<TestResult>> {+ None+}++#[cfg_attr(not(target_os = "windows"), allow(dead_code))]+fn skipped_result(+ test_id: &str,+ name: &str,+ config: TestCaseConfig,+ reason: &str,+ notes: &[String],+) -> TestResult {+ let mut result = TestResult::new(test_id.to_string(), name.to_string(), config);+ result.set_skipped(reason);+ result.notes.extend(notes.iter().cloned());+ result+}+struct FixtureContext {project: ProjectConfiguration,render_constants: Arc<RenderVideoConstants>,