From db31b23ee8ec1ae5a0294b03e6c501349f271d03 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev Date: Wed, 14 Apr 2021 12:25:53 +0300 Subject: [PATCH 1/7] Changed build_wheels to Windows platform --- .github/workflows/build_wheels.yml | 125 +++++++---------------------- 1 file changed, 28 insertions(+), 97 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index d66d90f0..2536458d 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -22,7 +22,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-latest] # ubuntu-latest, + os: [windows-latest] # ubuntu-latest, python-version: [3.8] # [3.6, 3.7, 3.8, 3.9] platform: [x64] with_contrib: [0, 1] @@ -50,24 +50,6 @@ jobs: # with_contrib: 1 # without_gui: 1 - env: - REPO_DIR: . - BUILD_COMMIT: master - PROJECT_SPEC: opencv-python - PLAT: x86_64 - MB_PYTHON_VERSION: ${{ matrix.python-version }} - TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }} - MB_ML_VER: 2014 - NP_TEST_DEP: numpy - TRAVIS_BUILD_DIR: ${{ github.workspace }} - CONFIG_PATH: travis_config.sh - DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT} - USE_CCACHE: 1 - UNICODE_WIDTH: 32 - SDIST: ${{ matrix.build_sdist || 0}} - ENABLE_HEADLESS: ${{ matrix.without_gui }} - ENABLE_CONTRIB: ${{ matrix.with_contrib }} - steps: - name: Checkout uses: actions/checkout@v2 @@ -80,86 +62,35 @@ jobs: git submodule update --remote - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 - with: - python-version: ${{ matrix.python-version }} - - - name: Setup Environment variables run: | - if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi - if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi - if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi - echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV; - echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; - - - name: before install + if [[ ! $env:PYTHON ]] { + curl -o install_python.ps1 https://raw.githubusercontent.com/matthew-brett/multibuild/devel/install_python.ps1 + .\install_python.ps1 + } + if [[ ! $env:PYTHON ]]; then echo "No PYTHON"; fi + set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH% + python --version + + - name: build script run: | - set -e - - if [[ $SDIST == 0 ]]; then - # Check out and prepare the source - # Multibuild doesn't have releases, so --depth would break eventually (see - # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised) - git submodule update --init multibuild - - source multibuild/common_utils.sh - - # https://github.com/matthew-brett/multibuild/issues/116 - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi - - source multibuild/travis_steps.sh - # This sets -x - - # source travis_multibuild_customize.sh - echo $ENABLE_CONTRIB > contrib.enabled - echo $ENABLE_HEADLESS > headless.enabled + "%PYTHON%\\python.exe" -m pip install --upgrade pip + "%PYTHON%\\python.exe" -m pip install --upgrade setuptools + set "CI_BUILD=1" && "%PYTHON%\\python.exe" -m pip wheel --wheel-dir=%cd%\dist . --verbose - echo "end" - # Not interested in travis internal scripts' output - fi - - set +x - - # Build and package - set -x - - ls - if [[ $SDIST == 1 ]]; then - python -m pip install --upgrade pip - python -m pip install scikit-build - python setup.py sdist - else - build_wheel $REPO_DIR $PLAT - fi - - set +x - - # Install and run tests - set -x - if [[ $SDIST == 1 ]]; then - echo "skipping tests because of sdist" - rc=0 - else - install_run $PLAT && rc=$? || rc=$? - fi - - set +x + - name: before test + run: | + cd ${{ github.workspace }}/tests + export PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command" + &"${{ matrix.python-version }}\\python.exe" -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl") + if [[ $? -ne 0 ]]; then exit $?; fi - #otherwise, Travis logic terminates prematurely - #https://travis-ci.community/t/shell-session-update-command-not-found-in-build-log-causes-build-to-fail-if-trap-err-is-set/817 - trap ERR - test "$rc" -eq 0 + - name: run test + run: | + cd ${{ github.workspace }}/tests + "%PYTHON%\\python.exe" -m unittest test - # - name: Upload wheels - # env: - # # PYPI repository - # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} - # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} - # # PYPITEST repository - # # TWINE_USERNAME: ${{ secrets.PYPITEST_USERNAME }} - # # TWINE_PASSWORD: ${{ secrets.PYPITEST_PASSWORD }} - # # TWINE_REPOSITORY_URL: 'https://test.pypi.org/legacy/' - # run: | - # twine upload --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/* - # # Upload wheels to PYPITEST - # #twine upload --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/* + - name: saving artifacts + uses: actions/upload-artifact@v2 + with: + name: wheels + path: dist\opencv*.whl From 591c15a38b2d64e34322a1a943d847d667be6f80 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Fri, 16 Apr 2021 11:22:40 +0300 Subject: [PATCH 2/7] Try new pipeline --- .github/workflows/build_wheels.yml | 65 +++++++++++------------------- 1 file changed, 23 insertions(+), 42 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 2536458d..99510911 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -17,38 +17,20 @@ jobs: runs-on: ${{ matrix.os }} defaults: run: - shell: bash + shell: powershell strategy: fail-fast: false matrix: os: [windows-latest] # ubuntu-latest, - python-version: [3.8] # [3.6, 3.7, 3.8, 3.9] - platform: [x64] + python-version: [3.6] # [3.6, 3.7, 3.8, 3.9] + platform: [x64] # [x32, x64] with_contrib: [0, 1] without_gui: [0, 1] build_sdist: [0] - # include: - # - os: ubuntu-latest - # python-version: 3.8 - # build_sdist: 1 - # with_contrib: 0 - # without_gui: 0 - # - os: ubuntu-latest - # python-version: 3.8 - # build_sdist: 1 - # with_contrib: 0 - # without_gui: 1 - # - os: ubuntu-latest - # python-version: 3.8 - # build_sdist: 1 - # with_contrib: 1 - # without_gui: 0 - # - os: ubuntu-latest - # python-version: 3.8 - # build_sdist: 1 - # with_contrib: 1 - # without_gui: 1 + + env: + ACTIONS_ALLOW_UNSECURE_COMMANDS: true steps: - name: Checkout @@ -60,37 +42,36 @@ jobs: - name: Update submodules run: | git submodule update --remote - - name: Set up Python ${{ matrix.python-version }} - run: | - if [[ ! $env:PYTHON ]] { - curl -o install_python.ps1 https://raw.githubusercontent.com/matthew-brett/multibuild/devel/install_python.ps1 - .\install_python.ps1 - } - if [[ ! $env:PYTHON ]]; then echo "No PYTHON"; fi - set PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH% - python --version + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Setup MSBuild.exe + uses: warrenbuckley/Setup-MSBuild@v1 - name: build script run: | - "%PYTHON%\\python.exe" -m pip install --upgrade pip - "%PYTHON%\\python.exe" -m pip install --upgrade setuptools - set "CI_BUILD=1" && "%PYTHON%\\python.exe" -m pip wheel --wheel-dir=%cd%\dist . --verbose + python --version + python -m pip install --upgrade pip + python -m pip install --upgrade setuptools + set "CI_BUILD=1" && python -m pip wheel --wheel-dir=%cd%\dist . --verbose + shell: cmd - name: before test run: | cd ${{ github.workspace }}/tests - export PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command" - &"${{ matrix.python-version }}\\python.exe" -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl") - if [[ $? -ne 0 ]]; then exit $?; fi - + $env:PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command" + &python -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl") + if ($LastExitCode -ne 0) {throw $LastExitCode} - name: run test run: | cd ${{ github.workspace }}/tests - "%PYTHON%\\python.exe" -m unittest test + python -m unittest test + shell: cmd - name: saving artifacts uses: actions/upload-artifact@v2 with: - name: wheels + name: wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: dist\opencv*.whl From f56fb7894a3d37b123868ba77e81dc0d982fb241 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Fri, 16 Apr 2021 11:55:26 +0300 Subject: [PATCH 3/7] Try windows with a new configuration --- .github/workflows/build_wheels.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 99510911..20283b51 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -22,12 +22,17 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest] # ubuntu-latest, + os: [windows-latest, ubuntu-latest, macos-latest] # ubuntu-latest, python-version: [3.6] # [3.6, 3.7, 3.8, 3.9] - platform: [x64] # [x32, x64] + platform: [x32, x64] with_contrib: [0, 1] without_gui: [0, 1] build_sdist: [0] + exclude: + - os: macos-latest + platform: x32 + - os: ubuntu-latest + platform: x32 env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true @@ -42,15 +47,18 @@ jobs: - name: Update submodules run: | git submodule update --remote + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Setup MSBuild.exe + if: ${{ matrix.os == 'windows-latest' }} uses: warrenbuckley/Setup-MSBuild@v1 - name: build script + if: ${{ matrix.os == 'windows-latest' }} run: | python --version python -m pip install --upgrade pip @@ -59,19 +67,23 @@ jobs: shell: cmd - name: before test + if: ${{ matrix.os == 'windows-latest' }} run: | cd ${{ github.workspace }}/tests $env:PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command" &python -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl") if ($LastExitCode -ne 0) {throw $LastExitCode} + - name: run test + if: ${{ matrix.os == 'windows-latest' }} run: | cd ${{ github.workspace }}/tests python -m unittest test shell: cmd - name: saving artifacts + if: ${{ matrix.os == 'windows-latest' }} uses: actions/upload-artifact@v2 with: - name: wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} + name: ${{ matrix.os }}-wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: dist\opencv*.whl From a1be42022d1efe995136e85051aa040326a051c3 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Fri, 16 Apr 2021 11:58:41 +0300 Subject: [PATCH 4/7] Try bash on Windows --- .github/workflows/build_wheels.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 20283b51..f2ac0f76 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -17,7 +17,7 @@ jobs: runs-on: ${{ matrix.os }} defaults: run: - shell: powershell + shell: bash strategy: fail-fast: false @@ -73,6 +73,7 @@ jobs: $env:PYTHONWARNINGS = "ignore:::pip._internal.cli.base_command" &python -m pip install --user --no-warn-script-location (ls "../dist/opencv_*.whl") if ($LastExitCode -ne 0) {throw $LastExitCode} + shell: powershell - name: run test if: ${{ matrix.os == 'windows-latest' }} From 834e9b3dcb5ce4fe457a5254ebbdb345d95a7e06 Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Fri, 16 Apr 2021 12:05:32 +0300 Subject: [PATCH 5/7] Added ubuntu and macos into pipeline --- .github/workflows/build_wheels.yml | 72 +++++++++++++++++++++++++++++- 1 file changed, 71 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index f2ac0f76..d4e25ab0 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -36,6 +36,22 @@ jobs: env: ACTIONS_ALLOW_UNSECURE_COMMANDS: true + REPO_DIR: . + BUILD_COMMIT: master + PROJECT_SPEC: opencv-python + PLAT: x86_64 + MB_PYTHON_VERSION: ${{ matrix.python-version }} + TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }} + MB_ML_VER: 2014 + NP_TEST_DEP: numpy + TRAVIS_BUILD_DIR: ${{ github.workspace }} + CONFIG_PATH: travis_config.sh + DOCKER_IMAGE: quay.io/skvark/manylinux2014_${PLAT} + USE_CCACHE: 1 + UNICODE_WIDTH: 32 + SDIST: ${{ matrix.build_sdist || 0}} + ENABLE_HEADLESS: ${{ matrix.without_gui }} + ENABLE_CONTRIB: ${{ matrix.with_contrib }} steps: - name: Checkout @@ -52,6 +68,61 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + + - name: Setup Environment variables + if: ${{ matrix.os == 'ubuntu-latest' }} || ${{ matrix.os == 'macos-latest' }} + run: | + if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi + if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi + if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi + echo "BUILD_DEPENDS=$(echo $NP_BUILD_DEP)" >> $GITHUB_ENV; + echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; + + - name: before install + if: ${{ matrix.os == 'ubuntu-latest' }} || ${{ matrix.os == 'macos-latest' }} + run: | + set -e + if [[ $SDIST == 0 ]]; then + # Check out and prepare the source + # Multibuild doesn't have releases, so --depth would break eventually (see + # https://superuser.com/questions/1240216/server-does-not-allow-request-for-unadvertised) + git submodule update --init multibuild + source multibuild/common_utils.sh + # https://github.com/matthew-brett/multibuild/issues/116 + if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export ARCH_FLAGS=" "; fi + source multibuild/travis_steps.sh + # This sets -x + # source travis_multibuild_customize.sh + echo $ENABLE_CONTRIB > contrib.enabled + echo $ENABLE_HEADLESS > headless.enabled + echo "end" + # Not interested in travis internal scripts' output + fi + set +x + # Build and package + set -x + ls + if [[ $SDIST == 1 ]]; then + python -m pip install --upgrade pip + python -m pip install scikit-build + python setup.py sdist + else + build_wheel $REPO_DIR $PLAT + fi + set +x + # Install and run tests + set -x + if [[ $SDIST == 1 ]]; then + echo "skipping tests because of sdist" + rc=0 + else + install_run $PLAT && rc=$? || rc=$? + fi + set +x + #otherwise, Travis logic terminates prematurely + #https://travis-ci.community/t/shell-session-update-command-not-found-in-build-log-causes-build-to-fail-if-trap-err-is-set/817 + trap ERR + test "$rc" -eq 0 - name: Setup MSBuild.exe if: ${{ matrix.os == 'windows-latest' }} @@ -83,7 +154,6 @@ jobs: shell: cmd - name: saving artifacts - if: ${{ matrix.os == 'windows-latest' }} uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }}-wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} From 8a4a96783fe71419a449f4e4b23199fca2fb0b0e Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Fri, 16 Apr 2021 12:10:42 +0300 Subject: [PATCH 6/7] Fix if condition for windows --- .github/workflows/build_wheels.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index d4e25ab0..97aa8fe7 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -70,7 +70,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Setup Environment variables - if: ${{ matrix.os == 'ubuntu-latest' }} || ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} run: | if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi @@ -79,7 +79,7 @@ jobs: echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; - name: before install - if: ${{ matrix.os == 'ubuntu-latest' }} || ${{ matrix.os == 'macos-latest' }} + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} run: | set -e if [[ $SDIST == 0 ]]; then From c7db7042b85a59deda63c8cc1f90d53aae044fee Mon Sep 17 00:00:00 2001 From: Andrey Senyaev <76472231+asenyaev@users.noreply.github.com> Date: Fri, 16 Apr 2021 12:38:28 +0300 Subject: [PATCH 7/7] Turned on all python versions, uploading artifacts --- .github/workflows/build_wheels.yml | 55 ++++++++++++++++++++++++++++-- 1 file changed, 53 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 97aa8fe7..56d1505a 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -22,8 +22,8 @@ jobs: strategy: fail-fast: false matrix: - os: [windows-latest, ubuntu-latest, macos-latest] # ubuntu-latest, - python-version: [3.6] # [3.6, 3.7, 3.8, 3.9] + os: [windows-latest, ubuntu-latest, macos-latest] + python-version: [3.6, 3.7, 3.8, 3.9] platform: [x32, x64] with_contrib: [0, 1] without_gui: [0, 1] @@ -154,7 +154,58 @@ jobs: shell: cmd - name: saving artifacts + if: ${{ matrix.os == 'windows-latest' }} uses: actions/upload-artifact@v2 with: name: ${{ matrix.os }}-wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} path: dist\opencv*.whl + + - name: saving artifacts + if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} + uses: actions/upload-artifact@v2 + with: + name: ${{ matrix.os }}-wheels-${{ matrix.python-version }}-${{ matrix.platform }}-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }} + path: ./wheelhouse/opencv*.whl + + + # - name: Upload wheels ${{ matrix.os }} + # if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }} + # env: + # # PYPI repository + # TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} + # TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} + # # PYPITEST repository + # # TWINE_USERNAME: ${{ secrets.PYPITEST_USERNAME }} + # # TWINE_PASSWORD: ${{ secrets.PYPITEST_PASSWORD }} + # # TWINE_REPOSITORY_URL: 'https://test.pypi.org/legacy/' + # run: | + # twine upload --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/* + # # Upload wheels to PYPITEST + # #twine upload --skip-existing ${TRAVIS_BUILD_DIR}/wheelhouse/* + + # - name: Upload wheels ${{ matrix.os }} + # if: ${{ matrix.os == 'windows-latest' && startsWith(github.ref, 'refs/tags/')}} + # env: + # USER: fXgF9uyy6sT0JoVOR7BoqA== + # PASS: 0bXSOVjf9x8L7nErTivu92TF1FwNosTjFJQPmxp8Dys= + # run: | + # cd ${{ github.workspace }} + # if (${Env:ENABLE_CONTRIB} -eq 0) { + # if (${Env:ENABLE_HEADLESS} -eq 0) { + # echo "This is a default build. Deployment will be done to PyPI entry opencv-python." + # } + # else { + # echo "This is a headless build. Deployment will be done to PyPI entry opencv-python-headless." + # } + # } + # else { + # if (${Env:ENABLE_HEADLESS} -eq 0) { + # echo "This is a contrib build. Deployment will be done to PyPI entry opencv-contrib-python." + # } + # else { + # echo "This is a headless contrib build. Deployment will be done to PyPI entry opencv-contrib-python-headless." + # } + # } + # &python -m pip install twine + # &python -m twine upload -u ${Env:USER} -p ${Env:PASS} --skip-existing dist/opencv* + # shell: powershell