@@ -82,119 +82,7 @@ jobs:
82
82
name : wheels
83
83
path : wheelhouse/opencv*.whl
84
84
85
-
86
- build_linux :
87
- runs-on : ${{ matrix.os }}
88
- defaults :
89
- run :
90
- shell : bash
91
-
92
- strategy :
93
- fail-fast : false
94
- matrix :
95
- os : [ubuntu-latest]
96
- python-version : [3.6, 3.7, 3.8, 3.9]
97
- platform : [x86, x64]
98
- with_contrib : [0, 1]
99
- without_gui : [0, 1]
100
- build_sdist : [0]
101
-
102
- env :
103
- ACTIONS_ALLOW_UNSECURE_COMMANDS : true
104
- REPO_DIR : .
105
- BUILD_COMMIT : master
106
- PROJECT_SPEC : opencv-python
107
- MB_PYTHON_VERSION : ${{ matrix.python-version }}
108
- TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
109
- MB_ML_VER : 2014
110
- NP_TEST_DEP : numpy
111
- TRAVIS_BUILD_DIR : ${{ github.workspace }}
112
- CONFIG_PATH : travis_config.sh
113
- DOCKER_IMAGE : quay.io/skvark/manylinux2014_${PLAT}
114
- USE_CCACHE : 1
115
- UNICODE_WIDTH : 32
116
- SDIST : ${{ matrix.build_sdist || 0}}
117
- ENABLE_HEADLESS : ${{ matrix.without_gui }}
118
- ENABLE_CONTRIB : ${{ matrix.with_contrib }}
119
-
120
- steps :
121
- - name : Checkout
122
- uses : actions/checkout@v2
123
- with :
124
- submodules : true
125
- fetch-depth : 0
126
-
127
- - name : Update submodules
128
- run : |
129
- git submodule update --remote
130
-
131
- - name : Set up Python ${{ matrix.python-version }}
132
- uses : actions/setup-python@v2
133
- with :
134
- python-version : ${{ matrix.python-version }}
135
- architecture : ${{ matrix.platform }}
136
-
137
- - name : Setup Environment variables
138
- run : |
139
- if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
140
- if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
141
- if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
142
- if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
143
- if [ "x86" == "${{ matrix.platform }}" ]; then echo "PLAT=i686" >> $GITHUB_ENV; fi
144
- echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV;
145
- echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV;
146
-
147
- - name : before install
148
- run : |
149
- set -e
150
- if [[ $SDIST == 0 ]]; then
151
- # Check out and prepare the source
152
- # Multibuild doesn't have releases, so --depth would break eventually (see
153
- # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
154
- git submodule update --init multibuild
155
- source multibuild/common_utils.sh
156
- # https://github.com/matthew-brett/multibuild/issues/116
157
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
158
- source multibuild/travis_steps.sh
159
- # This sets -x
160
- # source travis_multibuild_customize.sh
161
- echo $ENABLE_CONTRIB > contrib.enabled
162
- echo $ENABLE_HEADLESS > headless.enabled
163
- echo "end"
164
- # Not interested in travis internal scripts' output
165
- fi
166
- set +x
167
- # Build and package
168
- set -x
169
- ls
170
- if [[ $SDIST == 1 ]]; then
171
- python -m pip install --upgrade pip
172
- python -m pip install scikit-build
173
- python setup.py sdist
174
- else
175
- build_wheel $REPO_DIR $PLAT
176
- fi
177
- set +x
178
- # Install and run tests
179
- set -x
180
- if [[ $SDIST == 1 ]]; then
181
- echo "skipping tests because of sdist"
182
- rc=0
183
- else
184
- install_run $PLAT && rc=$? || rc=$?
185
- fi
186
- set +x
187
- #otherwise, Travis logic terminates prematurely
188
- #https://travis-ci.community/t/shell-session-update-command-not-found-in-build-log-causes-build-to-fail-if-trap-err-is-set/817
189
- trap ERR
190
- test "$rc" -eq 0
191
- - name : saving artifacts
192
- uses : actions/upload-artifact@v2
193
- with :
194
- name : wheels
195
- path : wheelhouse/opencv*.whl
196
-
197
- build_macos :
85
+ build :
198
86
runs-on : ${{ matrix.os }}
199
87
defaults :
200
88
run :
203
91
strategy :
204
92
fail-fast : false
205
93
matrix :
206
- os : [macos-latest]
94
+ os : [ubuntu-latest, macos-latest]
207
95
python-version : [3.6, 3.7, 3.8, 3.9]
208
96
platform : [x64]
209
97
with_contrib : [0, 1]
@@ -387,7 +275,7 @@ jobs:
387
275
388
276
release :
389
277
if : startsWith(github.ref, 'refs/tags/v')
390
- needs : [build_linux, build_macos , build-windows-x86_64, build_sdist]
278
+ needs : [build , build-windows-x86_64, build_sdist]
391
279
runs-on : ubuntu-latest
392
280
defaults :
393
281
run :
0 commit comments