2323 fail-fast : false
2424 matrix :
2525 os : [ubuntu-latest]
26- python-version : ['3.6', '3.7', '3.8', '3.9', '3.10' ]
26+ python-version : ['3.6']
2727 platform : [x64]
2828 with_contrib : [0, 1]
2929 without_gui : [0, 1]
@@ -37,13 +37,12 @@ jobs:
3737 MB_PYTHON_VERSION : ${{ matrix.python-version }}
3838 TRAVIS_PYTHON_VERSION : ${{ matrix.python-version }}
3939 MB_ML_VER : 2014
40- NP_TEST_DEP : numpy==1.19.4
41- NP_TEST_DEP_LATEST : numpy==1.21.2
4240 TRAVIS_BUILD_DIR : ${{ github.workspace }}
4341 CONFIG_PATH : travis_config.sh
4442 DOCKER_IMAGE : quay.io/asenyaev/manylinux2014_${PLAT}
4543 USE_CCACHE : 1
4644 UNICODE_WIDTH : 32
45+ PLAT : x86_64
4746 SDIST : ${{ matrix.build_sdist || 0 }}
4847 ENABLE_HEADLESS : ${{ matrix.without_gui }}
4948 ENABLE_CONTRIB : ${{ matrix.with_contrib }}
@@ -59,25 +58,64 @@ jobs:
5958 if : github.event_name == 'pull_request'
6059 run : git submodule update --remote
6160
62- - name : Setup Environment variables
63- run : |
64- if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
65- if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
66- if [ "x64" == "${{ matrix.platform }}" ]; then echo "PLAT=x86_64" >> $GITHUB_ENV; fi
67- 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
68-
69- - name : build
61+ - name : Build a package
7062 run : source scripts/build.sh
7163
72- - name : install and test
73- run : source scripts/install.sh
74-
75- - name : saving artifacts
64+ - name : Saving all wheels
7665 uses : actions/upload-artifact@v2
7766 with :
7867 name : wheels
7968 path : wheelhouse/opencv*.whl
8069
70+ - name : Saving a wheel accordingly to matrix
71+ uses : actions/upload-artifact@v2
72+ with :
73+ name : wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
74+ path : wheelhouse/opencv*.whl
75+
76+ test :
77+ needs : [build]
78+ runs-on : ${{ matrix.os }}
79+ defaults :
80+ run :
81+ shell : bash
82+
83+ strategy :
84+ fail-fast : false
85+ matrix :
86+ os : [ubuntu-latest]
87+ python-version : ['3.6', '3.7', '3.8', '3.9', '3.10']
88+ platform : [x64]
89+ with_contrib : [0, 1]
90+ without_gui : [0, 1]
91+ build_sdist : [0]
92+
93+ env :
94+ ACTIONS_ALLOW_UNSECURE_COMMANDS : true
95+ MB_PYTHON_VERSION : ${{ matrix.python-version }}
96+ NP_TEST_DEP : numpy==1.19.4
97+ NP_TEST_DEP_LATEST : numpy==1.21.2
98+ CONFIG_PATH : travis_config.sh
99+ PLAT : x86_64
100+
101+ steps :
102+ - name : Checkout
103+ uses : actions/checkout@v2
104+ with :
105+ submodules : false
106+ fetch-depth : 0
107+
108+ - name : Setup Environment variables
109+ 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
110+
111+ - name : Download a wheel accordingly to matrix
112+ uses : actions/download-artifact@v2
113+ with :
114+ name : wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
115+ path : wheelhouse/
116+
117+ - name : Package installation and run tests
118+ run : source scripts/install.sh
81119
82120 build_sdist :
83121 runs-on : ${{ matrix.os }}
@@ -131,12 +169,7 @@ jobs:
131169 python-version : ${{ matrix.python-version }}
132170 architecture : ${{ matrix.platform }}
133171
134- - name : Setup Environment variables
135- run : |
136- if [ "schedule" == "${{ github.event_name }}" ]; then echo "TRAVIS_EVENT_TYPE=cron" >> $GITHUB_ENV; else echo "TRAVIS_EVENT_TYPE=${{ github.event_name }}" >> $GITHUB_ENV; fi
137- if [ "schedule" == "${{ github.event_name }}" ]; then echo "BUILD_COMMIT=master" >> $GITHUB_ENV; else echo "BUILD_COMMIT=$BUILD_COMMIT" >> $GITHUB_ENV; fi
138-
139- - name : before install
172+ - name : Build a package
140173 run : |
141174 set -e
142175 # Build and package
@@ -157,7 +190,7 @@ jobs:
157190
158191 test_release_opencv_python :
159192 if : github.event_name == 'release' && github.event.release.prerelease
160- needs : [build, build_sdist]
193+ needs : [build, build_sdist, test ]
161194 runs-on : ubuntu-latest
162195 environment : test-opencv-python-release
163196 defaults :
@@ -176,7 +209,7 @@ jobs:
176209
177210 release_opencv_python :
178211 if : github.event_name == 'release' && !github.event.release.prerelease
179- needs : [build, build_sdist]
212+ needs : [build, build_sdist, test ]
180213 runs-on : ubuntu-latest
181214 environment : opencv-python-release
182215 defaults :
0 commit comments