From c34bc3634a339f3213201ce4bd3c1567841df0be Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Thu, 12 Nov 2026 06:53:14 +0100 Subject: [PATCH 1/2] Skip the configuration checks and the coverage capture on pull requests that leave the build system alone (#545) The cases that configure a CMake project carry the label configuration; a pull request into develop runs them only when cmake/, CMakeLists.txt, the CMake modules of js/core, test/cmake, test/unit/CMakeLists.txt, the actions or the workflow change. A push to develop and the full tier always run them. The lcov capture runs on a push and in the full tier, and the compiler cache probe step is removed. --- .github/workflows/BuildAndTest.yml | 48 +++++++++++++----------------- docs/CHANGELOG.md | 1 + docs/TEST_TIERS.md | 14 +++++++++ test/unit/CMakeLists.txt | 11 +++++++ 4 files changed, 46 insertions(+), 28 deletions(-) diff --git a/.github/workflows/BuildAndTest.yml b/.github/workflows/BuildAndTest.yml index 47d46a0f..829dc438 100644 --- a/.github/workflows/BuildAndTest.yml +++ b/.github/workflows/BuildAndTest.yml @@ -108,6 +108,20 @@ jobs: fi echo "Reproducibility builds: $reproducibility" echo "WEBFRONT_REPRODUCIBILITY=$reproducibility" >> "$GITHUB_ENV" + # The cases that configure a CMake project (label `configuration`, about 100 s of worker time on Windows) test the build + # system: a pull request into develop runs them only when it changes the build system or this workflow. A push to + # develop and the full tier always run them. + - name: Decide whether the configuration checks run + shell: bash + run: | + configuration=true + if [ "$FULL_TIER" != true ] && [ "$GITHUB_EVENT_NAME" = pull_request ]; then + if ! git diff --name-only HEAD^1 HEAD | grep -qE '^(cmake/|CMakeLists\.txt|js/core/[^/]*\.cmake|test/cmake/|test/unit/CMakeLists\.txt|\.github/actions/|\.github/workflows/BuildAndTest\.yml)'; then + configuration=false + fi + fi + echo "Configuration checks: $configuration" + echo "WEBFRONT_CONFIGURATION=$configuration" >> "$GITHUB_ENV" # No step of a build or of its tests needs a JavaScript runtime or package manager: the runner has none from here on. - uses: ./.github/actions/remove-node - uses: ./.github/actions/setup-cmake @@ -191,8 +205,8 @@ jobs: - name: Fast tests shell: bash run: >- - ctest --test-dir build -C ${{ matrix.build_type }} -L fast --parallel 4 --output-on-failure --no-tests=error - --output-junit "${{ github.workspace }}/build/fast-results.xml" + ctest --test-dir build -C ${{ matrix.build_type }} -L fast ${{ env.WEBFRONT_CONFIGURATION != 'true' && '-LE configuration' || '' }} + --parallel 4 --output-on-failure --no-tests=error --output-junit "${{ github.workspace }}/build/fast-results.xml" - name: Capture CTest dependency graph shell: bash run: ctest --test-dir build --show-only=json-v1 > build/ctest-graph.json @@ -204,7 +218,7 @@ jobs: python3 test/tools/MeasureCommand.py --output build/suite-resources.json -- cmake -DBUILD_DIR=build -DCONFIG=${{ matrix.build_type }} -DREPEAT=${{ (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'workflow_dispatch' && inputs.repeat_desktop_tests)) && '3' || '1' }} - '-DLABEL_EXCLUDE=${{ (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'workflow_dispatch' && inputs.repeat_desktop_tests)) && 'none' || '^(portability|fast)$' }}' + '-DLABEL_EXCLUDE=${{ (github.event_name == 'schedule' || (github.event_name == 'pull_request' && github.base_ref == 'master') || (github.event_name == 'workflow_dispatch' && inputs.repeat_desktop_tests)) && 'none' || (env.WEBFRONT_CONFIGURATION == 'true' && '^(portability|fast)$' || '^(portability|fast|configuration)$') }}' -P test/cmake/RunTestSuite.cmake - name: Repeat WebKitGTK pointer tests with suite display sharing enabled if: runner.os == 'Linux' @@ -218,31 +232,10 @@ jobs: if: always() shell: bash run: python3 test/tools/ProfileTests.py build/ctest-graph.json build/test-results-*.xml --workers 4 --log build/Testing/Temporary/LastTest.log --ninja-log build/.ninja_log --output build/test-profile.txt - - name: Probe compiler cache on the embedded builds - # Diagnostic (#388): do the Life embedded translation units hit the compiler cache once the suite has warmed it? - if: ${{ !cancelled() }} - continue-on-error: true - shell: bash - run: | - { - echo "Before the probe (whole run):" - sccache --show-stats | grep -E '^(Compile requests|Cache hits|Cache misses) ' - for target in life_embedded life_journey; do - sccache --zero-stats > /dev/null - start=$(date +%s) - cmake --build build --config ${{ matrix.build_type }} --target "$target" --clean-first > "build/probe-$target.log" 2>&1 || tail -n 20 "build/probe-$target.log" - echo "$target clean rebuild: $(( $(date +%s) - start )) s" - sccache --show-stats | grep -E '^(Compile requests|Cache hits|Cache misses) ' - done - # The consumer project of AddSubdirectoryConsumer: its single translation unit against the warm cache. - sccache --zero-stats > /dev/null - start=$(date +%s) - cmake --build build/test/unit/consumer-build --config ${{ matrix.build_type }} --clean-first > build/probe-consumer.log 2>&1 || tail -n 20 build/probe-consumer.log - echo "consumer clean rebuild: $(( $(date +%s) - start )) s" - sccache --show-stats | grep -E '^(Compile requests|Cache hits|Cache misses) ' - } 2>&1 | tee build/embedded-cache-probe.txt + # Nothing consumes the capture of a pull request, which only lists it in its log: it runs on a push to develop or master + # and in the full tier. The pull request still builds and runs the instrumented tests. - name: Collect coverage - if: runner.os == 'Linux' + if: runner.os == 'Linux' && (github.event_name == 'push' || env.FULL_TIER == 'true') shell: bash working-directory: build env: @@ -290,7 +283,6 @@ jobs: build/fast-results.xml build/unit-results-*.xml build/ctest-graph.json - build/embedded-cache-probe.txt build/test/unit/consumer-build/.ninja_log build/test-profile* build/*-resources.json diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 8b972b26..2d679f72 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,6 +17,7 @@ these entries stays in the GitHub releases and the Git history. ### Changed - Declare GCC 13 as the best-effort S2 minimum for the library and examples, document the GCC 14 exit clause and qualified Clang scope, and add GCC 13 ASan/UBSan fast tests (#525, ADR-022). +- Skip the cases that configure a CMake project (label `configuration`, about 75 s of worker time) and the coverage capture on a pull request that does not change the build system, and drop the compiler-cache probe step; a push to `develop` and the full tier still run them (#545). - Open the developer page on the interface, over the whole window, once the project has a preview; the terminal moves to a floating, movable window behind a tab on the right edge that shows the session's state, and keeps its session when collapsed. Its shortcut is F9, or the manifest's new optional `developer.terminalShortcut`. Environment sources 0.9.1, not published yet (#539, `docs/DEVELOPER_ENVIRONMENT.md`). - Make the default test build the quick one: the heavy unit tests compile four to a file, the MSVC code analysis and the reproducibility proofs are off unless `-DWEBFRONT_MSVC_ANALYZE=ON` or `-DWEBFRONT_TEST_REPRODUCIBILITY=ON` asks for them. The CI passes every option explicitly and checks what it checked before (#546). diff --git a/docs/TEST_TIERS.md b/docs/TEST_TIERS.md index f1bd57f9..75e9f442 100644 --- a/docs/TEST_TIERS.md +++ b/docs/TEST_TIERS.md @@ -78,6 +78,20 @@ runner. A pull request into `develop` runs them only when it changes one of thei prepare, compare and assemble the self-build project, `LICENSE` and the workflow itself); a push to `develop` and the advanced checks always run them. They are off by default: `-DWEBFRONT_TEST_REPRODUCIBILITY=ON` adds them to a local build. +## Configuration checks + +The cases that configure a CMake project carry the label `configuration` in addition to their tier: the options, the +frontend selection, the module scan, the CEF and WebView2 support, the parent project that adds WebFront as a +subdirectory, and the repetition of the suite itself (`ctest -N -L configuration` lists them). They test the build system, not +the library, and take about 75 s of worker time on a hosted runner. A pull request into `develop` runs them only when it +changes `cmake/`, `CMakeLists.txt`, the CMake modules of `js/core/`, `test/cmake/`, `test/unit/CMakeLists.txt`, the actions +of `.github/actions/` or the workflow itself; a push to `develop`, the weekly run and the full tier always run them. +`AddSubdirectoryNativeConsumer` is not one of them: it compiles the native frontend from a consuming project, so any change +of the headers can break it. Locally, `ctest -LE configuration` leaves them out. + +The coverage capture (`lcov`) runs on a push to `develop` or `master` and in the full tier. A pull request still builds and +runs the instrumented Linux tests, but nothing reads a pull request's capture. + ## Advanced checks These run on the weekly schedule (Monday 04:23 UTC), on every pull request whose base is `master`, and on a manual diff --git a/test/unit/CMakeLists.txt b/test/unit/CMakeLists.txt index 85ac7f30..ad90c7e0 100644 --- a/test/unit/CMakeLists.txt +++ b/test/unit/CMakeLists.txt @@ -390,6 +390,17 @@ if(_consumer_native_enabled) set_tests_properties(AddSubdirectoryNativeConsumer PROPERTIES TIMEOUT 600) endif() +# The cases that configure a CMake project test the build system, not the C++ of the library: a pull request runs them only +# when the build system changes (docs/TEST_TIERS.md). None of them compiles library code, which is why +# AddSubdirectoryNativeConsumer is not among them. `configuration` comes in addition to a tier label. +foreach(_case IN ITEMS ModuleScanWarning TestOptionsConfiguration NativeAutodetectReconfiguration FrontendSelection + FrontendSelectionMultiConfig CEFTestingState CEFCopyDestinations WebView2UnsupportedToolchain WebView2LoaderArchitecture + WKWebViewConfiguration FrontendConsumerConfiguration TestSuiteRepetition) + if(TEST ${_case}) + set_property(TEST ${_case} APPEND PROPERTY LABELS configuration) + endif() +endforeach() + # Manual timing evidence for gzip cache/cold-decode work; never a timing-based test. add_executable(gzip_cache_benchmark EXCLUDE_FROM_ALL GzipCacheBenchmark.cpp) target_link_libraries(gzip_cache_benchmark PRIVATE WebFront_test_hardening WebFront_warnings WebFront_options WebFront) From 0f49f1d8ea500ef4d1143c0566190692281b2a37 Mon Sep 17 00:00:00 2001 From: Ambroise Leclerc <6860842+ambroise-leclerc@users.noreply.github.com> Date: Thu, 12 Nov 2026 19:05:53 +0100 Subject: [PATCH 2/2] Align the configuration timing figure and place the changelog entry (#545) --- .github/workflows/BuildAndTest.yml | 2 +- docs/CHANGELOG.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/BuildAndTest.yml b/.github/workflows/BuildAndTest.yml index 829dc438..909eb1ce 100644 --- a/.github/workflows/BuildAndTest.yml +++ b/.github/workflows/BuildAndTest.yml @@ -108,7 +108,7 @@ jobs: fi echo "Reproducibility builds: $reproducibility" echo "WEBFRONT_REPRODUCIBILITY=$reproducibility" >> "$GITHUB_ENV" - # The cases that configure a CMake project (label `configuration`, about 100 s of worker time on Windows) test the build + # The cases that configure a CMake project (label `configuration`, about 75 s of worker time on Windows) test the build # system: a pull request into develop runs them only when it changes the build system or this workflow. A push to # develop and the full tier always run them. - name: Decide whether the configuration checks run diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 2d679f72..df269b73 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -17,8 +17,8 @@ these entries stays in the GitHub releases and the Git history. ### Changed - Declare GCC 13 as the best-effort S2 minimum for the library and examples, document the GCC 14 exit clause and qualified Clang scope, and add GCC 13 ASan/UBSan fast tests (#525, ADR-022). -- Skip the cases that configure a CMake project (label `configuration`, about 75 s of worker time) and the coverage capture on a pull request that does not change the build system, and drop the compiler-cache probe step; a push to `develop` and the full tier still run them (#545). +- Skip the cases that configure a CMake project (label `configuration`, about 75 s of worker time) and the coverage capture on a pull request that does not change the build system, and drop the compiler-cache probe step; a push to `develop` and the full tier still run them (#545). - Open the developer page on the interface, over the whole window, once the project has a preview; the terminal moves to a floating, movable window behind a tab on the right edge that shows the session's state, and keeps its session when collapsed. Its shortcut is F9, or the manifest's new optional `developer.terminalShortcut`. Environment sources 0.9.1, not published yet (#539, `docs/DEVELOPER_ENVIRONMENT.md`). - Make the default test build the quick one: the heavy unit tests compile four to a file, the MSVC code analysis and the reproducibility proofs are off unless `-DWEBFRONT_MSVC_ANALYZE=ON` or `-DWEBFRONT_TEST_REPRODUCIBILITY=ON` asks for them. The CI passes every option explicitly and checks what it checked before (#546). - Run the unit tests as a few processes instead of one per scenario with `-DWEBFRONT_TEST_UNIT_SHARDS=`: each of the `n` CTest cases is a Catch2 shard that reports every scenario in `unit-results-.xml`. The default still registers one CTest case per scenario; the desktop CI jobs pass 4 and no longer run the fast tier twice on a pull request (#543).