1
- name : Build PYPI wheels for opencv-python
1
+ name : Build PYPI wheels for opencv-python on Linux x86_64
2
2
3
3
on :
4
4
pull_request :
9
9
10
10
11
11
jobs :
12
- build-windows-x86_64 :
13
- runs-on : ${{ matrix.os }}
14
- defaults :
15
- run :
16
- shell : powershell
17
-
18
- strategy :
19
- fail-fast : false
20
- matrix :
21
- os : [windows-latest]
22
- python-version : [3.6, 3.7, 3.8, 3.9]
23
- platform : [x86, x64]
24
- with_contrib : [0, 1]
25
- without_gui : [0, 1]
26
- build_sdist : [0]
27
-
28
- env :
29
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
30
- SDIST : ${{ matrix.build_sdist || 0}}
31
- ENABLE_HEADLESS : ${{ matrix.without_gui }}
32
- ENABLE_CONTRIB : ${{ matrix.with_contrib }}
33
-
34
- steps :
35
- - name : Checkout
36
- uses : actions/checkout@v2
37
- with :
38
- submodules : true
39
- fetch-depth : 0
40
-
41
- - name : Update submodules
42
- run : |
43
- git submodule update --remote
44
-
45
- - name : Set up Python ${{ matrix.python-version }}
46
- uses : actions/setup-python@v2
47
- with :
48
- python-version : ${{ matrix.python-version }}
49
- architecture : ${{ matrix.platform }}
50
-
51
- - name : Setup MSBuild.exe
52
- uses : warrenbuckley/Setup-MSBuild@v1
53
-
54
- - name : build script
55
- run : |
56
- python --version
57
- python -m pip install --upgrade pip
58
- python -m pip install --upgrade setuptools
59
- set "CI_BUILD=1" && python -m pip wheel --wheel-dir=%cd%\wheelhouse . --verbose
60
- shell : cmd
61
-
62
- - name : before test
63
- run : |
64
- cd ${{ github.workspace }}/tests
65
- &python -m pip install --user --no-warn-script-location (ls "../wheelhouse/opencv*.whl")
66
- if ($LastExitCode -ne 0) {throw $LastExitCode}
67
- shell : powershell
68
-
69
- - name : run test
70
- run : |
71
- cd ${{ github.workspace }}/tests
72
- python -m unittest test
73
- shell : cmd
74
-
75
- - name : saving artifacts
76
- uses : actions/upload-artifact@v2
77
- with :
78
- name : wheels
79
- path : wheelhouse/opencv*.whl
80
-
81
12
build :
82
13
runs-on : ${{ matrix.os }}
83
14
defaults :
87
18
strategy :
88
19
fail-fast : false
89
20
matrix :
90
- os : [ubuntu-latest, macos-latest ]
21
+ os : [ubuntu-latest]
91
22
python-version : [3.6, 3.7, 3.8, 3.9]
92
23
platform : [x64]
93
24
with_contrib : [0, 1]
@@ -102,63 +33,41 @@ jobs:
102
33
MB_PYTHON_VERSION : ${{ matrix.python-version }}
103
34
TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
104
35
MB_ML_VER : 2014
105
- NP_TEST_DEP : numpy
36
+ NP_TEST_DEP : numpy==1.19.4
106
37
TRAVIS_BUILD_DIR : ${{ github.workspace }}
107
38
CONFIG_PATH : travis_config.sh
108
39
DOCKER_IMAGE : quay.io/skvark/manylinux2014_${PLAT}
109
40
USE_CCACHE : 1
110
41
UNICODE_WIDTH : 32
111
- SDIST : ${{ matrix.build_sdist || 0}}
42
+ SDIST : ${{ matrix.build_sdist || 0 }}
112
43
ENABLE_HEADLESS : ${{ matrix.without_gui }}
113
44
ENABLE_CONTRIB : ${{ matrix.with_contrib }}
114
45
115
46
steps :
116
47
- name : Checkout
117
48
uses : actions/checkout@v2
118
49
with :
119
- submodules : true
50
+ submodules : false
120
51
fetch-depth : 0
121
52
122
53
- name : Update submodules
123
- run : |
124
- git submodule update --remote
125
-
126
- - name : Set up Python ${{ matrix.python-version }}
127
- uses : actions/setup-python@v2
128
- if : ${{ 'macos-latest' == matrix.os }}
129
- with :
130
- python-version : ${{ matrix.python-version }}
131
- architecture : ${{ matrix.platform }}
54
+ if : github.event_name == 'pull_request'
55
+ run : git submodule update --remote
132
56
133
57
- name : Setup Environment variables
134
58
run : |
135
- if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
136
59
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
137
60
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
138
61
if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
139
- if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
140
62
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
141
63
echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
142
64
143
- - name : before install
144
- run : |
145
- set -e
146
- # Check out and prepare the source
147
- # Multibuild doesn't have releases, so --depth would break eventually (see
148
- # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
149
- git submodule update --init multibuild
150
- source multibuild/common_utils.sh
151
- # https://github.com/matthew-brett/multibuild/issues/116
152
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
153
- source multibuild/travis_steps.sh
154
- # This sets -x
155
- # source travis_multibuild_customize.sh
156
- echo $ENABLE_CONTRIB > contrib.enabled
157
- echo $ENABLE_HEADLESS > headless.enabled
158
- set -x
159
- build_wheel $REPO_DIR $PLAT
160
- install_run $PLAT
161
- set +x
65
+ - name : build
66
+ run : source scripts/build.sh
67
+
68
+ - name : install and test
69
+ run : source scripts/install.sh
70
+
162
71
- name : saving artifacts
163
72
uses : actions/upload-artifact@v2
164
73
with :
@@ -191,26 +100,26 @@ jobs:
191
100
MB_PYTHON_VERSION : ${{ matrix.python-version }}
192
101
TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
193
102
MB_ML_VER : 2014
194
- NP_TEST_DEP : numpy
103
+ NP_TEST_DEP : numpy==1.19.4
195
104
TRAVIS_BUILD_DIR : ${{ github.workspace }}
196
105
CONFIG_PATH : travis_config.sh
197
106
DOCKER_IMAGE : quay.io/skvark/manylinux2014_${PLAT}
198
107
USE_CCACHE : 1
199
108
UNICODE_WIDTH : 32
200
- SDIST : ${{ matrix.build_sdist || 0}}
109
+ SDIST : ${{ matrix.build_sdist || 0 }}
201
110
ENABLE_HEADLESS : ${{ matrix.without_gui || 0 }}
202
- ENABLE_CONTRIB : ${{ matrix.with_contrib || 0}}
111
+ ENABLE_CONTRIB : ${{ matrix.with_contrib || 0 }}
203
112
204
113
steps :
205
114
- name : Checkout
206
115
uses : actions/checkout@v2
207
116
with :
208
- submodules : true
117
+ submodules : false
209
118
fetch-depth : 0
210
119
211
120
- name : Update submodules
212
- run : |
213
- git submodule update --remote
121
+ if : github.event_name == 'pull_request'
122
+ run : git submodule update --remote
214
123
215
124
- name : Set up Python ${{ matrix.python-version }}
216
125
uses : actions/setup-python@v2
@@ -220,7 +129,6 @@ jobs:
220
129
221
130
- name : Setup Environment variables
222
131
run : |
223
- if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
224
132
if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
225
133
if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
226
134
echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
@@ -238,6 +146,7 @@ jobs:
238
146
# Install and run tests
239
147
set -x
240
148
echo "skipping tests because of sdist"
149
+
241
150
- name : saving artifacts
242
151
uses : actions/upload-artifact@v2
243
152
with :
@@ -246,7 +155,7 @@ jobs:
246
155
247
156
test_release_opencv_python :
248
157
if : github.event_name == 'release' && github.event.release.prerelease
249
- needs : [build, build-windows-x86_64, build_sdist]
158
+ needs : [build, build_sdist]
250
159
runs-on : ubuntu-latest
251
160
environment : test-opencv-python-release
252
161
defaults :
@@ -265,7 +174,7 @@ jobs:
265
174
266
175
release_opencv_python :
267
176
if : github.event_name == 'release' && !github.event.release.prerelease
268
- needs : [build, build-windows-x86_64, build_sdist]
177
+ needs : [build, build_sdist]
269
178
runs-on : ubuntu-latest
270
179
environment : opencv-python-release
271
180
defaults :
0 commit comments