Skip to content

Commit 4638ce5

Browse files
authored
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
1 parent fcc900e commit 4638ce5

7 files changed

+121
-166
lines changed

.github/workflows/build_wheels_linux.yml

+17-36
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,18 @@ on:
1515

1616
jobs:
1717
build:
18-
runs-on: ${{ matrix.os }}
18+
runs-on: ubuntu-20.04
1919
defaults:
2020
run:
2121
shell: bash
22-
2322
strategy:
2423
fail-fast: false
2524
matrix:
26-
os: [ubuntu-latest]
2725
python-version: ['3.6']
2826
platform: [x64]
2927
with_contrib: [0, 1]
3028
without_gui: [0, 1]
3129
build_sdist: [0]
32-
3330
env:
3431
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3532
REPO_DIR: .
@@ -40,34 +37,32 @@ jobs:
4037
MB_ML_VER: 2014
4138
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4239
CONFIG_PATH: travis_config.sh
43-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
44-
USE_CCACHE: 1
40+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20220628
41+
USE_CCACHE: 0
4542
UNICODE_WIDTH: 32
4643
PLAT: x86_64
4744
SDIST: ${{ matrix.build_sdist || 0 }}
4845
ENABLE_HEADLESS: ${{ matrix.without_gui }}
4946
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
50-
5147
steps:
48+
- name: Cleanup
49+
run: find . -mindepth 1 -delete
50+
working-directory: ${{ github.workspace }}
5251
- name: Checkout
5352
uses: actions/checkout@v2
5453
with:
5554
submodules: false
5655
fetch-depth: 0
57-
5856
- name: Update submodules
5957
if: github.event_name == 'pull_request'
6058
run: git submodule update --remote
61-
6259
- name: Build a package
6360
run: source scripts/build.sh
64-
6561
- name: Saving all wheels
6662
uses: actions/upload-artifact@v2
6763
with:
6864
name: wheels
6965
path: wheelhouse/opencv*.whl
70-
7166
- name: Saving a wheel accordingly to matrix
7267
uses: actions/upload-artifact@v2
7368
with:
@@ -76,64 +71,57 @@ jobs:
7671

7772
test:
7873
needs: [build]
79-
runs-on: ${{ matrix.os }}
74+
runs-on: ubuntu-20.04
8075
defaults:
8176
run:
8277
shell: bash
83-
8478
strategy:
8579
fail-fast: false
8680
matrix:
87-
os: [ubuntu-latest]
8881
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
8982
platform: [x64]
9083
with_contrib: [0, 1]
9184
without_gui: [0, 1]
9285
build_sdist: [0]
93-
9486
env:
9587
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
9688
MB_PYTHON_VERSION: ${{ matrix.python-version }}
9789
NP_TEST_DEP: numpy==1.19.4
9890
NP_TEST_DEP_LATEST: numpy==1.21.2
9991
CONFIG_PATH: travis_config.sh
10092
PLAT: x86_64
101-
10293
steps:
94+
- name: Cleanup
95+
run: find . -mindepth 1 -delete
96+
working-directory: ${{ github.workspace }}
10397
- name: Checkout
10498
uses: actions/checkout@v2
10599
with:
106100
submodules: true
107101
fetch-depth: 0
108-
109102
- name: Setup Environment variables
110103
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
111-
112104
- name: Download a wheel accordingly to matrix
113105
uses: actions/download-artifact@v2
114106
with:
115107
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
116108
path: wheelhouse/
117-
118109
- name: Package installation and run tests
119110
run: source scripts/install.sh
120111

