From f81cd0667f3251b6686ba7a2c90bd55a6aecfded Mon Sep 17 00:00:00 2001 From: akacross Date: Sun, 18 Oct 2026 17:28:48 -0400 Subject: [PATCH] Run independent validation checks in parallel The script-smoke job ran its ~350 checks one after another, about 77 minutes on main, and every platform job then reran the same Python suite in sequence before its build (39 of the Linux job's 66 minutes). On the slower runners that left Windows ARM64 and the macOS Intel jobs cancelled at 150 minutes on main, and pull-request jobs, with 90-minute limits, cancelled regardless of the change. Each check is its own process that writes only to fresh temporary directories, so they can overlap: - openq4_validate.py runs its Python checks concurrently, as many as the machine has CPUs. --python-jobs N or OPENQ4_PYTHON_TEST_JOBS change that and --python-jobs 1 restores sequential runs. Output is still printed in list order, one section per check, with each check's duration. - tools/validation/run_parallel_commands.py does the same for a list of commands on standard input; both script-smoke steps feed their unchanged check list through it. - validation_hardening.py covers the parallel path's failure aggregation as well as the sequential one. On a 16-thread Linux host the validator's 350 checks took 2041 s in sequence and 311 s in parallel with the same results; the whole rewritten smoke step took 343 s. The only failures, identical either way, are host-toolchain ones (newer clang/libstdc++), not parallelism. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/commit-validation.yml | 5 ++ .github/workflows/push-verification.yml | 5 ++ BUILDING.md | 2 + tools/tests/validation_hardening.py | 27 ++++++- tools/validation/openq4_validate.py | 93 ++++++++++++++++++--- tools/validation/run_parallel_commands.py | 99 +++++++++++++++++++++++ 6 files changed, 220 insertions(+), 11 deletions(-) create mode 100644 tools/validation/run_parallel_commands.py diff --git a/.github/workflows/commit-validation.yml b/.github/workflows/commit-validation.yml index 89a29ada..a3a29c84 100644 --- a/.github/workflows/commit-validation.yml +++ b/.github/workflows/commit-validation.yml @@ -83,6 +83,7 @@ jobs: tools/validation/audit_source_provenance.py \ tools/validation/generate_pbr_fixture.py \ tools/validation/openq4_validate.py \ + tools/validation/run_parallel_commands.py \ tools/validation/stock_asset_baseline.py \ tools/tests/renderer_validation_matrix.py \ tools/tests/aas_compiler_contract.py \ @@ -505,6 +506,9 @@ jobs: bash -n tools/validation/validate_macos_static.sh bash -n tools/validation/validate_push.sh bash -n tools/validation/validate_pr.sh + # Independent checks run concurrently; run_parallel_commands.py prints each + # in this order and fails the step if any fails. + python tools/validation/run_parallel_commands.py <<'OPENQ4_CHECKS' python tools/validation/audit_source_provenance.py --check python tools/tests/aas_compiler_contract.py python tools/tests/aas_settings_contract.py @@ -858,6 +862,7 @@ jobs: python tools/tests/vk_display_color_mapping_capture.py --self-test python tools/tests/vk_temporal_resolve_shader_pin.py python tools/tests/vscode_fast_build.py + OPENQ4_CHECKS - name: Dry-run validation profiles shell: bash diff --git a/.github/workflows/push-verification.yml b/.github/workflows/push-verification.yml index 7e3bc51b..f70686d8 100644 --- a/.github/workflows/push-verification.yml +++ b/.github/workflows/push-verification.yml @@ -83,6 +83,7 @@ jobs: tools/validation/audit_source_provenance.py \ tools/validation/generate_pbr_fixture.py \ tools/validation/openq4_validate.py \ + tools/validation/run_parallel_commands.py \ tools/validation/stock_asset_baseline.py \ tools/tests/renderer_validation_matrix.py \ tools/tests/aas_compiler_contract.py \ @@ -505,6 +506,9 @@ jobs: bash -n tools/validation/validate_macos_static.sh bash -n tools/validation/validate_push.sh bash -n tools/validation/validate_pr.sh + # Independent checks run concurrently; run_parallel_commands.py prints each + # in this order and fails the step if any fails. + python tools/validation/run_parallel_commands.py <<'OPENQ4_CHECKS' python tools/validation/audit_source_provenance.py --check python tools/tests/aas_compiler_contract.py python tools/tests/aas_settings_contract.py @@ -858,6 +862,7 @@ jobs: python tools/tests/vk_display_color_mapping_capture.py --self-test python tools/tests/vk_temporal_resolve_shader_pin.py python tools/tests/vscode_fast_build.py + OPENQ4_CHECKS - name: Dry-run push profile shell: bash diff --git a/BUILDING.md b/BUILDING.md index 682473d9..84c3b147 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -142,6 +142,8 @@ Pass any of these with `-D