@@ -41,87 +41,44 @@ jobs:
41
41
rm -rf ./* || true
42
42
rm -rf ./.??* || true
43
43
working-directory : ${{ github.workspace }}
44
-
45
44
- name : Setup environment
46
45
shell : bash
47
46
run : |
48
47
if [[ "${{ github.event_name }}" == "schedule" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
49
48
echo "ENABLE_ROLLING=1" >> $GITHUB_ENV
50
49
fi
51
-
52
50
- name : Checkout
53
51
uses : actions/checkout@v3
54
52
with :
55
53
submodules : false
56
54
fetch-depth : 0
57
-
58
55
- name : Set up Python ${{ matrix.python-version }}
59
56
uses : actions/setup-python@v4
60
57
with :
61
58
python-version : ${{ matrix.python-version }}
62
59
architecture : ${{ matrix.platform }}
63
-
64
60
- name : Setup MSBuild.exe
65
61
66
-
67
62
- name : Setup NASM
68
63
uses : ilammy/setup-nasm@v1
69
64
70
-
71
- - name : Setup OpenBLAS
72
- shell : cmd
73
- run : |
74
- setlocal enableextensions enabledelayedexpansion
75
-
76
- rem Determine correct architecture
77
- if "%{matrix.platform}%"=="x64" (
78
- set ARCH=x64
79
- set FOLDER=win64
80
- ) else (
81
- set ARCH=x86
82
- set FOLDER=win32
83
- )
84
-
85
- mkdir openblas
86
- cd openblas
87
- curl -L -o OpenBLAS.zip https://downloads.sourceforge.net/project/openblas/v0.3.24/OpenBLAS-0.3.24-%ARCH%.zip
88
- powershell -Command "Expand-Archive -Path OpenBLAS.zip -DestinationPath ."
89
-
90
- set "OpenBLAS_HOME=%CD%"
91
- echo OpenBLAS_HOME=%OpenBLAS_HOME%
92
- set "PATH=%OpenBLAS_HOME%\bin;%PATH%"
93
-
94
- if exist %OpenBLAS_HOME%\bin\libopenblas.dll (
95
- copy /y %OpenBLAS_HOME%\bin\libopenblas.dll %OpenBLAS_HOME%\bin\libopenblas.exp.dll
96
- )
97
- echo Listing OpenBLAS directory:
98
- dir %OpenBLAS_HOME%\bin
99
- echo Finished OpenBLAS setup
100
- cd ..
101
- echo set "OpenBLAS_HOME=%OpenBLAS_HOME%" > set_openblas_env.cmd
102
-
103
65
- name : Build a package
66
+ # CMake 3.25 regression fix. See https://stackoverflow.com/questions/74162633/problem-compiling-from-source-opencv-with-mvsc2019-in-64-bit-version
104
67
run : |
105
- call set_openblas_env.cmd
68
+ set "VISUAL_STUDIO=17"
106
69
python --version
107
70
python -m pip install --upgrade pip
108
71
python -m pip install --upgrade setuptools
109
72
python -m pip install cmake==3.24.2
110
73
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
111
-
112
- set "OpenBLAS_HOME_UNIX=%OpenBLAS_HOME:\=/%"
113
- set "CMAKE_ARGS=-DLAPACK=ON -DOpenBLAS_INCLUDE_DIR=%OpenBLAS_HOME_UNIX%/include -DOpenBLAS_LIBRARIES=%OpenBLAS_HOME_UNIX%/lib/libopenblas.lib"
114
- echo %CMAKE_ARGS%
115
- dir
116
- python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\\wheelhouse -v
74
+ set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=%cd%\wheelhouse -v
117
75
shell : cmd
118
76
119
77
- name : Saving all wheels
120
78
uses : actions/upload-artifact@v4
121
79
with :
122
80
name : wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}-${{ matrix.platform }}
123
- path : |
124
- wheelhouse/opencv*
81
+ path : wheelhouse/opencv*
125
82
126
83
Test :
127
84
needs : [Build]
@@ -158,26 +115,22 @@ jobs:
158
115
with :
159
116
python-version : ${{ matrix.python-version }}
160
117
architecture : ${{ matrix.platform }}
161
-
162
118
- name : Download a wheel accordingly to matrix
163
119
uses : actions/download-artifact@v4
164
120
with :
165
121
name : wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}-${{ matrix.platform }}
166
122
path : wheelhouse/
167
-
168
123
- name : Package installation
169
124
run : |
170
125
cd ${{ github.workspace }}/tests
171
126
&python -m pip install --user --no-warn-script-location (ls "../wheelhouse/opencv*.whl")
172
127
if ($LastExitCode -ne 0) {throw $LastExitCode}
173
128
python get_build_info.py
174
129
shell : powershell
175
-
176
130
- name : Run tests
177
131
run : |
178
132
cd ${{ github.workspace }}/opencv
179
133
python modules\python\test\test.py -v --repo .
180
-
181
134
- name : Pylint test
182
135
run : |
183
136
python -m pip install pylint==2.15.9
0 commit comments