From a0911a64adc8164fa1df349ab25510fb7d731bc5 Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Wed, 7 Jan 2026 02:48:13 +0000 Subject: [PATCH 1/4] [ci] Add a couple of Windows jobs to GHA --- .github/workflows/test.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5f26d53..f370349 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -54,6 +54,11 @@ jobs: # AppleClang on macOS - os: macos-15 comp: AppleClang # default compiler, unused var to show in GH UI + # MSVC on Windows + - os: windows-2019 + comp: MSVC # Visual Studio 2019 ATTOW + - os: windows-2025 + comp: MSVC # Visual Studio 2022 ATTOW runs-on: ${{matrix.os}} steps: From 1ba1a4fdc590a91d22550cbe82b221351c4b73ee Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Wed, 7 Jan 2026 03:02:08 +0000 Subject: [PATCH 2/4] [ci] Determine the number of cpus on windows --- .github/workflows/test.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f370349..26ce0f5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -74,12 +74,15 @@ jobs: - name: Determine number of cpus on Linux if: startsWith(matrix.os, 'ubuntu') - run: echo "num_cpus=$(nproc)" >> $GITHUB_ENV # TODO use set-output instead + run: echo "num_cpus=$(nproc)" >> $GITHUB_ENV - name: Determine number of cpus on macOS if: startsWith(matrix.os, 'macos') - run: echo "num_cpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV # TODO use set-output instead + run: echo "num_cpus=$(sysctl -n hw.ncpu)" >> $GITHUB_ENV + - name: Determine number of cpus on Windows + if: startsWith(matrix.os, 'windows') + run: echo "num_cpus=$env:NUMBER_OF_PROCESSORS" >> $env:GITHUB_ENV - name: Determine compiler flag if: ${{matrix.compiler}} run: echo "CXX=${{matrix.compiler}}" >> $GITHUB_ENV From bf3c13f6e019b306a1c6efc2c93f343bef1598ab Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Wed, 7 Jan 2026 03:03:38 +0000 Subject: [PATCH 3/4] [ci] Use generic syntax for var expansion --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26ce0f5..793c0f8 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -88,12 +88,12 @@ jobs: run: echo "CXX=${{matrix.compiler}}" >> $GITHUB_ENV - name: Configure CMake - run: cmake -Wdev -Werror=dev -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${BUILD_TYPE} + run: cmake -Wdev -Werror=dev -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{matrix.extra_build_flags}} - name: Build working-directory: ${{github.workspace}}/build - run: cmake --build . --config ${BUILD_TYPE} --parallel ${num_cpus} + run: cmake --build . --config ${{env.BUILD_TYPE}} --parallel ${{env.num_cpus}} - name: Test working-directory: ${{github.workspace}}/build From ba3a0e392c2d3278e2e199e691521d39ee4f9f82 Mon Sep 17 00:00:00 2001 From: Ricardo Abreu Date: Wed, 7 Jan 2026 04:05:37 +0000 Subject: [PATCH 4/4] [ci] Adapt compilation tests to support Windows --- .github/workflows/test.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 793c0f8..441fc05 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -83,6 +83,17 @@ jobs: - name: Determine number of cpus on Windows if: startsWith(matrix.os, 'windows') run: echo "num_cpus=$env:NUMBER_OF_PROCESSORS" >> $env:GITHUB_ENV + + - name: Determine number of compilation test jobs on macOS and Linux + if: ${{ !startsWith(matrix.os, 'windows') }} + shell: bash + run: echo "num_comp_tests=$((${{env.num_cpus}} * 2))" >> $GITHUB_ENV + + - name: Determine number of compilation test jobs on Windows + if: startsWith(matrix.os, 'windows') + shell: bash + run: echo "num_comp_tests=1" >> $GITHUB_ENV + - name: Determine compiler flag if: ${{matrix.compiler}} run: echo "CXX=${{matrix.compiler}}" >> $GITHUB_ENV @@ -97,10 +108,8 @@ jobs: - name: Test working-directory: ${{github.workspace}}/build - run: cmake --build . --config ${BUILD_TYPE} --target test - ARGS=-j$((${num_cpus} * 2)) # don't pass --parallel, which would affect compilation tests, - # but do run twice as many compilation tests as the number of - # available threads + run: cmake --build . --config ${{env.BUILD_TYPE}} --target test + ARGS=-j${{env.num_comp_tests}} # don't pass --parallel, which would affect compilation tests - name: Produce coverage reports if: contains(matrix.extra_build_flags, 'coverage')