-
Notifications
You must be signed in to change notification settings - Fork 19
249 lines (244 loc) · 13.4 KB
/
OCV-WinPack-4.x-W10.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
name: OCV WinPack:4.x W10
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/OCV-WinPack-4.x-W10.yaml'
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
concurrency:
group: OCV-WinPack-4.x-W10-${{ github.ref }}
cancel-in-progress: true
env:
BRANCH_NAME: 4.x
jobs:
Build:
runs-on: opencv-cn-win
defaults:
run:
shell: cmd
steps:
- name: Clean
timeout-minutes: 60
run: cd ${{ github.workspace }} && rm -rf *
- name: Clone opencv
timeout-minutes: 60
run: cd ${{ github.workspace }} && git clone --branch ${{ env.BRANCH_NAME }} --reference %GIT_CACHE%\opencv.git [email protected]:opencv/opencv.git
- name: Cmake OpenCV
timeout-minutes: 60
env:
EXTRA_CMAKE_OPTIONS: '-DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DOPENCV_PYTHON_INSTALL_PATH=python -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install -DBUILD_SHARED_LIBS=ON -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DINSTALL_PDB=ON -DINSTALL_PDB_COMPONENT_EXCLUDE_FROM_ALL=OFF -DCPU_BASELINE=SSE3 -DOPENCV_INSTALL_DATA_DIR_RELATIVE=${{ github.workspace }}\\opencv -DWITH_LAPACK=OFF -DVIDEOIO_PLUGIN_LIST=all -DINSTALL_CREATE_DISTRIB=ON -DBUILD_DOCS=OFF -DOPENCV_GENERATE_SETUPVARS=ON -DWITH_OPENCL=ON -DBUILD_opencv_python3=OFF -DBUILD_opencv_python2=OFF -DWITH_TBB=OFF -DWITH_CUDA=OFF -DBUILD_opencv_java=OFF'
run: |
mkdir ${{ github.workspace }}\build && cd ${{ github.workspace }}\build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv
- name: Compile OpenCV debug
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config debug --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Compile OpenCV release 1
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target gen_opencv_python_source -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Compile OpenCV release 2
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Cmake py36
timeout-minutes: 60
run: |
set PATH=c:\\Python-3.6\\;c:\\Python-3.6\\Scripts\\;%PATH%
mkdir ${{ github.workspace }}\build\python_36 && cd ${{ github.workspace }}\build\python_36
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" -DOpenCV_BINARY_DIR=${{ github.workspace }}\build ../../opencv/modules/python
- name: Compile py36
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build\python_36
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Cmake py37
timeout-minutes: 60
run: |
set PATH=c:\\Python-3.7\\;c:\\Python-3.7\\Scripts\\;%PATH%
mkdir ${{ github.workspace }}\build\python_37 && cd ${{ github.workspace }}\build\python_37
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" -DOpenCV_BINARY_DIR=${{ github.workspace }}\build ../../opencv/modules/python
- name: Compile py37
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build\python_37
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Cmake py38
timeout-minutes: 60
run: |
set PATH=c:\\Python-3.8\\;c:\\Python-3.8\\Scripts\\;%PATH%
mkdir ${{ github.workspace }}\build\python_38 && cd ${{ github.workspace }}\build\python_38
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" -DOpenCV_BINARY_DIR=${{ github.workspace }}\build ../../opencv/modules/python
- name: Compile py38
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build\python_38
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Cmake py39
timeout-minutes: 60
run: |
set PATH=c:\\Python-3.9\\;c:\\Python-3.9\\Scripts\\;%PATH%
mkdir ${{ github.workspace }}\build\python_39 && cd ${{ github.workspace }}\build\python_39
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" -DOpenCV_BINARY_DIR=${{ github.workspace }}\build ../../opencv/modules/python
- name: Compile py39
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build\python_39
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Cmake py310
timeout-minutes: 60
run: |
set PATH=c:\\Python-3.10\\;c:\\Python-3.10\\Scripts\\;%PATH%
mkdir ${{ github.workspace }}\build\python_310 && cd ${{ github.workspace }}\build\python_310
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" -DOpenCV_BINARY_DIR=${{ github.workspace }}\build ../../opencv/modules/python
- name: Compile py310
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build\python_310
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Cmake py311
timeout-minutes: 60
run: |
set PATH=c:\\Python-3.11\\;c:\\Python-3.11\\Scripts\\;%PATH%
mkdir ${{ github.workspace }}\build\python_311 && cd ${{ github.workspace }}\build\python_311
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" -DOpenCV_BINARY_DIR=${{ github.workspace }}\build ../../opencv/modules/python
- name: Compile py311
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build\python_311
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Cmake py312
timeout-minutes: 60
run: |
set PATH=c:\\Python-3.12\\;c:\\Python-3.12\\Scripts\\;%PATH%
mkdir ${{ github.workspace }}\build\python_312 && cd ${{ github.workspace }}\build\python_312
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" -DOpenCV_BINARY_DIR=${{ github.workspace }}\build ../../opencv/modules/python
- name: Compile py312
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build\python_312
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Pack shared
timeout-minutes: 60
run: |
mkdir ${{ github.workspace }}\artifacts
cd ${{ github.workspace }}\install
7z a -bd -t7z -y -mx7 ../artifacts/install-vc-16.7z ./
- name: Cmake Java bindings x86
timeout-minutes: 60
env:
EXTRA_CMAKE_OPTIONS: '-DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DOPENCV_PYTHON_INSTALL_PATH=python -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install-bindings-x86 -DBUILD_SHARED_LIBS=OFF -DWITH_OPENCL=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DINSTALL_PDB=OFF -DCPU_BASELINE=SSE2 -DWITH_LAPACK=OFF -DBUILD_PERF_TESTS=OFF -DINSTALL_CREATE_DISTRIB=ON -DBUILD_DOCS=OFF -DOPENCV_GENERATE_SETUPVARS=OFF -DWITH_TBB=OFF -DBUILD_opencv_python3=OFF -DBUILD_opencv_python2=OFF -DWITH_CUDA=OFF -DBUILD_opencv_java=ON'
run: |
mkdir ${{ github.workspace }}\build-bindings-32 && cd ${{ github.workspace }}\build-bindings-32
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
cmake -G ^"Visual Studio 16 2019^" -A Win32 ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv
- name: Compile Java bindings x86
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build-bindings-32
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars32.bat"
cmake --build . --config release --target modules/java/install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Pack Java bindings x86
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\install-bindings-x86
7z a -bd -t7z -y -mx7 ../artifacts/install-vc-16-static-32.7z ./
- name: Cmake Java bindings x64
timeout-minutes: 60
env:
EXTRA_CMAKE_OPTIONS: '-DOPENCV_DOWNLOAD_PATH=%BINARIES_CACHE% -DOPENCV_PYTHON_INSTALL_PATH=python -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install-bindings-x64 -DBUILD_SHARED_LIBS=OFF -DWITH_OPENCL=ON -DBUILD_TESTS=OFF -DBUILD_EXAMPLES=OFF -DINSTALL_PDB=OFF -DCPU_BASELINE=SSE3 -DWITH_LAPACK=OFF -DBUILD_PERF_TESTS=OFF -DINSTALL_CREATE_DISTRIB=ON -DBUILD_DOCS=OFF -DOPENCV_GENERATE_SETUPVARS=OFF -DWITH_TBB=OFF -DBUILD_opencv_python3=OFF -DBUILD_opencv_python2=OFF -DWITH_CUDA=OFF -DBUILD_opencv_java=ON'
run: |
mkdir ${{ github.workspace }}\build-bindings-64 && cd ${{ github.workspace }}\build-bindings-64
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\opencv
- name: Compile Java bindings x64
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build-bindings-64
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release --target modules/java/install -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Pack Java bindings x64
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\install-bindings-x64
7z a -bd -t7z -y -mx7 ../artifacts/install-vc-16-static-64.7z ./
- name: Create WinPack
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\artifacts
%CI_SCRIPTS%\winpack_create.cmd
- name: Save WinPack
timeout-minutes: 60
uses: actions/upload-artifact@v3
with:
name: WinPack
path: artifacts\distrib.7z.exe
Test:
needs: [Build]
runs-on: opencv-cn-win
defaults:
run:
shell: cmd
strategy:
fail-fast: false
matrix:
build_shared_libs: ['ON', 'OFF']
steps:
- name: Clean
timeout-minutes: 60
run: cd ${{ github.workspace }} && rm -rf *
- name: Download WinPack
timeout-minutes: 60
uses: actions/download-artifact@v3
with:
name: WinPack
- name: Unzip WinPack
timeout-minutes: 60
run: |
%CI_SCRIPTS%\winpack_unpack.cmd
- name: Configure OpenCV
timeout-minutes: 60
env:
EXTRA_CMAKE_OPTIONS: '-DBUILD_SHARED_LIBS=${{ matrix.build_shared_libs }} -DOpenCV_DIR=${{ github.workspace }}\\distrib\\opencv\\build'
run: |
mkdir ${{ github.workspace }}\build
cd ${{ github.workspace }}\build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake -G ^"Visual Studio 16 2019^" ${{ env.EXTRA_CMAKE_OPTIONS }} ${{ github.workspace }}\\distrib\\opencv\\sources\\samples
- name: Build OpenCV release
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config release -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary
- name: Build OpenCV debug
timeout-minutes: 60
run: |
cd ${{ github.workspace }}\build
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
cmake --build . --config debug -- /maxcpucount:%PARALLEL_JOBS% /consoleloggerparameters:NoSummary