Skip to content

Commit 6d05488

Browse files
authored
Fix Windows builds for 5.x branch. (#1235)
Fix Windows builds for 5.x branch by disabling assembler.
1 parent e6f08c8 commit 6d05488

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/build_wheels_windows.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ on:
1717

1818
jobs:
1919
Build:
20-
runs-on: windows-2025
20+
runs-on: windows-2022
2121
strategy:
2222
fail-fast: false
2323
matrix:
@@ -65,7 +65,7 @@ jobs:
6565
python --version
6666
python -m pip install --upgrade pip
6767
python -m pip install --upgrade setuptools
68-
python -m pip install cmake==3.24.2
68+
python -m pip install cmake==4.3.2
6969
python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
7070
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
7171
shell: cmd
@@ -77,14 +77,14 @@ jobs:
7777

7878
Test:
7979
needs: [Build]
80-
runs-on: windows-2025
80+
runs-on: windows-2022
8181
defaults:
8282
run:
8383
shell: cmd
8484
strategy:
8585
fail-fast: false
8686
matrix:
87-
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13']
87+
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
8888
platform: [x86, x64]
8989
with_contrib: [0, 1]
9090
without_gui: [0, 1]

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,11 @@ def main():
147147
# Raw paths relative to sourcetree root.
148148
files_outside_package_dir = {"cv2": ["LICENSE.txt", "LICENSE-3RD-PARTY.txt"]}
149149

150+
# HACK: Disabled generic assembler for now.
151+
# Windows 2025 CI environment does not provide suitable assembler or build is broken in OpenCV MLAS.
150152
ci_cmake_generator = (
151-
["-G", "Visual Studio 17 2022"]
153+
["-G", "Visual Studio 17 2022",
154+
"-DCMAKE_ASM_COMPILER="]
152155
if os.name == "nt"
153156
else ["-G", "Unix Makefiles"]
154157
)

0 commit comments

Comments
 (0)