2020
2121jobs :
2222 Build :
23- runs-on : opencv-cn-mac-arm64
23+ runs-on : python-macos11-m1
2424 strategy :
2525 fail-fast : false
2626 matrix :
27- python-version : ['3.7 ']
27+ python-version : ['3.9 ']
2828 platform : [x64]
2929 with_contrib : [0, 1]
3030 without_gui : [0, 1]
3434 SDIST : ${{ matrix.build_sdist || 0 }}
3535 ENABLE_HEADLESS : ${{ matrix.without_gui }}
3636 ENABLE_CONTRIB : ${{ matrix.with_contrib }}
37+ PIP_INDEX_URL : https://pypi.tuna.tsinghua.edu.cn/simple
3738 steps :
3839 - name : Cleanup
3940 run : find . -mindepth 1 -delete
5455 echo $ENABLE_CONTRIB > contrib.enabled
5556 echo $ENABLE_HEADLESS > headless.enabled
5657 export MACOSX_DEPLOYMENT_TARGET=11.0
57- 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
58- arch -arm64 python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
58+ 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
59+ python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
5960 delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
6061 - name : Saving all wheels
6162 uses : actions/upload-artifact@v3
@@ -74,14 +75,15 @@ jobs:
7475 strategy :
7576 fail-fast : false
7677 matrix :
77- python-version : ['3.7', '3.8', '3.9', '3.10']
78+ python-version : ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12' ]
7879 platform : [x64]
7980 with_contrib : [0, 1]
8081 without_gui : [0, 1]
8182 build_sdist : [0]
8283 env :
8384 OPENCV_TEST_DATA_PATH : ${{ github.workspace }}/opencv_extra/testdata
8485 PYLINT_TEST_FILE : ${{ github.workspace }}/opencv/samples/python/squares.py
86+ PIP_INDEX_URL : https://pypi.tuna.tsinghua.edu.cn/simple
8587 steps :
8688 - name : Cleanup
8789 run : find . -mindepth 1 -delete
@@ -96,20 +98,28 @@ jobs:
9698 with :
9799 name : wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
98100 path : wheelhouse/
101+ - name : Create Venv for test
102+ run : |
103+ test -d "${{ github.workspace }}/opencv_test" && rm -rf "${{ github.workspace }}/opencv_test"
104+ python${{ matrix.python-version }} -m venv ${{ github.workspace }}/opencv_test
99105 - name : Package installation
100106 run : |
101- arch -arm64 python${{ matrix.python-version }} -m pip install --user --no-cache --force-reinstall wheelhouse/opencv*.whl
107+ source ${{ github.workspace }}/opencv_test/bin/activate
108+ python${{ matrix.python-version }} -m pip install --upgrade pip
109+ python${{ matrix.python-version }} -m pip install --no-cache --force-reinstall wheelhouse/opencv*.whl
102110 cd ${{ github.workspace }}/tests
103- arch -arm64 python${{ matrix.python-version }} get_build_info.py
111+ python${{ matrix.python-version }} get_build_info.py
104112 - name : Run tests
105113 run : |
114+ source ${{ github.workspace }}/opencv_test/bin/activate
106115 cd ${{ github.workspace }}/opencv
107- arch -arm64 python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
116+ python${{ matrix.python-version }} modules/python/test/test.py -v --repo .
108117 - name : Pylint test
109118 run : |
110- arch -arm64 python${{ matrix.python-version }} -m pip install pylint==2.12.2
119+ source ${{ github.workspace }}/opencv_test/bin/activate
120+ python${{ matrix.python-version }} -m pip install pylint==2.15.9
111121 cd ${{ github.workspace }}/tests
112- arch -arm64 python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
122+ python${{ matrix.python-version }} -m pylint $PYLINT_TEST_FILE
113123
114124 Release_rolling :
115125 if : ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
0 commit comments