121112
build_sdist:
122-
runs-on: ${{ matrix.os }}
113+
runs-on: ubuntu-20.04
123114
defaults:
124115
run:
125116
shell: bash
126-
127117
strategy:
128118
fail-fast: false
129119
matrix:
130-
os: [ubuntu-latest]
131120
python-version: [3.8]
132121
platform: [x64]
133122
with_contrib: [0, 1]
134123
without_gui: [0, 1]
135124
build_sdist: [1]
136-
137125
env:
138126
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
139127
REPO_DIR: .
@@ -146,30 +134,29 @@ jobs:
146134
NP_TEST_DEP: numpy==1.19.4
147135
TRAVIS_BUILD_DIR: ${{ github.workspace }}
148136
CONFIG_PATH: travis_config.sh
149-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
137+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-x86-64:20220628
150138
USE_CCACHE: 1
151139
UNICODE_WIDTH: 32
152140
SDIST: ${{ matrix.build_sdist || 0 }}
153141
ENABLE_HEADLESS: ${{ matrix.without_gui || 0 }}
154142
ENABLE_CONTRIB: ${{ matrix.with_contrib || 0 }}
155-
156143
steps:
144+
- name: Cleanup
145+
run: find . -mindepth 1 -delete
146+
working-directory: ${{ github.workspace }}
157147
- name: Checkout
158148
uses: actions/checkout@v2
159149
with:
160150
submodules: false
161151
fetch-depth: 0
162-
163152
- name: Update submodules
164153
if: github.event_name == 'pull_request'
165154
run: git submodule update --remote
166-
167155
- name: Set up Python ${{ matrix.python-version }}
168156
uses: actions/setup-python@v2
169157
with:
170158
python-version: ${{ matrix.python-version }}
171159
architecture: ${{ matrix.platform }}
172-
173160
- name: Build a package
174161
run: |
175162
set -e
@@ -182,7 +169,6 @@ jobs:
182169
# Install and run tests
183170
set -x
184171
echo "skipping tests because of sdist"
185-
186172
- name: saving artifacts
187173
uses: actions/upload-artifact@v2
188174
with:
@@ -192,7 +178,7 @@ jobs:
192178
test_release_opencv_python:
193179
if: github.event_name == 'release' && github.event.release.prerelease
194180
needs: [build, build_sdist, test]
195-
runs-on: ubuntu-latest
181+
runs-on: ubuntu-20.04
196182
environment: test-opencv-python-release
197183
defaults:
198184
run:
@@ -202,7 +188,6 @@ jobs:
202188
with:
203189
name: wheels
204190
path: wheelhouse/
205-
206191
- name: Upload all wheels
207192
run: |
208193
python -m pip install twine
@@ -211,7 +196,7 @@ jobs:
211196
release_opencv_python:
212197
if: github.event_name == 'release' && !github.event.release.prerelease
213198
needs: [build, build_sdist, test]
214-
runs-on: ubuntu-latest
199+
runs-on: ubuntu-20.04
215200
environment: opencv-python-release
216201
defaults:
217202
run:
@@ -221,22 +206,18 @@ jobs:
221206
with:
222207
name: wheels
223208
path: wheelhouse/
224-
225209
- name: Upload wheels for opencv_python
226210
run: |
227211
python -m pip install twine
228212
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-* wheelhouse/opencv-python-[^h]*
229-
230213
- name: Upload wheels for opencv_contrib_python
231214
run: |
232215
python -m pip install twine
233216
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]*
234-
235217
- name: Upload wheels for opencv_python_headless
236218
run: |
237219
python -m pip install twine
238220
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-*
239-
240221
- name: Upload wheels for opencv_contrib_python_headless
241222
run: |
242223
python -m pip install twine

.github/workflows/build_wheels_linux_arm.yml

+11-30
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,18 @@ on:
1515

1616
jobs:
1717
build_arm:
18-
runs-on: ${{ matrix.os }}
18+
runs-on: opencv-cn-lin-arm64
1919
defaults:
2020
run:
2121
shell: bash
22-
2322
strategy:
2423
fail-fast: false
2524
matrix:
26-
os: [ARM64]
2725
python-version: ['3.6']
2826
platform: [x64]
2927
with_contrib: [0, 1]
3028
without_gui: [0, 1]
3129
build_sdist: [0]
32-
3330
env:
3431
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
3532
REPO_DIR: .
@@ -41,33 +38,30 @@ jobs:
4138
MB_ML_VER: 2014
4239
TRAVIS_BUILD_DIR: ${{ github.workspace }}
4340
CONFIG_PATH: travis_config.sh
44-
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014:${PLAT}
41+
DOCKER_IMAGE: quay.io/opencv-ci/opencv-python-manylinux2014-aarch64:20220628
4542
USE_CCACHE: 0
4643
UNICODE_WIDTH: 32
4744
SDIST: ${{ matrix.build_sdist || 0 }}
4845
ENABLE_HEADLESS: ${{ matrix.without_gui }}
4946
ENABLE_CONTRIB: ${{ matrix.with_contrib }}
50-
5147
steps:
48+
- name: UID
49+
run: id -u
5250
- name: Cleanup
53-
if: always()
54-
uses: AutoModality/action-clean@v1
55-
51+
run: find . -mindepth 1 -delete
52+
working-directory: ${{ github.workspace }}
5653
- name: Checkout
5754
uses: actions/checkout@v2
5855
with:
5956
submodules: false
6057
fetch-depth: 0
61-
6258
- name: Build a package
6359
run: source scripts/build.sh
64-
6560
- name: Saving all wheels
6661
uses: actions/upload-artifact@v2
6762
with:
6863
name: wheels
6964
path: wheelhouse/opencv*.whl
70-
7165
- name: Saving a wheel accordingly to matrix
7266
uses: actions/upload-artifact@v2
7367
with:
@@ -76,21 +70,18 @@ jobs:
7670

