Skip to content

Commit 98a6a5c

Browse files
committed
Trying another way of adding windows-2022 C++20
1 parent ab907f4 commit 98a6a5c

File tree

1 file changed

+46
-4
lines changed

1 file changed

+46
-4
lines changed

.github/workflows/ci.yml

Lines changed: 46 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,9 @@ jobs:
4949
python: '3.6'
5050
args: >
5151
-DPYBIND11_FINDPYTHON=ON
52+
# Inject a couple Windows 2019 runs
5253
- runs-on: windows-2019
5354
python: '3.9'
54-
- runs-on: windows-2022
55-
python: '3.9'
56-
args: >
57-
-DCMAKE_CXX_STANDARD=20
5855

5956
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
6057
runs-on: ${{ matrix.runs-on }}
@@ -808,6 +805,51 @@ jobs:
808805
- name: Run all checks
809806
run: cmake --build build -t check
810807

808+
windows-2022:
809+
strategy:
810+
fail-fast: false
811+
matrix:
812+
python:
813+
- 3.9
814+
815+
name: "🐍 ${{ matrix.python }} • MSVC 2022 C++20 • x64"
816+
runs-on: windows-2022
817+
818+
steps:
819+
- uses: actions/checkout@v2
820+
821+
- name: Setup Python ${{ matrix.python }}
822+
uses: actions/setup-python@v2
823+
with:
824+
python-version: ${{ matrix.python }}
825+
826+
- name: Prepare env
827+
run: |
828+
python3 -m pip install -r tests/requirements.txt
829+
830+
- name: Update CMake
831+
uses: jwlawson/[email protected]
832+
833+
- name: Configure C++20
834+
run: >
835+
cmake -S . -B build
836+
-DPYBIND11_WERROR=ON
837+
-DDOWNLOAD_CATCH=ON
838+
-DDOWNLOAD_EIGEN=OFF
839+
-DCMAKE_CXX_STANDARD=20
840+
841+
- name: Build C++20
842+
run: cmake --build build -j 2
843+
844+
- name: Python tests
845+
run: cmake --build build --target pytest
846+
847+
- name: C++20 tests
848+
run: cmake --build build --target cpptest -j 2
849+
850+
- name: Interface test C++20
851+
run: cmake --build build --target test_cmake_build
852+
811853
mingw:
812854
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
813855
runs-on: windows-latest

0 commit comments

Comments
 (0)