9
9
10
10
jobs :
11
11
build-opencv :
12
- name : Build OpenCV
12
+ name : Build OpenCV (${{ matrix.os.artifact-name || matrix.os.runner }})
13
13
14
14
strategy :
15
15
matrix :
16
16
os :
17
- - ubuntu-latest
18
- - windows-latest
19
- - macos-13
20
- - macos-latest
17
+ - runner : ubuntu-latest
18
+ container : quay.io/pypa/manylinux_2_34_x86_64
19
+ artifact-name : linux
20
+ - runner : ubuntu-latest
21
+ container : quay.io/pypa/musllinux_1_2_x86_64
22
+ artifact-name : linux-musl
23
+ - runner : windows-latest
24
+ - runner : macos-13
25
+ - runner : macos-latest
21
26
22
27
defaults :
23
28
run :
@@ -26,16 +31,16 @@ jobs:
26
31
env :
27
32
SCCACHE_GHA_ENABLED : true
28
33
29
- runs-on : ${{ matrix.os }}
34
+ runs-on : ${{ matrix.os.runner }}
35
+ container : ${{ matrix.os.container }}
30
36
31
37
steps :
32
38
- name : Get latest release
33
39
id : latest-release
34
40
run : |
35
- curl -s https://api.github.com/repos/opencv/opencv/releases/latest \
36
- -H "Accept: application/vnd.github.v3+json" \
37
- -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
38
- | jq -r '.tag_name' | tee latest-release.txt
41
+ curl -Ls -o /dev/null -w %{url_effective} \
42
+ https://github.com/opencv/opencv/releases/latest \
43
+ | sed 's#.*tag/\(.*\)$#\1#' > latest-release.txt
39
44
echo "tag=$(cat latest-release.txt)" >> $GITHUB_OUTPUT
40
45
41
46
- uses : actions/checkout@main
@@ -85,20 +90,25 @@ jobs:
85
90
86
91
- uses : actions/upload-artifact@main
87
92
with :
88
- name : opencv-${{ matrix.os }}
93
+ name : opencv-${{ matrix.os.artifact-name || matrix.os.runner }}
89
94
path : ./opencv
90
95
91
96
build :
92
- name : Build Wheel
97
+ name : Build Wheel (${{ matrix.os.artifact-name || matrix.os.runner }})
93
98
needs : [build-opencv]
94
99
95
100
strategy :
96
101
matrix :
97
102
os :
98
- - ubuntu-latest
99
- - windows-latest
100
- - macos-13
101
- - macos-latest
103
+ - runner : ubuntu-latest
104
+ container : quay.io/pypa/manylinux_2_34_x86_64
105
+ artifact-name : linux
106
+ - runner : ubuntu-latest
107
+ container : quay.io/pypa/musllinux_1_2_x86_64
108
+ artifact-name : linux-musl
109
+ - runner : windows-latest
110
+ - runner : macos-13
111
+ - runner : macos-latest
102
112
python : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
103
113
exclude :
104
114
- os : macos-latest
@@ -111,14 +121,15 @@ jobs:
111
121
run :
112
122
shell : bash
113
123
114
- runs-on : ${{ matrix.os }}
124
+ runs-on : ${{ matrix.os.runner }}
125
+ container : ${{ matrix.os.container }}
115
126
116
127
steps :
117
128
- uses : actions/checkout@main
118
129
119
130
- uses : actions/download-artifact@main
120
131
with :
121
- name : opencv-${{ matrix.os }}
132
+ name : opencv-${{ matrix.os.artifact-name || matrix.os.runner }}
122
133
path : ./opencv
123
134
124
135
- uses : pdm-project/setup-pdm@main
@@ -151,20 +162,25 @@ jobs:
151
162
152
163
- uses : actions/upload-artifact@main
153
164
with :
154
- name : wheel-${{matrix.os}}-${{matrix.python}}
165
+ name : wheel-${{ matrix.os.artifact-name || matrix.os.runner }}-${{ matrix.python }}
155
166
path : ./dist/*.whl
156
167
157
168
test :
158
- name : Test Wheel
169
+ name : Test Wheel (${{ matrix.os.artifact-name || matrix.os.runner }})
159
170
needs : [build]
160
171
161
172
strategy :
162
173
matrix :
163
174
os :
164
- - ubuntu-latest
165
- - windows-latest
166
- - macos-13
167
- - macos-latest
175
+ - runner : ubuntu-latest
176
+ container : quay.io/pypa/manylinux_2_34_x86_64
177
+ artifact-name : linux
178
+ - runner : ubuntu-latest
179
+ container : quay.io/pypa/musllinux_1_2_x86_64
180
+ artifact-name : linux-musl
181
+ - runner : windows-latest
182
+ - runner : macos-13
183
+ - runner : macos-latest
168
184
python : ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
169
185
exclude :
170
186
- os : macos-latest
@@ -177,15 +193,16 @@ jobs:
177
193
run :
178
194
shell : bash
179
195
180
- runs-on : ${{ matrix.os }}
196
+ runs-on : ${{ matrix.os.runner }}
197
+ container : ${{ matrix.os.container }}
181
198
182
199
steps :
183
200
- uses : actions/checkout@main
184
201
185
202
- name : Download wheel
186
203
uses : actions/download-artifact@main
187
204
with :
188
- name : wheel-${{matrix.os}}-${{matrix.python}}
205
+ name : wheel-${{ matrix.os.artifact-name || matrix.os.runner }}-${{ matrix.python }}
189
206
path : ./dist
190
207
191
208
- uses : pdm-project/setup-pdm@main
@@ -196,7 +213,7 @@ jobs:
196
213
- name : Install dependencies
197
214
run : |
198
215
pdm install -G test --no-self
199
- pdm add dist/*.whl --no-lock
216
+ pdm add -v dist/*.whl --frozen-lockfile
200
217
201
218
- name : Run tests
202
219
run : |
0 commit comments