Hi, On Sat, 7 Nov 2026 at 23:10, Andres Freund <[email protected]> wrote: > > I've pushed the previous patches I had posted to 19 and master. I also have > an LLM translated set of patches for CI for 15-18 that needs some more > polish... > > > On 2026-11-05 17:22:36 +0300, Nazir Bilal Yavuz wrote: > > Here are two more follow-up patches; the other patches are unchanged. > > Can you rebase them over what's now been merged?
Done in v16. > > Different methods are tested with cold and warm compiler caches on a > > four-core GitHub-hosted runner. Total CompilerWarnings job times are: > > > > Cold Warm > > Default 20m 56s 3m 57s > > Parallel configure, sequential builds 19m 47s 3m 04s > > Pairs of checks, ninja -j 2 18m 10s 3m 49s > > All checks in parallel, ninja -j 1 15m 26s 2m 30s > > All checks in parallel, default ninja jobs 17m 03s 3m 48s > > I think the gains of "All checks in parallel, ninja -j 1" are large enough to > make this worthwhile pursuing? I agree it is %~25 better compared to upstream. > > Subject: [PATCH v15 7/8] ci: Upgrade GitHub Actions' runner OS versions > > > > Use Ubuntu 26.04, macOS 26, and Windows Server 2025 as runner operating > > sytems. > > > > Update the MacPorts version to one providing a macOS 26 installer. > > Locate Visual Studio with vswhere instead of assuming the installation > > path, as new versions might provide different Visual Studio versions > > (2026 in this case). > > Might be worth breaking out the vswhere stuff might best be broken out into > its own commit? Yes, the vswhere stuff is in 0001 now. > > Subject: [PATCH v15 8/8] ci: Run compiler warning checks in parallel > > > > Use a GitHub Actions parallel step group for the CompilerWarnings job. > > + PARALLEL_CHECKS: 7 > > + > > steps: > > - *nix_sysinfo_step > > - *checkout_step > > - *ccache_restore_default_step > > - *ccache_restore_branch_step > > > > + # Share the runner's CPUs between the seven parallel builds below, > > + # rather than letting each ninja invocation use all of them. > > + - name: Set build concurrency > > run: | > > + jobs=$(( $(nproc) / $PARALLEL_CHECKS )) > > + if [ "$jobs" -lt 1 ]; then jobs=1; fi > > + echo "Ninja jobs per build: $jobs" > > + echo "NINJA_JOBS=$jobs" >> "$GITHUB_ENV" > > + > > + # Each check needs its own build directory. The parallel group waits > > + # for all checks before the cache is saved and failure logs uploaded. > > + # Update PARALLEL_CHECKS when adding or removing a check. > > Kinda annoying to have to maintain PARALLEL_CHECKS that way, but I can't > immediately come up with a better way. Yes, I couldn't come up with better solution. Having a comment makes it easier to maintain at least. -- Regards, Nazir Bilal Yavuz Microsoft
From 6083495611a0ec99ee31cb97317f96901f2fc1d1 Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz <[email protected]> Date: Mon, 9 Nov 2026 10:05:22 +0300 Subject: [PATCH v16 1/3] ci: Locate Visual Studio dynamically on Windows The Visual Studio version and edition vary between runner images, so hardcoding the path prevents using runners with a different installation. Use vswhere to locate the latest installation with the required C++ tools and save its vcvarsall.bat path in GITHUB_ENV. Suggested-by: Andres Freund <[email protected]> Author: Nazir Bilal Yavuz <[email protected]> Reviewed-by: Andres Freund <[email protected]> Discussion: https://postgr.es/m/CAN55FZ1BcWBsWgCCk2GQkYN6tzDxCw2hVK2m3qeiwaNXUnjLVg%40mail.gmail.com --- .github/workflows/pg-ci.yml | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml index 9e55f0fbc45..baf9ba3ca22 100644 --- a/.github/workflows/pg-ci.yml +++ b/.github/workflows/pg-ci.yml @@ -1036,9 +1036,18 @@ jobs: shell: pwsh run: src/tools/ci/gha_setup_windows_debugger.ps1 + # The Visual Studio version and edition depend on the runner image. + - name: Locate Visual Studio + shell: pwsh + run: | + $vswhere = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" + $vs = & $vswhere -latest -products '*' -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + if (!$? -or !$vs) { throw 'Could not locate Visual Studio C++ tools' } + Add-Content $env:GITHUB_ENV "VCVARSALL=$vs\VC\Auxiliary\Build\vcvarsall.bat" + - name: Configure run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + call "%VCVARSALL%" x64 meson setup ^ --backend ninja ^ ${{env.MESON_COMMON_PG_CONFIG_ARGS}} ^ @@ -1050,7 +1059,7 @@ jobs: - name: Build run: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + call "%VCVARSALL%" x64 ninja -C build ${{env.MBUILD_TARGET}} || exit 1 ninja -C build -t missingdeps @@ -1062,7 +1071,7 @@ jobs: # doesn't seem worth it. MTEST_TARGET: --slice ${{ matrix.slice}}/${{ matrix.num_slices}} ${{env.MTEST_TARGET}} ADDITIONAL_SETUP: | - call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + call "%VCVARSALL%" x64 run: *meson_test_world_cmd - *upload_logs_step -- 2.47.3
From a7884a009ace0650d85fdb678e49cb877f06d448 Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz <[email protected]> Date: Mon, 9 Nov 2026 10:08:53 +0300 Subject: [PATCH v16 2/3] ci: Upgrade GitHub Actions' runner OS versions Use Ubuntu 26.04, macOS 26, and Windows Server 2025 as runner operating systems. Update the MacPorts version to one providing a macOS 26 installer. Suggested-by: Andres Freund <[email protected]> Author: Nazir Bilal Yavuz <[email protected]> Reviewed-by: Andres Freund <[email protected]> Discussion: https://postgr.es/m/CAN55FZ1BcWBsWgCCk2GQkYN6tzDxCw2hVK2m3qeiwaNXUnjLVg%40mail.gmail.com --- .github/workflows/pg-ci.yml | 6 +++--- src/tools/ci/ci_macports_packages.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml index baf9ba3ca22..17d6ea8d2c2 100644 --- a/.github/workflows/pg-ci.yml +++ b/.github/workflows/pg-ci.yml @@ -208,9 +208,9 @@ jobs: # used centrally. We don't just want to use ubuntu-latest, as it's not # implausible there will be breakage when that switches to the next # ubuntu version. - runs_on_linux: ${{ vars.PG_CI_RUNS_ON_LINUX || 'ubuntu-24.04' }} - runs_on_windows: ${{ vars.PG_CI_RUNS_ON_WINDOWS || 'windows-2022' }} - runs_on_macos: ${{ vars.PG_CI_RUNS_ON_MACOS || 'macos-15' }} + runs_on_linux: ${{ vars.PG_CI_RUNS_ON_LINUX || 'ubuntu-26.04' }} + runs_on_windows: ${{ vars.PG_CI_RUNS_ON_WINDOWS || 'windows-2025' }} + runs_on_macos: ${{ vars.PG_CI_RUNS_ON_MACOS || 'macos-26' }} # Exports: # diff --git a/src/tools/ci/ci_macports_packages.sh b/src/tools/ci/ci_macports_packages.sh index 092d8cd7e8f..550a0221d1d 100755 --- a/src/tools/ci/ci_macports_packages.sh +++ b/src/tools/ci/ci_macports_packages.sh @@ -19,7 +19,7 @@ echo "macOS major version: $macos_major_version" # Scan the available MacPorts releases to find one that matches the running # macOS release. macports_release_list_url="https://api.github.com/repos/macports/macports-base/releases" -macports_version_pattern="2\.10\.1" +macports_version_pattern="2\.12\.7" # Authenticate the GitHub API request when a token is available (e.g. on # GitHub Actions). Unauthenticated requests share a 60/h/IP rate limit # with every other job on the runner's IP and frequently return an error -- 2.47.3
From f8674e73e1c4b11fc54ba914e8a642dcad41bc90 Mon Sep 17 00:00:00 2001 From: Nazir Bilal Yavuz <[email protected]> Date: Thu, 5 Nov 2026 10:30:48 +0300 Subject: [PATCH v16 3/3] ci: Run compiler warning checks in parallel MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use a GitHub Actions parallel step group for the CompilerWarnings job. Give each configuration its own build directory and divide Ninja's job count among the seven checks, with at least one job per check. Preserve all build configurations and wait for every check before saving ccache or uploading failure logs. Include the nested Meson log directories in the uploaded artifacts. Different methods are tested with cold and warm compiler caches on a four-core GitHub-hosted runner. Total CompilerWarnings job times are: Cold Warm Default 20m 56s 3m 57s Parallel configure, sequential builds 19m 47s 3m 04s Pairs of checks, ninja -j 2 18m 10s 3m 49s All checks in parallel, ninja -j 1 15m 26s 2m 30s All checks in parallel, default ninja jobs 17m 03s 3m 48s - Parallel configure, sequential builds: Configure all seven checks concurrently, then build them one at a time using Ninja’s default concurrency. - Pairs of checks, ninja -j 2: Run configuration and build in three successive pairs with two Ninja jobs per check, then run the remaining header check alone with default concurrency. - All checks in parallel, ninja -j 1: Run all seven configure/build sequences concurrently, limiting each Ninja invocation to one job. - All checks in parallel, default Ninja jobs: Same as above but using Ninja's default concurrency. Based on this result, 'all checks in parallel, ninja -j 1' is selected. Suggested-by: Andres Freund <[email protected]> Author: Nazir Bilal Yavuz <[email protected]> Reviewed-by: Andres Freund <[email protected]> Discussion: https://postgr.es/m/CAN55FZ1BcWBsWgCCk2GQkYN6tzDxCw2hVK2m3qeiwaNXUnjLVg%40mail.gmail.com --- .github/workflows/pg-ci.yml | 214 ++++++++++++++++++++---------------- 1 file changed, 117 insertions(+), 97 deletions(-) diff --git a/.github/workflows/pg-ci.yml b/.github/workflows/pg-ci.yml index 17d6ea8d2c2..2b204140350 100644 --- a/.github/workflows/pg-ci.yml +++ b/.github/workflows/pg-ci.yml @@ -447,7 +447,7 @@ jobs: **/*.diffs **/regress_log_* **/crashlog-*.txt - build/meson-logs/** + build/**/meson-logs/** **/config.log if-no-files-found: ignore @@ -1225,109 +1225,129 @@ jobs: -Dsystemd=enabled -Duuid=ossp + PARALLEL_CHECKS: 7 + steps: - *nix_sysinfo_step - *checkout_step - *ccache_restore_default_step - *ccache_restore_branch_step - # gcc, cassert off, dtrace on - - name: gcc warnings + (dtrace) - if: ${{ !cancelled() }} - env: - CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} -Ddtrace=enabled - CC: ccache gcc - CXX: ccache g++ - run: &compiler_warnings_cmd | - echo "::group::configure" - rm -rf build - meson setup \ - -Dwerror=true \ - -Ddebug=false \ - ${{env.CONF}} \ - build - echo "::endgroup::" - - ninja -C build --quiet ${{env.MBUILD_TARGET}} - - # gcc, cassert on, dtrace off - - name: gcc warnings + (cassert) - if: ${{ !cancelled() }} - env: - CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} -Dcassert=true - CC: ccache gcc - CXX: ccache g++ - run: *compiler_warnings_cmd - - # clang, cassert off, dtrace off - - name: clang warnings - if: ${{ !cancelled() }} - env: - CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} - CC: ccache clang - CXX: ccache clang++ - run: *compiler_warnings_cmd - - # clang, cassert on, dtrace on - - name: clang warnings + (cassert + dtrace) - if: ${{ !cancelled() }} - env: - CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} -Dcassert=true -Ddtrace=enabled - CC: ccache clang - CXX: ccache clang++ - run: *compiler_warnings_cmd - - - name: mingw warnings (cross compilation) - if: ${{ !cancelled() }} - env: - CONF: >- - --cross-file src/tools/ci/mingw-cross-file.txt - -Db_pch=true - -Dcassert=true - -Dauto_features=disabled - -Dzlib=enabled - MBUILD_TARGET: all - run: *compiler_warnings_cmd - - ### - # Verify docs can be built - ### - # XXX: Only do this if there have been changes in doc/ since last build - - name: Build documentation - if: ${{ !cancelled() }} - env: - CONF: -Dauto_features=disabled -Ddocs=enabled - CC: ccache gcc - CXX: ccache g++ - MBUILD_TARGET: docs - run: *compiler_warnings_cmd - - ### - # Verify headerscheck / cpluspluscheck succeed - # - # - Run both in the same ninja invocation to increase parallelism, use - # -k 0 to get the result of both - # - Use -fmax-errors, as particularly cpluspluscheck can be very verbose - ### - - name: headerscheck + cpluspluscheck - if: ${{ !cancelled() }} - env: - CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} - CC: ccache gcc - CXX: ccache g++ - EXTRAFLAGS: -fmax-errors=10 + # Share the runner's CPUs between the seven parallel builds below, + # rather than letting each ninja invocation use all of them. + - name: Set build concurrency run: | - echo "::group::configure" - rm -rf build - meson setup \ - -Dwerror=true \ - -Ddebug=false \ - ${{env.CONF}} \ - build - echo "::endgroup::" - - ninja -C build --quiet -k 0 \ - headerscheck cpluspluscheck + jobs=$(( $(nproc) / $PARALLEL_CHECKS )) + if [ "$jobs" -lt 1 ]; then jobs=1; fi + echo "Ninja jobs per build: $jobs" + echo "NINJA_JOBS=$jobs" >> "$GITHUB_ENV" + + # Each check needs its own build directory. The parallel group waits + # for all checks before the cache is saved and failure logs uploaded. + # Update PARALLEL_CHECKS when adding or removing a check. + - parallel: + # gcc, cassert off, dtrace on + - name: gcc warnings + (dtrace) + if: ${{ !cancelled() }} + env: + BUILD_DIR: build/gcc-dtrace + CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} -Ddtrace=enabled + CC: ccache gcc + CXX: ccache g++ + run: &compiler_warnings_cmd | + echo "::group::configure" + meson setup \ + -Dwerror=true \ + -Ddebug=false \ + ${{env.CONF}} \ + "$BUILD_DIR" + echo "::endgroup::" + + ninja -C "$BUILD_DIR" --quiet -j "$NINJA_JOBS" ${{env.MBUILD_TARGET}} + + # gcc, cassert on, dtrace off + - name: gcc warnings + (cassert) + if: ${{ !cancelled() }} + env: + BUILD_DIR: build/gcc-cassert + CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} -Dcassert=true + CC: ccache gcc + CXX: ccache g++ + run: *compiler_warnings_cmd + + # clang, cassert off, dtrace off + - name: clang warnings + if: ${{ !cancelled() }} + env: + BUILD_DIR: build/clang + CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} + CC: ccache clang + CXX: ccache clang++ + run: *compiler_warnings_cmd + + # clang, cassert on, dtrace on + - name: clang warnings + (cassert + dtrace) + if: ${{ !cancelled() }} + env: + BUILD_DIR: build/clang-cassert-dtrace + CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} -Dcassert=true -Ddtrace=enabled + CC: ccache clang + CXX: ccache clang++ + run: *compiler_warnings_cmd + + - name: mingw warnings (cross compilation) + if: ${{ !cancelled() }} + env: + BUILD_DIR: build/mingw + CONF: >- + --cross-file src/tools/ci/mingw-cross-file.txt + -Db_pch=true + -Dcassert=true + -Dauto_features=disabled + -Dzlib=enabled + MBUILD_TARGET: all + run: *compiler_warnings_cmd + + ### + # Verify docs can be built + ### + # XXX: Only do this if there have been changes in doc/ since last build + - name: Build documentation + if: ${{ !cancelled() }} + env: + BUILD_DIR: build/docs + CONF: -Dauto_features=disabled -Ddocs=enabled + CC: ccache gcc + CXX: ccache g++ + MBUILD_TARGET: docs + run: *compiler_warnings_cmd + + ### + # Verify headerscheck / cpluspluscheck succeed + # + # - Run both in the same ninja invocation to increase parallelism, use + # -k 0 to get the result of both + # - Use -fmax-errors, as particularly cpluspluscheck can be very verbose + ### + - name: headerscheck + cpluspluscheck + if: ${{ !cancelled() }} + env: + BUILD_DIR: build/headers_cplusplus + CONF: ${{env.MESON_COMMON_FEATURES}} ${{env.MESON_FEATURES}} + CC: ccache gcc + CXX: ccache g++ + EXTRAFLAGS: -fmax-errors=10 + run: | + echo "::group::configure" + meson setup \ + -Dwerror=true \ + -Ddebug=false \ + ${{env.CONF}} \ + "$BUILD_DIR" + echo "::endgroup::" + + ninja -C "$BUILD_DIR" --quiet -j "$NINJA_JOBS" -k 0 \ + headerscheck cpluspluscheck - *ccache_decide_save_step - *ccache_save_step -- 2.47.3
