Skip to content

Commit d4d555d

Browse files
authored
Restore runs-on: windows-latest (#5835)
* Revert "s/windows-2022/windows-latest/ in .github/workflows/{ci,pip}.yml (#5826)" This reverts commit 852a4b5. * Add module-level skip for Windows build >= 26100 in test_iostream.py * Changes suggested by at-henryiii
1 parent 937552f commit d4d555d

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
- runs-on: macos-latest
120120
python-version: 'graalpy-24.2'
121121

122-
- runs-on: windows-2022
122+
- runs-on: windows-latest
123123
python-version: '3.9'
124124
cmake-args: -DPYBIND11_TEST_SMART_HOLDER=ON
125125
- runs-on: windows-2022
@@ -138,19 +138,19 @@ jobs:
138138
- runs-on: windows-2022
139139
python-version: '3.13'
140140
cmake-args: -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDebugDLL
141-
- runs-on: windows-2022
141+
- runs-on: windows-latest
142142
python-version: '3.13t'
143143
cmake-args: -DCMAKE_CXX_STANDARD=17
144-
- runs-on: windows-2022
144+
- runs-on: windows-latest
145145
python-version: '3.14'
146146
cmake-args: -DCMAKE_CXX_STANDARD=20
147-
- runs-on: windows-2022
147+
- runs-on: windows-latest
148148
python-version: '3.14t'
149149
cmake-args: -DCMAKE_CXX_STANDARD=23
150-
- runs-on: windows-2022
150+
- runs-on: windows-latest
151151
python-version: 'pypy-3.10'
152152
cmake-args: -DCMAKE_CXX_STANDARD=17
153-
- runs-on: windows-2022
153+
- runs-on: windows-latest
154154
python-version: 'pypy3.11'
155155
cmake-args: -DCMAKE_CXX_STANDARD=20
156156
# The setup-python action currently doesn't have graalpy for windows
@@ -174,7 +174,7 @@ jobs:
174174
python-version: '3.9'
175175
- runs-on: macos-latest
176176
python-version: '3.12'
177-
- runs-on: windows-2022
177+
- runs-on: windows-latest
178178
python-version: '3.11'
179179

180180
name: "🐍 ${{ matrix.python-version }} • ${{ matrix.runs-on }} • x64 inplace C++14"
@@ -1010,8 +1010,8 @@ jobs:
10101010

10111011
mingw:
10121012
if: github.event.pull_request.draft == false
1013-
name: "🐍 3 • windows-2022 • ${{ matrix.sys }}"
1014-
runs-on: windows-2022
1013+
name: "🐍 3 • windows-latest • ${{ matrix.sys }}"
1014+
runs-on: windows-latest
10151015
defaults:
10161016
run:
10171017
shell: msys2 {0}
@@ -1121,7 +1121,7 @@ jobs:
11211121

11221122
strategy:
11231123
matrix:
1124-
os: [windows-2022]
1124+
os: [windows-latest]
11251125
python: ['3.10']
11261126

11271127
runs-on: "${{ matrix.os }}"

.github/workflows/pip.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ jobs:
1919
# This builds the sdists and wheels and makes sure the files are exactly as
2020
# expected.
2121
test-packaging:
22-
name: 🐍 3.8 • 📦 tests • windows-2022
23-
runs-on: windows-2022
22+
name: 🐍 3.8 • 📦 tests • windows-latest
23+
runs-on: windows-latest
2424

2525
steps:
2626
- uses: actions/checkout@v5

tests/test_iostream.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,19 @@
66

77
import pytest
88

9+
import env
910
from pybind11_tests import iostream as m
1011

12+
if env.WIN:
13+
wv_build = sys.getwindowsversion().build
14+
skip_if_ge = 26100
15+
if wv_build >= skip_if_ge:
16+
pytest.skip(
17+
f"Windows build {wv_build} >= {skip_if_ge}:"
18+
" Skipping iostream capture (redirection regression needs investigation)",
19+
allow_module_level=True,
20+
)
21+
1122

1223
def test_captured(capsys):
1324
msg = "I've been redirected to Python, I hope!"

0 commit comments

Comments
 (0)