51
51
name : sora_sdk
52
52
path : sora_sdk/
53
53
54
- build_linux_macos :
54
+ build_ubuntu :
55
55
strategy :
56
56
fail-fast : false
57
57
matrix :
65
65
runs_on : ubuntu-22.04
66
66
os : ubuntu
67
67
arch : x86_64
68
- - name : macos-15_arm64
69
- target : macos_arm64
70
- runs_on : macos-15
71
- os : macos
72
- python_host_platform : " macosx-15.0-arm64"
73
- archflags : " -arch arm64"
74
- - name : macos-14_arm64
75
- target : macos_arm64
76
- runs_on : macos-14
77
- os : macos
78
- python_host_platform : " macosx-14.0-arm64"
79
- archflags : " -arch arm64"
80
68
python_version :
81
69
- " 3.11"
82
70
- " 3.12"
@@ -102,64 +90,34 @@ jobs:
102
90
cp sora_sdk/py.typed src/sora_sdk/py.typed
103
91
cp sora_sdk/sora_sdk_ext.pyi src/sora_sdk/sora_sdk_ext.pyi
104
92
# libx11-dev は Ubuntu 24.04 の時に必要になる
105
- - if : ${{ matrix.platform.os == 'ubuntu'}}
106
- run : |
93
+ - run : |
107
94
sudo apt-get update
108
95
sudo apt-get -y install libx11-dev
109
- - if : ${{ matrix.platform.os == 'ubuntu' && matrix.platform. arch == 'armv8' }}
96
+ - if : ${{ matrix.platform.arch == 'armv8' }}
110
97
run : |
111
98
sudo apt-get -y install multistrap binutils-aarch64-linux-gnu
112
99
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる
113
100
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap
114
101
- uses : astral-sh/setup-uv@v5
115
102
with :
116
103
enable-cache : false
117
- - run : uv python pin ${{ matrix.python_version }}
118
- - run : uv sync
104
+ - run : |
105
+ uv python pin ${{ matrix.python_version }}
106
+ uv sync
119
107
120
- # Ubuntu x86_64 向け
121
- - if : ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'x86_64' }}
122
- name : Tailscale
123
- uses : tailscale/github-action@v3
124
- with :
125
- oauth-client-id : ${{ secrets.TS_OAUTH_CLIENT_ID }}
126
- oauth-secret : ${{ secrets.TS_OAUTH_SECRET }}
127
- tags : tag:ci
128
-
129
- - if : ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'x86_64' }}
108
+ - if : ${{ matrix.platform.arch == 'x86_64' }}
130
109
run : |
131
110
uv run python run.py ${{ matrix.platform.target }}
132
111
uv run python -m build
133
112
134
113
# Ubuntu armv8 向け
135
- - if : ${{ matrix.platform.os == 'ubuntu' && matrix.platform. arch == 'armv8' }}
114
+ - if : ${{ matrix.platform.arch == 'armv8' }}
136
115
run : |
137
116
uv run python run.py ${{ matrix.platform.target }}
138
117
uv run python -m build
139
118
env :
140
119
SORA_SDK_TARGET : ${{ matrix.platform.target }}
141
120
142
- # Ubuntu 向けに Python 3.11 では E2E テストを実行する
143
- - if : ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'x86_64' && matrix.python_version == '3.11' }}
144
- name : Download openh264
145
- run : |
146
- curl -LO http://ciscobinary.openh264.org/libopenh264-${{ env.OPENH264_VERSION }}-linux64.8.so.bz2
147
- bzip2 -d libopenh264-${{ env.OPENH264_VERSION }}-linux64.8.so.bz2
148
- mv libopenh264-${{ env.OPENH264_VERSION }}-linux64.8.so libopenh264.so
149
- echo "OPENH264_PATH=$(pwd)/libopenh264.so" >> $GITHUB_ENV
150
- - if : ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'x86_64' && matrix.python_version == '3.11' }}
151
- run : uv run pytest tests -s
152
-
153
-
154
- # macOS 向け
155
- - if : ${{ matrix.platform.os == 'macos' }}
156
- run : |
157
- uv run python run.py ${{ matrix.platform.target }}
158
- uv run python -m build
159
- env :
160
- _PYTHON_HOST_PLATFORM : ${{ matrix.platform.python_host_platform }}
161
- ARCHFLAGS : ${{ matrix.platform.archflags }}
162
-
163
121
- name : Upload Artifact
164
122
uses : actions/upload-artifact@v4
165
123
with :
@@ -208,14 +166,65 @@ jobs:
208
166
- uses : astral-sh/setup-uv@v5
209
167
with :
210
168
enable-cache : false
211
- - run : uv python pin ${{ matrix.python_version }}
212
- - run : uv sync
213
169
- run : |
170
+ uv python pin ${{ matrix.python_version }}
171
+ uv sync
214
172
uv run python run.py ${{ matrix.platform.target }}
215
173
uv run python -m build
216
174
env:
217
175
SORA_SDK_TARGET: ${{ matrix.platform.target }}
218
176
177
+ build_macos :
178
+ strategy :
179
+ fail-fast : false
180
+ matrix :
181
+ platform :
182
+ - name : macos-15_arm64
183
+ target : macos_arm64
184
+ runs_on : macos-15
185
+ os : macos
186
+ python_host_platform : " macosx-15.0-arm64"
187
+ archflags : " -arch arm64"
188
+ - name : macos-14_arm64
189
+ target : macos_arm64
190
+ runs_on : macos-14
191
+ os : macos
192
+ python_host_platform : " macosx-14.0-arm64"
193
+ archflags : " -arch arm64"
194
+ python_version :
195
+ - " 3.11"
196
+ - " 3.12"
197
+ - " 3.13"
198
+ needs : [build_pyi]
199
+ runs-on : ${{ matrix.platform.runs_on }}
200
+ timeout-minutes : 15
201
+ steps :
202
+ - uses : actions/checkout@v4
203
+ - uses : actions/download-artifact@v4
204
+ with :
205
+ name : sora_sdk
206
+ path : sora_sdk/
207
+ - run : |
208
+ cp sora_sdk/py.typed src/sora_sdk/py.typed
209
+ cp sora_sdk/sora_sdk_ext.pyi src/sora_sdk/sora_sdk_ext.pyi
210
+ - uses : astral-sh/setup-uv@v5
211
+ with :
212
+ enable-cache : false
213
+ - run : |
214
+ uv python pin ${{ matrix.python_version }}
215
+ uv sync
216
+ uv run python run.py ${{ matrix.platform.target }}
217
+ uv run python -m build
218
+ env:
219
+ _PYTHON_HOST_PLATFORM: ${{ matrix.platform.python_host_platform }}
220
+ ARCHFLAGS: ${{ matrix.platform.archflags }}
221
+
222
+ - name : Upload Artifact
223
+ uses : actions/upload-artifact@v4
224
+ with :
225
+ name : ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
226
+ path : " dist/"
227
+
219
228
build_windows :
220
229
needs : [build_pyi]
221
230
runs-on : windows-2022
@@ -240,10 +249,11 @@ jobs:
240
249
- uses : astral-sh/setup-uv@v5
241
250
with :
242
251
enable-cache : false
243
- - run : uv python pin ${{ matrix.python_version }}
244
- - run : uv sync
245
- - run : uv run python run.py windows_x86_64
246
- - run : uv run python -m build
252
+ - run : |
253
+ uv python pin ${{ matrix.python_version }}
254
+ uv sync
255
+ uv run python run.py windows_x86_64
256
+ uv run python -m build
247
257
248
258
- name : Upload Artifact
249
259
uses : actions/upload-artifact@v4
@@ -252,7 +262,7 @@ jobs:
252
262
path : dist/
253
263
254
264
# slack_notify_succeeded:
255
- # needs: [build_linux_macos , build_ubuntu_arm, build_windows]
265
+ # needs: [build_ubuntu , build_ubuntu_arm, build_macos , build_windows]
256
266
# runs-on: ubuntu-24.04
257
267
# if: success()
258
268
# steps:
@@ -266,7 +276,7 @@ jobs:
266
276
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
267
277
268
278
slack_notify_failed :
269
- needs : [build_linux_macos , build_ubuntu_arm, build_windows]
279
+ needs : [build_ubuntu , build_ubuntu_arm, build_macos, build_windows]
270
280
runs-on : ubuntu-24.04
271
281
if : failure()
272
282
steps :
@@ -282,7 +292,8 @@ jobs:
282
292
publish_wheel :
283
293
if : contains(github.ref, 'tags/202')
284
294
needs :
285
- - build_linux_macos
295
+ - build_ubuntu
296
+ - build_macos
286
297
- build_windows
287
298
strategy :
288
299
fail-fast : false
@@ -341,7 +352,8 @@ jobs:
341
352
create-release :
342
353
if : contains(github.ref, 'tags/202')
343
354
needs :
344
- - build_linux_macos
355
+ - build_ubuntu
356
+ - build_macos
345
357
- build_windows
346
358
runs-on : ubuntu-24.04
347
359
timeout-minutes : 60
0 commit comments