31
31
# 1箇所で pyi を生成してアーティファクトにアップロードして、
32
32
# それを各ビルドで利用する形にする。
33
33
build_pyi :
34
+ strategy :
35
+ fail-fast : false
36
+ matrix :
37
+ python_version :
38
+ - " 3.11"
39
+ - " 3.12"
40
+ - " 3.13"
34
41
runs-on : ubuntu-24.04
35
42
timeout-minutes : 15
36
43
steps :
40
47
- uses : astral-sh/setup-uv@v6
41
48
with :
42
49
enable-cache : false
43
- - run : uv python pin 3.13
50
+ - run : uv python pin ${{ matrix.python_version }}
44
51
- run : uv sync
45
52
- name : Generate pyi
46
53
run : |
@@ -51,43 +58,46 @@ jobs:
51
58
- name : Upload Artifact
52
59
uses : actions/upload-artifact@v4
53
60
with :
54
- name : sora_sdk
61
+ name : sora_sdk_${{ matrix.python_version }}
55
62
path : sora_sdk/
56
63
57
64
build_ubuntu :
58
65
strategy :
59
66
fail-fast : false
60
67
matrix :
61
68
platform :
62
- # - name: ubuntu-24.04_x86_64
63
- # target: ubuntu-24.04_x86_64
64
- # runs_on: ubuntu-24.04
65
- # os: ubuntu
69
+ - name : ubuntu-24.04_x86_64
70
+ target : ubuntu-24.04_x86_64
71
+ runs_on : ubuntu-24.04
72
+ os : ubuntu
73
+ arch : x86_64
66
74
- name : ubuntu-22.04_x86_64
67
75
target : ubuntu-22.04_x86_64
68
76
runs_on : ubuntu-22.04
69
77
os : ubuntu
70
78
arch : x86_64
79
+ - name : ubuntu-24.04_armv8
80
+ target : ubuntu-24.04_armv8
81
+ runs_on : ubuntu-24.04
82
+ os : ubuntu
83
+ arch : armv8
84
+ - name : ubuntu-22.04_armv8
85
+ target : ubuntu-22.04_armv8
86
+ runs_on : ubuntu-22.04
87
+ os : ubuntu
88
+ arch : armv8
71
89
python_version :
72
90
- " 3.11"
73
91
- " 3.12"
74
92
- " 3.13"
75
- include :
76
- - platform :
77
- name : ubuntu-24.04_armv8
78
- target : ubuntu-24.04_armv8
79
- runs_on : ubuntu-24.04
80
- os : ubuntu
81
- arch : armv8
82
- python_version : " 3.12"
83
93
needs : [build_pyi]
84
94
runs-on : ${{ matrix.platform.runs_on }}
85
95
timeout-minutes : 15
86
96
steps :
87
97
- uses : actions/checkout@v4
88
98
- uses : actions/download-artifact@v4
89
99
with :
90
- name : sora_sdk
100
+ name : sora_sdk_${{ matrix.python_version }}
91
101
path : sora_sdk/
92
102
- run : |
93
103
cp sora_sdk/py.typed src/sora_sdk/py.typed
@@ -127,6 +137,63 @@ jobs:
127
137
name : ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
128
138
path : " dist/"
129
139
140
+
141
+ # x86_64 でビルドした Ubuntu x86_64/arm64 向けの whl をチェックする
142
+ check_ubuntu_wheel :
143
+ strategy :
144
+ fail-fast : false
145
+ matrix :
146
+ # 22.04 x86_64 でクロスコンパイルした whl を 22.04 と 24.04 の x86_64/arm64 でチェックする
147
+ platform :
148
+ - name : ubuntu-22.04_x86_64
149
+ download_name : ubuntu-22.04_x86_64
150
+ runs_on : ubuntu-22.04
151
+ pytag : manylinux_2_31_x86_64
152
+ - name : ubuntu-22.04_armv8
153
+ download_name : ubuntu-22.04_armv8
154
+ runs_on : ubuntu-22.04-arm
155
+ pytag : manylinux_2_31_aarch64
156
+ - name : ubuntu-24.04_x86_64
157
+ download_name : ubuntu-22.04_x86_64
158
+ runs_on : ubuntu-24.04
159
+ pytag : manylinux_2_31_x86_64
160
+ - name : ubuntu-24.04_armv8
161
+ download_name : ubuntu-22.04_armv8
162
+ runs_on : ubuntu-24.04-arm
163
+ pytag : manylinux_2_31_aarch64
164
+ version :
165
+ - python : " 3.11"
166
+ pkg : " 311"
167
+ - python : " 3.12"
168
+ pkg : " 312"
169
+ - python : " 3.13"
170
+ pkg : " 313"
171
+ needs : [build_ubuntu]
172
+ runs-on : ${{ matrix.platform.runs_on }}
173
+ timeout-minutes : 15
174
+ steps :
175
+ - uses : actions/checkout@v4
176
+ - uses : astral-sh/setup-uv@v6
177
+ with :
178
+ enable-cache : false
179
+ - run : |
180
+ uv python pin ${{ matrix.version.python }}
181
+ - uses : actions/download-artifact@v4
182
+ with :
183
+ name : ${{ matrix.platform.download_name }}_python-${{ matrix.version.python }}
184
+ path : dist/
185
+
186
+ # VERSION ファイルからバージョンを取得
187
+ - id : get_version
188
+ run : |
189
+ VERSION=$(cat VERSION)
190
+ echo "version=$VERSION" >> $GITHUB_OUTPUT
191
+
192
+ # ここで download した whl ファイルの動作を確認する
193
+ - run : |
194
+ uv run --with dist/sora_sdk-${{ steps.get_version.outputs.version }}-cp${{ matrix.version.pkg }}-cp${{ matrix.version.pkg }}-${{ matrix.platform.pytag }}.whl \
195
+ python3 -c "import sora_sdk; print(sora_sdk.get_video_codec_capability().to_json())"
196
+
130
197
build_ubuntu_arm :
131
198
strategy :
132
199
fail-fast : false
@@ -138,16 +205,24 @@ jobs:
138
205
runs_on : ubuntu-24.04-arm
139
206
os : ubuntu
140
207
arch : armv8
208
+ - name : ubuntu-22.04_armv8
209
+ target : ubuntu-22.04_armv8
210
+ # arm64 でビルド
211
+ runs_on : ubuntu-22.04-arm
212
+ os : ubuntu
213
+ arch : armv8
141
214
python_version :
215
+ - " 3.11"
142
216
- " 3.12"
217
+ - " 3.13"
143
218
needs : [build_pyi]
144
219
runs-on : ${{ matrix.platform.runs_on }}
145
220
timeout-minutes : 15
146
221
steps :
147
222
- uses : actions/checkout@v4
148
223
- uses : actions/download-artifact@v4
149
224
with :
150
- name : sora_sdk
225
+ name : sora_sdk_${{ matrix.python_version }}
151
226
path : sora_sdk/
152
227
- run : |
153
228
cp sora_sdk/py.typed src/sora_sdk/py.typed
@@ -160,12 +235,12 @@ jobs:
160
235
sudo apt-get -y install multistrap binutils-aarch64-linux-gnu
161
236
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる
162
237
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap
163
- # clang-18
164
- - name : Install clang-18
238
+ # clang-19
239
+ - name : Install clang-19
165
240
run : |
166
241
wget https://apt.llvm.org/llvm.sh
167
242
chmod a+x llvm.sh
168
- sudo ./llvm.sh 18
243
+ sudo ./llvm.sh 19
169
244
- uses : astral-sh/setup-uv@v6
170
245
with :
171
246
enable-cache : false
@@ -205,7 +280,7 @@ jobs:
205
280
- uses : actions/checkout@v4
206
281
- uses : actions/download-artifact@v4
207
282
with :
208
- name : sora_sdk
283
+ name : sora_sdk_${{ matrix.python_version }}
209
284
path : sora_sdk/
210
285
- run : |
211
286
cp sora_sdk/py.typed src/sora_sdk/py.typed
@@ -243,7 +318,7 @@ jobs:
243
318
- uses : actions/checkout@v4
244
319
- uses : actions/download-artifact@v4
245
320
with :
246
- name : sora_sdk
321
+ name : sora_sdk_${{ matrix.python_version }}
247
322
path : sora_sdk/
248
323
249
324
- run : |
@@ -302,19 +377,15 @@ jobs:
302
377
fail-fast : false
303
378
matrix :
304
379
platform :
305
- # - name: ubuntu-24.04_x86_64
306
380
- name : ubuntu-22.04_x86_64
381
+ - name : ubuntu-22.04_armv8
307
382
- name : macos-15_arm64
308
383
- name : macos-14_arm64
309
384
- name : windows-2025
310
385
python_version :
311
386
- " 3.11"
312
387
- " 3.12"
313
388
- " 3.13"
314
- include :
315
- - platform :
316
- name : ubuntu-24.04_armv8
317
- python_version : " 3.12"
318
389
runs-on : ubuntu-24.04
319
390
timeout-minutes : 60
320
391
steps :
@@ -352,6 +423,7 @@ jobs:
352
423
SLACK_COLOR : danger
353
424
SLACK_TITLE : Build failed
354
425
SLACK_WEBHOOK : ${{ secrets.SLACK_WEBHOOK }}
426
+
355
427
create-release :
356
428
if : contains(github.ref, 'tags/202')
357
429
needs :
@@ -368,8 +440,24 @@ jobs:
368
440
with : { "platform": "ubuntu-22.04_x86_64", "python_version": "3.12" }
369
441
- uses : ./.github/actions/download
370
442
with : { "platform": "ubuntu-22.04_x86_64", "python_version": "3.13" }
443
+ - uses : ./.github/actions/download
444
+ with : { "platform": "ubuntu-24.04_x86_64", "python_version": "3.11" }
445
+ - uses : ./.github/actions/download
446
+ with : { "platform": "ubuntu-24.04_x86_64", "python_version": "3.12" }
447
+ - uses : ./.github/actions/download
448
+ with : { "platform": "ubuntu-24.04_x86_64", "python_version": "3.13" }
449
+ - uses : ./.github/actions/download
450
+ with : { "platform": "ubuntu-22.04_armv8", "python_version": "3.11" }
451
+ - uses : ./.github/actions/download
452
+ with : { "platform": "ubuntu-22.04_armv8", "python_version": "3.12" }
453
+ - uses : ./.github/actions/download
454
+ with : { "platform": "ubuntu-22.04_armv8", "python_version": "3.13" }
455
+ - uses : ./.github/actions/download
456
+ with : { "platform": "ubuntu-24.04_armv8", "python_version": "3.11" }
371
457
- uses : ./.github/actions/download
372
458
with : { "platform": "ubuntu-24.04_armv8", "python_version": "3.12" }
459
+ - uses : ./.github/actions/download
460
+ with : { "platform": "ubuntu-24.04_armv8", "python_version": "3.13" }
373
461
- uses : ./.github/actions/download
374
462
with : { "platform": "macos-15_arm64", "python_version": "3.11" }
375
463
- uses : ./.github/actions/download
@@ -394,11 +482,28 @@ jobs:
394
482
cat package_paths.env >> $GITHUB_OUTPUT
395
483
echo "EOF" >> $GITHUB_OUTPUT
396
484
id : env
485
+ - name : Release (Prerelease)
486
+ if : contains(github.ref, 'dev')
487
+ run : |
488
+ gh release create ${{ github.ref_name }} \
489
+ --title "${{ github.ref_name }}" \
490
+ --prerelease \
491
+ $(cat package_paths.env)
492
+ env :
493
+ GH_TOKEN : ${{ github.token }}
397
494
- name : Release
398
- uses : softprops/action-gh-release@v2
399
- with :
400
- files : ${{ steps.env.outputs.package_paths }}
401
- prerelease : ${{ contains(github.ref, 'dev') }}
495
+ if : ${{ !contains(github.ref, 'dev') }}
496
+ run : |
497
+ gh release create ${{ github.ref_name }} \
498
+ --title "${{ github.ref_name }}" \
499
+ $(cat package_paths.env)
500
+ env :
501
+ GH_TOKEN : ${{ github.token }}
502
+ - name : Verify Release Creation
503
+ run : |
504
+ gh release view ${{ github.ref_name }} --json url
505
+ env :
506
+ GH_TOKEN : ${{ github.token }}
402
507
- name : Slack Notification
403
508
if : failure()
404
509
uses : rtCamp/action-slack-notify@v2
0 commit comments