未验证 提交 4638ce51 编写于 作者: A Andrey Senyaev 提交者: GitHub

Changed labeles for macOS ARM64 and Linux ARM64 builds (#681)

* Changed labeles for macOS ARM64 and Linux ARM64 builds

* Changed labeles for macOS ARM64 and Linux ARM64 builds

* Added proper cleanup step for all workflows, removed unused lines, changed ubuntu-latest to ubuntu-20.04

* Updated docker images to work under non-root user, unified cleanup step
上级 fcc900ec
......@@ -15,21 +15,18 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.6']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
REPO_DIR: .
......@@ -40,34 +37,32 @@ jobs:
MB_ML_VER: 2014
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
USE_CCACHE: 1
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20220628
USE_CCACHE: 0
UNICODE_WIDTH: 32
PLAT: x86_64
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Update submodules
if: github.event_name == 'pull_request'
run: git submodule update --remote
- name: Build a package
run: source scripts/build.sh
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
......@@ -76,21 +71,18 @@ jobs:
test:
needs: [build]
runs-on: ${{ matrix.os }}
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
......@@ -98,42 +90,38 @@ jobs:
NP_TEST_DEP_LATEST: numpy==1.21.2
CONFIG_PATH: travis_config.sh
PLAT: x86_64
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
- name: Package installation and run tests
run: source scripts/install.sh
build_sdist:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-20.04
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: [3.8]
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [1]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
REPO_DIR: .
......@@ -146,30 +134,29 @@ jobs:
NP_TEST_DEP: numpy==1.19.4
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20220628
USE_CCACHE: 1
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui || 0 }}
ENABLE_CONTRIB: ${{ matrix.with_contrib || 0 }}
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Update submodules
if: github.event_name == 'pull_request'
run: git submodule update --remote
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}
- name: Build a package
run: |
set -e
......@@ -182,7 +169,6 @@ jobs:
# Install and run tests
set -x
echo "skipping tests because of sdist"
- name: saving artifacts
uses: actions/upload-artifact@v2
with:
......@@ -192,7 +178,7 @@ jobs:
test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build, build_sdist, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: test-opencv-python-release
defaults:
run:
......@@ -202,7 +188,6 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload all wheels
run: |
python -m pip install twine
......@@ -211,7 +196,7 @@ jobs:
release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build, build_sdist, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: opencv-python-release
defaults:
run:
......@@ -221,22 +206,18 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload wheels for opencv_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-* wheelhouse/opencv-python-[^h]*
- name: Upload wheels for opencv_contrib_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python-* wheelhouse/opencv-contrib-python-[^h]*
- name: Upload wheels for opencv_python_headless
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-* wheelhouse/opencv-python-headless-*
- name: Upload wheels for opencv_contrib_python_headless
run: |
python -m pip install twine
......
......@@ -15,21 +15,18 @@ on:
jobs:
build_arm:
runs-on: ${{ matrix.os }}
runs-on: opencv-cn-lin-arm64
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ARM64]
python-version: ['3.6']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
REPO_DIR: .
......@@ -41,33 +38,30 @@ jobs:
MB_ML_VER: 2014
TRAVIS_BUILD_DIR: ${{ github.workspace }}
CONFIG_PATH: travis_config.sh
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20220628
USE_CCACHE: 0
UNICODE_WIDTH: 32
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
steps:
- name: UID
run: id -u
- name: Cleanup
if: always()
uses: AutoModality/action-clean@v1
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Build a package
run: source scripts/build.sh
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
......@@ -76,21 +70,18 @@ jobs:
test:
needs: [build_arm]
runs-on: ${{ matrix.os }}
runs-on: opencv-cn-lin-arm64
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
os: [ARM64]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
......@@ -100,34 +91,29 @@ jobs:
CONFIG_PATH: travis_config.sh
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
UNICODE_WIDTH: 32
steps:
- name: Cleanup
if: always()
uses: AutoModality/action-clean@v1
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
- name: Package installation and run tests
run: source scripts/install.sh
test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build_arm, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: test-opencv-python-release
defaults:
run:
......@@ -137,7 +123,6 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload all wheels
run: |
python -m pip install twine
......@@ -146,7 +131,7 @@ jobs:
release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build_arm, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: opencv-python-release
defaults:
run:
......@@ -156,22 +141,18 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload wheels for opencv_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-*
- name: Upload wheels for opencv_contrib_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python-*
- name: Upload wheels for opencv_python_headless
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-*
- name: Upload wheels for opencv_contrib_python_headless
run: |
python -m pip install twine
......
......@@ -19,7 +19,6 @@ jobs:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
......@@ -40,7 +39,6 @@ jobs:
python-version: '3.8'
- os: macos-11
python-version: '3.9'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
REPO_DIR: .
......@@ -60,18 +58,18 @@ jobs:
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Update submodules
if: github.event_name == 'pull_request'
run: git submodule update --remote
- name: Build a package
run: |
set -e
......@@ -89,13 +87,11 @@ jobs:
echo $ENABLE_HEADLESS > headless.enabled
set -x
build_wheel $REPO_DIR $PLAT
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
......@@ -108,7 +104,6 @@ jobs:
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
......@@ -129,7 +124,6 @@ jobs:
python-version: '3.8'
- os: macos-11
python-version: '3.9'
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
MB_PYTHON_VERSION: ${{ matrix.python-version }}
......@@ -139,40 +133,36 @@ jobs:
PLAT: x86_64
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}
- name: Setup Environment variables
run: if [ "3.10" == "${{ matrix.python-version }}" ]; then echo "TEST_DEPENDS=$(echo $NP_TEST_DEP_LATEST)" >> $GITHUB_ENV; else echo "TEST_DEPENDS=$(echo $NP_TEST_DEP)" >> $GITHUB_ENV; fi
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
- name: Package installation
run: |
python -m pip install wheelhouse/opencv*.whl
cd ${{ github.workspace }}/tests
python get_build_info.py
- name: Run tests
run: |
cd ${{ github.workspace }}/opencv
python modules/python/test/test.py -v --repo .
- name: Pylint test
run: |
python -m pip install pylint==2.12.2
......@@ -182,7 +172,7 @@ jobs:
test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: test-opencv-python-release
defaults:
run:
......@@ -192,7 +182,6 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload all wheels
run: |
python -m pip install twine
......@@ -201,7 +190,7 @@ jobs:
release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: opencv-python-release
defaults:
run:
......@@ -211,22 +200,18 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload wheels for opencv_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-*
- name: Upload wheels for opencv_contrib_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python-*
- name: Upload wheels for opencv_python_headless
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-*
- name: Upload wheels for opencv_contrib_python_headless
run: |
python -m pip install twine
......
......@@ -15,35 +15,32 @@ on:
jobs:
build:
runs-on: ${{ matrix.os }}
runs-on: opencv-cn-mac-arm64
strategy:
fail-fast: false
matrix:
os: [macOS-M1]
python-version: ['3.7']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
CI_BUILD: 1
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Update submodules
if: github.event_name == 'pull_request'
run: git submodule update --remote
- name: Build a package
run: |
git submodule update --init multibuild
......@@ -53,13 +50,11 @@ jobs:
arch -arm64 python${{ matrix.python-version }} -m pip install toml && python${{ matrix.python-version }} -c 'import toml; c = toml.load("pyproject.toml"); print("\n".join(c["build-system"]["requires"]))' | python${{ matrix.python-version }} -m pip install -r /dev/stdin
arch -arm64 python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
......@@ -68,46 +63,41 @@ jobs:
test:
needs: [build]
runs-on: ${{ matrix.os }}
runs-on: opencv-cn-mac-arm64-tests
strategy:
fail-fast: false
matrix:
os: [macOS-M1]
python-version: ['3.7', '3.8', '3.9', '3.10']
platform: [x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}/opencv_extra/testdata
PYLINT_TEST_FILE: ${{ github.workspace }}/opencv/samples/python/squares.py
steps:
- name: Cleanup
run: find . -mindepth 1 -delete
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
path: wheelhouse/
- name: Package installation
run: |
arch -arm64 python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl
cd ${{ github.workspace }}/tests
arch -arm64 python${{ matrix.python-version }} get_build_info.py
- name: Run tests
run: |
cd ${{ github.workspace }}/opencv
arch -arm64 python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
- name: Pylint test
run: |
arch -arm64 python${{ matrix.python-version }} -m pip install pylint==2.12.2
......@@ -117,7 +107,7 @@ jobs:
test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: test-opencv-python-release
defaults:
run:
......@@ -136,7 +126,7 @@ jobs:
release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: opencv-python-release
defaults:
run:
......@@ -146,7 +136,6 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload wheels for opencv_python
run: |
python -m pip install twine
......
......@@ -14,48 +14,43 @@ on:
jobs:
build-windows-x86_64:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: powershell
runs-on: windows-2019
strategy:
fail-fast: false
matrix:
os: [windows-2019]
python-version: ['3.6']
platform: [x86, x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
SDIST: ${{ matrix.build_sdist || 0 }}
ENABLE_HEADLESS: ${{ matrix.without_gui }}
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata
steps:
- name: Cleanup
shell: bash
run: |
rm -rf ./* || true
rm -rf ./.??* || true
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: false
fetch-depth: 0
- name: Update submodules
if: github.event_name == 'pull_request'
run: git submodule update --remote
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1.1
- name: Build a package
run: |
python --version
......@@ -64,13 +59,11 @@ jobs:
python -m pip install toml && python -c "import toml; c = toml.load('pyproject.toml'); print('\n'.join(c['build-system']['requires']))" >> requirements.txt | python -m pip install -r requirements.txt
set "CI_BUILD=1" && python setup.py bdist_wheel --py-limited-api=cp36 --dist-dir=%cd%\wheelhouse -v
shell: cmd
- name: Saving all wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/opencv*.whl
- name: Saving a wheel accordingly to matrix
uses: actions/upload-artifact@v2
with:
......@@ -79,45 +72,44 @@ jobs:
test:
needs: [build-windows-x86_64]
runs-on: ${{ matrix.os }}
runs-on: windows-2019
defaults:
run:
shell: powershell
shell: cmd
strategy:
fail-fast: false
matrix:
os: [windows-2019]
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
platform: [x86, x64]
with_contrib: [0, 1]
without_gui: [0, 1]
build_sdist: [0]
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
OPENCV_TEST_DATA_PATH: ${{ github.workspace }}\opencv_extra\testdata
PYLINT_TEST_FILE: ${{ github.workspace }}\opencv\samples\python\squares.py
steps:
- name: Cleanup
shell: bash
run: |
rm -rf ./* || true
rm -rf ./.??* || true
working-directory: ${{ github.workspace }}
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.platform }}
- name: Download a wheel accordingly to matrix
uses: actions/download-artifact@v2
with:
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}-${{ matrix.platform }}
path: wheelhouse/
- name: Package installation
run: |
cd ${{ github.workspace }}/tests
......@@ -125,24 +117,20 @@ jobs:
if ($LastExitCode -ne 0) {throw $LastExitCode}
python get_build_info.py
shell: powershell
- name: Run tests
run: |
cd ${{ github.workspace }}/opencv
python modules\python\test\test.py -v --repo .
shell: cmd
- name: Pylint test
run: |
python -m pip install pylint==2.12.2
cd ${{ github.workspace }}\tests
python -m pylint $PYLINT_TEST_FILE
shell: cmd
test_release_opencv_python:
if: github.event_name == 'release' && github.event.release.prerelease
needs: [build-windows-x86_64, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: test-opencv-python-release
defaults:
run:
......@@ -152,7 +140,6 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload all wheels
run: |
python -m pip install twine
......@@ -161,7 +148,7 @@ jobs:
release_opencv_python:
if: github.event_name == 'release' && !github.event.release.prerelease
needs: [build-windows-x86_64, test]
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
environment: opencv-python-release
defaults:
run:
......@@ -171,22 +158,18 @@ jobs:
with:
name: wheels
path: wheelhouse/
- name: Upload wheels for opencv_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-*
- name: Upload wheels for opencv_contrib_python
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python-*
- name: Upload wheels for opencv_python_headless
run: |
python -m pip install twine
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-*
- name: Upload wheels for opencv_contrib_python_headless
run: |
python -m pip install twine
......
# Version: 20220628
# Image name: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64
FROM quay.io/pypa/manylinux2014_aarch64:latest
ARG CCACHE_VERSION=3.7.9
......@@ -35,7 +38,7 @@ RUN mkdir ~/freetype_sources && \
curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \
cd freetype-${FREETYPE_VERSION} && \
./configure --prefix="$HOME/ffmpeg_build" --enable-freetype-config && \
./configure --prefix="/ffmpeg_build" --enable-freetype-config && \
make && \
make install && \
cd .. && \
......@@ -59,7 +62,7 @@ RUN mkdir ~/openssl_sources && \
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" no-pinshared shared zlib && \
./config --prefix="/ffmpeg_build" --openssldir="/ffmpeg_build" no-pinshared shared zlib && \
make -j$(getconf _NPROCESSORS_ONLN) && \
# skip installing documentation
make install_sw && \
......@@ -70,7 +73,7 @@ RUN mkdir ~/nasm_sources && \
cd ~/nasm_sources && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.bz2 && \
tar -xf nasm-${NASM_VERSION}.tar.bz2 && cd nasm-${NASM_VERSION} && ./autogen.sh && \
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
./configure --prefix="/ffmpeg_build" --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd .. && \
......@@ -81,7 +84,7 @@ RUN mkdir ~/yasm_sources && \
curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \
tar -xf yasm-${YASM_VERSION}.tar.gz && \
cd yasm-${YASM_VERSION} && \
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
./configure --prefix="/ffmpeg_build" --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd .. && \
......@@ -91,7 +94,7 @@ RUN mkdir ~/libvpx_sources && \
cd ~/libvpx_sources && \
git clone --depth 1 https://github.com/webmproject/libvpx.git && \
cd libvpx && \
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
./configure --prefix="/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd .. && \
......@@ -103,10 +106,10 @@ RUN mkdir ~/ffmpeg_sources && \
tar -xf ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
cd ffmpeg-${FFMPEG_VERSION} && \
PATH=~/bin:$PATH && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
PKG_CONFIG_PATH="/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/ffmpeg_build" --extra-cflags="-I/ffmpeg_build/include" --extra-ldflags="-L/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
echo "/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
ldconfig && \
rm -rf ~/ffmpeg_sources && \
yum remove bzip2-devel -y
......@@ -120,10 +123,20 @@ RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERS
cd .. && \
rm -rf ccache-${CCACHE_VERSION}.tar.gz
# Self-hosted runner UID is 1004
RUN useradd ci -m -s /bin/bash -G users --uid=1004 && \
mkdir /io && \
chown -R ci:ci /io && \
# This needs to find ffmpeg packages from ci user
chown -R ci:ci /ffmpeg_build && \
# This calls in mutlibuild scripts and cannot be run without permissions
chown -R ci:ci /opt/_internal/pipx/venvs/auditwheel
USER ci
# Git security vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-announced
RUN mkdir /io && \
git config --global --add safe.directory /io
RUN git config --global --add safe.directory /io
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
ENV LDFLAGS -L/root/ffmpeg_build/lib
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/ffmpeg_build/lib/pkgconfig
ENV LDFLAGS -L/ffmpeg_build/lib
ENV PATH "$HOME/bin:$PATH"
# Version: 20220628
# Image name: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64
FROM quay.io/pypa/manylinux2014_x86_64:latest
ARG CCACHE_VERSION=3.7.9
ARG FFMPEG_VERSION=4.4.1
ARG FREETYPE_VERSION=2.12.1
ARG LIBPNG_VERSION=1.6.37
......@@ -34,7 +38,7 @@ RUN mkdir ~/freetype_sources && \
curl -O -L https://download.savannah.gnu.org/releases/freetype/freetype-${FREETYPE_VERSION}.tar.gz && \
tar -xf freetype-${FREETYPE_VERSION}.tar.gz && \
cd freetype-${FREETYPE_VERSION} && \
./configure --prefix="$HOME/ffmpeg_build" --enable-freetype-config && \
./configure --prefix="/ffmpeg_build" --enable-freetype-config && \
make && \
make install && \
cd .. && \
......@@ -58,7 +62,7 @@ RUN mkdir ~/openssl_sources && \
curl -O -L https://github.com/openssl/openssl/archive/OpenSSL_${OPENSSL_VERSION}.tar.gz && \
tar -xf OpenSSL_${OPENSSL_VERSION}.tar.gz && \
cd openssl-OpenSSL_${OPENSSL_VERSION} && \
./config --prefix="$HOME/ffmpeg_build" --openssldir="$HOME/ffmpeg_build" no-pinshared shared zlib && \
./config --prefix="/ffmpeg_build" --openssldir="/ffmpeg_build" no-pinshared shared zlib && \
make -j$(getconf _NPROCESSORS_ONLN) && \
# skip installing documentation
make install_sw && \
......@@ -69,7 +73,7 @@ RUN mkdir ~/nasm_sources && \
cd ~/nasm_sources && \
curl -O -L http://www.nasm.us/pub/nasm/releasebuilds/${NASM_VERSION}/nasm-${NASM_VERSION}.tar.bz2 && \
tar -xf nasm-${NASM_VERSION}.tar.bz2 && cd nasm-${NASM_VERSION} && ./autogen.sh && \
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
./configure --prefix="/ffmpeg_build" --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd .. && \
......@@ -80,7 +84,7 @@ RUN mkdir ~/yasm_sources && \
curl -O -L http://www.tortall.net/projects/yasm/releases/yasm-${YASM_VERSION}.tar.gz && \
tar -xf yasm-${YASM_VERSION}.tar.gz && \
cd yasm-${YASM_VERSION} && \
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" && \
./configure --prefix="/ffmpeg_build" --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd .. && \
......@@ -90,7 +94,7 @@ RUN mkdir ~/libvpx_sources && \
cd ~/libvpx_sources && \
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git && \
cd libvpx && \
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
./configure --prefix="/ffmpeg_build" --disable-examples --disable-unit-tests --enable-vp9-highbitdepth --as=yasm --enable-pic --enable-shared && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd .. && \
......@@ -102,18 +106,37 @@ RUN mkdir ~/ffmpeg_sources && \
tar -xf ffmpeg-${FFMPEG_VERSION}.tar.bz2 && \
cd ffmpeg-${FFMPEG_VERSION} && \
PATH=~/bin:$PATH && \
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
PKG_CONFIG_PATH="/ffmpeg_build/lib/pkgconfig" ./configure --prefix="/ffmpeg_build" --extra-cflags="-I/ffmpeg_build/include" --extra-ldflags="-L/ffmpeg_build/lib" --enable-openssl --enable-libvpx --enable-shared --enable-pic --bindir="$HOME/bin" && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
echo "/root/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
echo "/ffmpeg_build/lib/" >> /etc/ld.so.conf && \
ldconfig && \
rm -rf ~/ffmpeg_sources && \
yum remove bzip2-devel -y
RUN curl -O -L https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/ccache-${CCACHE_VERSION}.tar.gz && \
tar -xf ccache-${CCACHE_VERSION}.tar.gz && \
cd ccache-${CCACHE_VERSION} && \
./configure && \
make -j$(getconf _NPROCESSORS_ONLN) && \
make install && \
cd .. && \
rm -rf ccache-${CCACHE_VERSION}.tar.gz
# GitHub Actions user`s UID is 1001
RUN useradd ci -m -s /bin/bash -G users --uid=1001 && \
mkdir /io && \
chown -R ci:ci /io && \
# This needs to find ffmpeg packages from ci user
chown -R ci:ci /ffmpeg_build && \
# This calls in mutlibuild scripts and cannot be run without permissions
chown -R ci:ci /opt/_internal/pipx/venvs/auditwheel
USER ci
# Git security vulnerability: https://github.blog/2022-04-12-git-security-vulnerability-announced
RUN mkdir /io && \
git config --global --add safe.directory /io
RUN git config --global --add safe.directory /io
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/root/ffmpeg_build/lib/pkgconfig
ENV LDFLAGS -L/root/ffmpeg_build/lib
ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig:/ffmpeg_build/lib/pkgconfig
ENV LDFLAGS -L/ffmpeg_build/lib
ENV PATH "$HOME/bin:$PATH"
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册