62
62
- name : before test
63
63
run : |
64
64
cd ${{ github.workspace }}/tests
65
- $env:PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command"
66
65
&python -m pip install --user --no-warn-script-location (ls "../wheelhouse/opencv*.whl")
67
66
if ($LastExitCode -ne 0) {throw $LastExitCode}
68
67
shell : powershell
@@ -126,6 +125,7 @@ jobs:
126
125
127
126
- name : Set up Python ${{ matrix.python-version }}
128
127
uses : actions/setup-python@v2
128
+ if : ${{ 'macos-latest' == matrix.os }}
129
129
with :
130
130
python-version : ${{ matrix.python-version }}
131
131
architecture : ${{ matrix.platform }}
@@ -143,47 +143,22 @@ jobs:
143
143
- name : before install
144
144
run : |
145
145
set -e
146
- if [[ $SDIST == 0 ]]; then
147
- # Check out and prepare the source
148
- # Multibuild doesn't have releases, so --depth would break eventually (see
149
- # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised)
150
- git submodule update --init multibuild
151
- source multibuild/common_utils.sh
152
- # https://github.com/matthew-brett/multibuild/issues/116
153
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi
154
- source multibuild/travis_steps.sh
155
- # This sets -x
156
- # source travis_multibuild_customize.sh
157
- echo $ENABLE_CONTRIB > contrib.enabled
158
- echo $ENABLE_HEADLESS > headless.enabled
159
- echo "end"
160
- # Not interested in travis internal scripts' output
161
- fi
162
- set +x
163
- # Build and package
164
- set -x
165
- ls
166
- if [[ $SDIST == 1 ]]; then
167
- python -m pip install --upgrade pip
168
- python -m pip install scikit-build
169
- python setup.py sdist
170
- else
171
- build_wheel $REPO_DIR $PLAT
172
- fi
173
- set +x
174
- # Install and run tests
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
175
158
set -x
176
- if [[ $SDIST == 1 ]]; then
177
- echo "skipping tests because of sdist"
178
- rc=0
179
- else
180
- install_run $PLAT && rc=$? || rc=$?
181
- fi
159
+ build_wheel $REPO_DIR $PLAT
160
+ install_run $PLAT
182
161
set +x
183
- #otherwise, Travis logic terminates prematurely
184
- #https://travis-ci.community/t/shell-session-update-command-not-found-in-build-log-causes-build-to-fail-if-trap-err-is-set/817
185
- trap ERR
186
- test "$rc" -eq 0
187
162
- name : saving artifacts
188
163
uses : actions/upload-artifact@v2
189
164
with :
@@ -287,8 +262,12 @@ jobs:
287
262
# PYPI repository credentials
288
263
TWINE_USERNAME : ${{ secrets.PYPI_USERNAME }}
289
264
TWINE_PASSWORD : ${{ secrets.PYPI_PASSWORD }}
265
+ TEST_ENV_VAR : test
290
266
run : |
291
267
python -m pip install twine
268
+ echo ${{ secrets.OPENCV_PYTHON_USERNAME }}
269
+ echo ${Env:TWINE_USERNAME}
270
+ echo ${Env:TEST_ENV_VAR}
292
271
python -m twine upload --repository testpypi -u ${Env:TWINE_USERNAME} -p ${Env:TWINE_PASSWORD} --skip-existing wheelhouse/opencv_*
293
272
294
273
0 commit comments