Skip to content

Commit dccecfa

Browse files
authored
Linux and Mac builds update (#1106)
* Base image update from ubuntu 20.04 to 22.04. * Update dependencies. * Removed double artifacts upload. * Use fresh download step. * Deduplicate wheels upload on Mac too.
1 parent 2606a60 commit dccecfa

File tree

4 files changed

+37
-57
lines changed

4 files changed

+37
-57
lines changed

.github/workflows/build_wheels_linux.yml

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ on:
2020

2121
jobs:
2222
Build:
23-
runs-on: ubuntu-20.04
23+
runs-on: ubuntu-22.04
2424
defaults:
2525
run:
2626
shell: bash
@@ -64,20 +64,15 @@ jobs:
6464
fetch-depth: 0
6565
- name: Build a package
6666
run: source scripts/build.sh
67-
- name: Saving all wheels
68-
uses: actions/upload-artifact@v3
69-
with:
70-
name: wheels
71-
path: wheelhouse/opencv*.whl
7267
- name: Saving a wheel accordingly to matrix
73-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
7469
with:
7570
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
7671
path: wheelhouse/opencv*.whl
7772

7873
Test:
7974
needs: [Build]
80-
runs-on: ubuntu-20.04
75+
runs-on: ubuntu-22.04
8176
defaults:
8277
run:
8378
shell: bash
@@ -108,15 +103,15 @@ jobs:
108103
- name: Setup Environment variables
109104
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ 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
110105
- name: Download a wheel accordingly to matrix
111-
uses: actions/download-artifact@v3
106+
uses: actions/download-artifact@v4
112107
with:
113108
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
114109
path: wheelhouse/
115110
- name: Package installation and run tests
116111
run: source scripts/install.sh
117112

118113
Build_sdist:
119-
runs-on: ubuntu-20.04
114+
runs-on: ubuntu-22.04
120115
defaults:
121116
run:
122117
shell: bash
@@ -177,21 +172,21 @@ jobs:
177172
set -x
178173
echo "skipping tests because of sdist"
179174
- name: saving artifacts
180-
uses: actions/upload-artifact@v3
175+
uses: actions/upload-artifact@v4
181176
with:
182-
name: wheels
177+
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
183178
path: dist/opencv*.tar.gz
184179

185180
Release_rolling:
186181
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
187182
needs: [Build, Test]
188-
runs-on: ubuntu-20.04
183+
runs-on: ubuntu-22.04
189184
environment: opencv-python-rolling-release
190185
defaults:
191186
run:
192187
shell: bash
193188
steps:
194-
- uses: actions/download-artifact@v3
189+
- uses: actions/download-artifact@v4
195190
with:
196191
name: wheels
197192
path: wheelhouse/
@@ -215,13 +210,13 @@ jobs:
215210
Pre-release:
216211
if: github.event_name == 'release' && github.event.release.prerelease
217212
needs: [Build, Build_sdist, Test]
218-
runs-on: ubuntu-20.04
213+
runs-on: ubuntu-22.04
219214
environment: test-opencv-python-release
220215
defaults:
221216
run:
222217
shell: bash
223218
steps:
224-
- uses: actions/download-artifact@v3
219+
- uses: actions/download-artifact@v4
225220
with:
226221
name: wheels
227222
path: wheelhouse/
@@ -233,13 +228,13 @@ jobs:
233228
Release:
234229
if: github.event_name == 'release' && !github.event.release.prerelease
235230
needs: [Build, Build_sdist, Test]
236-
runs-on: ubuntu-20.04
231+
runs-on: ubuntu-22.04
237232
environment: opencv-python-release
238233
defaults:
239234
run:
240235
shell: bash
241236
steps:
242-
- uses: actions/download-artifact@v3
237+
- uses: actions/download-artifact@v4
243238
with:
244239
name: wheels
245240
path: wheelhouse/

.github/workflows/build_wheels_linux_arm.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,8 @@ jobs:
6464
fetch-depth: 0
6565
- name: Build a package
6666
run: source scripts/build.sh
67-
- name: Saving all wheels
68-
uses: actions/upload-artifact@v3
69-
with:
70-
name: wheels
71-
path: wheelhouse/opencv*.whl
7267
- name: Saving a wheel accordingly to matrix
73-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v4
7469
with:
7570
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
7671
path: wheelhouse/opencv*.whl
@@ -110,7 +105,7 @@ jobs:
110105
- name: Setup Environment variables
111106
run: if [ "3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ 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
112107
- name: Download a wheel accordingly to matrix
113-
uses: actions/download-artifact@v3
108+
uses: actions/download-artifact@v4
114109
with:
115110
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
116111
path: wheelhouse/
@@ -120,13 +115,13 @@ jobs:
120115
Release_rolling:
121116
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
122117
needs: [Build, Test]
123-
runs-on: ubuntu-20.04
118+
runs-on: ubuntu-22.04
124119
environment: opencv-python-rolling-release
125120
defaults:
126121
run:
127122
shell: bash
128123
steps:
129-
- uses: actions/download-artifact@v3
124+
- uses: actions/download-artifact@v4
130125
with:
131126
name: wheels
132127
path: wheelhouse/
@@ -150,13 +145,13 @@ jobs:
150145
Pre-release:
151146
if: github.event_name == 'release' && github.event.release.prerelease
152147
needs: [Build, Test]
153-
runs-on: ubuntu-20.04
148+
runs-on: ubuntu-22.04
154149
environment: test-opencv-python-release
155150
defaults:
156151
run:
157152
shell: bash
158153
steps:
159-
- uses: actions/download-artifact@v3
154+
- uses: actions/download-artifact@v4
160155
with:
161156
name: wheels
162157
path: wheelhouse/
@@ -168,13 +163,13 @@ jobs:
168163
Release:
169164
if: github.event_name == 'release' && !github.event.release.prerelease
170165
needs: [Build, Test]
171-
runs-on: ubuntu-20.04
166+
runs-on: ubuntu-22.04
172167
environment: opencv-python-release
173168
defaults:
174169
run:
175170
shell: bash
176171
steps:
177-
- uses: actions/download-artifact@v3
172+
- uses: actions/download-artifact@v4
178173
with:
179174
name: wheels
180175
path: wheelhouse/

.github/workflows/build_wheels_macos.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,8 @@ jobs:
8585
echo $ENABLE_HEADLESS > headless.enabled
8686
set -x
8787
build_wheel $REPO_DIR $PLAT
88-
- name: Saving all wheels
89-
uses: actions/upload-artifact@v3
90-
with:
91-
name: wheels
92-
path: wheelhouse/opencv*.whl
9388
- name: Saving a wheel accordingly to matrix
94-
uses: actions/upload-artifact@v3
89+
uses: actions/upload-artifact@v4
9590
with:
9691
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
9792
path: wheelhouse/opencv*.whl
@@ -136,7 +131,7 @@ jobs:
136131
- name: Setup Environment variables
137132
run: if ["3.10" == "${{ matrix.python-version }}" -o "3.11" == "${{ matrix.python-version }}" -o "3.12" == "${{ matrix.python-version }}" -o "3.13" == "${{ 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
138133
- name: Download a wheel accordingly to matrix
139-
uses: actions/download-artifact@v3
134+
uses: actions/download-artifact@v4
140135
with:
141136
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
142137
path: wheelhouse/
@@ -158,13 +153,13 @@ jobs:
158153
Release_rolling:
159154
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
160155
needs: [Build, Test]
161-
runs-on: ubuntu-20.04
156+
runs-on: ubuntu-22.04
162157
environment: opencv-python-rolling-release
163158
defaults:
164159
run:
165160
shell: bash
166161
steps:
167-
- uses: actions/download-artifact@v3
162+
- uses: actions/download-artifact@v4
168163
with:
169164
name: wheels
170165
path: wheelhouse/
@@ -188,13 +183,13 @@ jobs:
188183
Pre-release:
189184
if: github.event_name == 'release' && github.event.release.prerelease
190185
needs: [Build, Test]
191-
runs-on: ubuntu-20.04
186+
runs-on: ubuntu-22.04
192187
environment: test-opencv-python-release
193188
defaults:
194189
run:
195190
shell: bash
196191
steps:
197-
- uses: actions/download-artifact@v3
192+
- uses: actions/download-artifact@v4
198193
with:
199194
name: wheels
200195
path: wheelhouse/
@@ -206,13 +201,13 @@ jobs:
206201
Release:
207202
if: github.event_name == 'release' && !github.event.release.prerelease
208203
needs: [Build, Test]
209-
runs-on: ubuntu-20.04
204+
runs-on: ubuntu-22.04
210205
environment: opencv-python-release
211206
defaults:
212207
run:
213208
shell: bash
214209
steps:
215-
- uses: actions/download-artifact@v3
210+
- uses: actions/download-artifact@v4
216211
with:
217212
name: wheels
218213
path: wheelhouse/

.github/workflows/build_wheels_macos_m1.yml

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,8 @@ jobs:
5858
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
5959
python${{ matrix.python-version }} setup.py bdist_wheel --py-limited-api=cp37 --dist-dir=wheelhouse -v
6060
delocate-wheel ${{ github.workspace }}/wheelhouse/opencv*
61-
- name: Saving all wheels
62-
uses: actions/upload-artifact@v3
63-
with:
64-
name: wheels
65-
path: wheelhouse/opencv*.whl
6661
- name: Saving a wheel accordingly to matrix
67-
uses: actions/upload-artifact@v3
62+
uses: actions/upload-artifact@v4
6863
with:
6964
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
7065
path: wheelhouse/opencv*.whl
@@ -94,7 +89,7 @@ jobs:
9489
submodules: true
9590
fetch-depth: 0
9691
- name: Download a wheel accordingly to matrix
97-
uses: actions/download-artifact@v3
92+
uses: actions/download-artifact@v4
9893
with:
9994
name: wheel-${{ matrix.with_contrib }}-${{ matrix.without_gui }}-${{ matrix.build_sdist }}
10095
path: wheelhouse/
@@ -124,13 +119,13 @@ jobs:
124119
Release_rolling:
125120
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }}
126121
needs: [Build, Test]
127-
runs-on: ubuntu-20.04
122+
runs-on: ubuntu-22.04
128123
environment: opencv-python-rolling-release
129124
defaults:
130125
run:
131126
shell: bash
132127
steps:
133-
- uses: actions/download-artifact@v3
128+
- uses: actions/download-artifact@v4
134129
with:
135130
name: wheels
136131
path: wheelhouse/
@@ -154,13 +149,13 @@ jobs:
154149
Pre-release:
155150
if: github.event_name == 'release' && github.event.release.prerelease
156151
needs: [Build, Test]
157-
runs-on: ubuntu-20.04
152+
runs-on: ubuntu-22.04
158153
environment: test-opencv-python-release
159154
defaults:
160155
run:
161156
shell: bash
162157
steps:
163-
- uses: actions/download-artifact@v3
158+
- uses: actions/download-artifact@v4
164159
with:
165160
name: wheels
166161
path: wheelhouse/
@@ -172,13 +167,13 @@ jobs:
172167
Release:
173168
if: github.event_name == 'release' && !github.event.release.prerelease
174169
needs: [Build, Test]
175-
runs-on: ubuntu-20.04
170+
runs-on: ubuntu-22.04
176171
environment: opencv-python-release
177172
defaults:
178173
run:
179174
shell: bash
180175
steps:
181-
- uses: actions/download-artifact@v3
176+
- uses: actions/download-artifact@v4
182177
with:
183178
name: wheels
184179
path: wheelhouse/

0 commit comments

Comments
 (0)