7771
test:
7872
needs: [build_arm]
79-
runs-on: ${{ matrix.os }}
73+
runs-on: opencv-cn-lin-arm64
8074
defaults:
8175
run:
8276
shell: bash
83-
8477
strategy:
8578
fail-fast: false
8679
matrix:
87-
os: [ARM64]
8880
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10']
8981
platform: [x64]
9082
with_contrib: [0, 1]
9183
without_gui: [0, 1]
9284
build_sdist: [0]
93-
9485
env:
9586
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
9687
MB_PYTHON_VERSION: ${{ matrix.python-version }}
@@ -100,34 +91,29 @@ jobs:
10091
CONFIG_PATH: travis_config.sh
10192
DOCKER_TEST_IMAGE: multibuild/focal_arm64v8
10293
UNICODE_WIDTH: 32
103-
10494
steps:
10595
- name: Cleanup
106-
if: always()
107-
uses: AutoModality/action-clean@v1
108-
96+
run: find . -mindepth 1 -delete
97+
working-directory: ${{ github.workspace }}
10998
- name: Checkout
11099
uses: actions/checkout@v2
111100
with:
112101
submodules: true
113102
fetch-depth: 0
114-
115103
- name: Setup Environment variables
116104
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
117-
118105
- name: Download a wheel accordingly to matrix
119106
uses: actions/download-artifact@v2
120107
with:
121108
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
122109
path: wheelhouse/
123-
124110
- name: Package installation and run tests
125111
run: source scripts/install.sh
126112

127113
test_release_opencv_python:
128114
if: github.event_name == 'release' && github.event.release.prerelease
129115
needs: [build_arm, test]
130-
runs-on: ubuntu-latest
116+
runs-on: ubuntu-20.04
131117
environment: test-opencv-python-release
132118
defaults:
133119
run:
@@ -137,7 +123,6 @@ jobs:
137123
with:
138124
name: wheels
139125
path: wheelhouse/
140-
141126
- name: Upload all wheels
142127
run: |
143128
python -m pip install twine
@@ -146,7 +131,7 @@ jobs:
146131
release_opencv_python:
147132
if: github.event_name == 'release' && !github.event.release.prerelease
148133
needs: [build_arm, test]
149-
runs-on: ubuntu-latest
134+
runs-on: ubuntu-20.04
150135
environment: opencv-python-release
151136
defaults:
152137
run:
@@ -156,22 +141,18 @@ jobs:
156141
with:
157142
name: wheels
158143
path: wheelhouse/
159-
160144
- name: Upload wheels for opencv_python
161145
run: |
162146
python -m pip install twine
163147
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_python-*
164-
165148
- name: Upload wheels for opencv_contrib_python
166149
run: |
167150
python -m pip install twine
168151
python -m twine upload -u ${{ secrets.OPENCV_CONTRIB_PYTHON_USERNAME }} -p ${{ secrets.OPENCV_CONTRIB_PYTHON_PASSWORD }} --skip-existing wheelhouse/opencv_contrib_python-*
169-
170152
- name: Upload wheels for opencv_python_headless
171153
run: |
172154
python -m pip install twine
173155
python -m twine upload -u ${{ secrets.OPENCV_PYTHON_HEADLESS_USERNAME }} -p ${{ secrets.OPENCV_PYTHON_HEADLESS_PASSWORD }} --skip-existing wheelhouse/opencv_python_headless-*
174-
175156
- name: Upload wheels for opencv_contrib_python_headless
176157
run: |
177158
python -m pip install twine

0 commit comments

Comments
 (0)