Skip to content

Commit c9ee086

Browse files
committed
Merge branch 'develop' into feature/amd-amf
2 parents acbe4a7 + e001a2b commit c9ee086

13 files changed

+550
-465
lines changed

.github/workflows/build.yml

Lines changed: 72 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
name: sora_sdk
5252
path: sora_sdk/
5353

54-
build_linux_macos:
54+
build_ubuntu:
5555
strategy:
5656
fail-fast: false
5757
matrix:
@@ -65,18 +65,6 @@ jobs:
6565
runs_on: ubuntu-22.04
6666
os: ubuntu
6767
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"
8068
python_version:
8169
- "3.11"
8270
- "3.12"
@@ -102,64 +90,34 @@ jobs:
10290
cp sora_sdk/py.typed src/sora_sdk/py.typed
10391
cp sora_sdk/sora_sdk_ext.pyi src/sora_sdk/sora_sdk_ext.pyi
10492
# libx11-dev は Ubuntu 24.04 の時に必要になる
105-
- if: ${{ matrix.platform.os == 'ubuntu'}}
106-
run: |
93+
- run: |
10794
sudo apt-get update
10895
sudo apt-get -y install libx11-dev
109-
- if: ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'armv8' }}
96+
- if: ${{ matrix.platform.arch == 'armv8' }}
11097
run: |
11198
sudo apt-get -y install multistrap binutils-aarch64-linux-gnu
11299
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる
113100
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap
114101
- uses: astral-sh/setup-uv@v5
115102
with:
116103
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
119107
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' }}
130109
run: |
131110
uv run python run.py ${{ matrix.platform.target }}
132111
uv run python -m build
133112
134113
# Ubuntu armv8 向け
135-
- if: ${{ matrix.platform.os == 'ubuntu' && matrix.platform.arch == 'armv8' }}
114+
- if: ${{ matrix.platform.arch == 'armv8' }}
136115
run: |
137116
uv run python run.py ${{ matrix.platform.target }}
138117
uv run python -m build
139118
env:
140119
SORA_SDK_TARGET: ${{ matrix.platform.target }}
141120

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-
163121
- name: Upload Artifact
164122
uses: actions/upload-artifact@v4
165123
with:
@@ -208,14 +166,65 @@ jobs:
208166
- uses: astral-sh/setup-uv@v5
209167
with:
210168
enable-cache: false
211-
- run: uv python pin ${{ matrix.python_version }}
212-
- run: uv sync
213169
- run: |
170+
uv python pin ${{ matrix.python_version }}
171+
uv sync
214172
uv run python run.py ${{ matrix.platform.target }}
215173
uv run python -m build
216174
env:
217175
SORA_SDK_TARGET: ${{ matrix.platform.target }}
218176
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+
219228
build_windows:
220229
needs: [build_pyi]
221230
runs-on: windows-2022
@@ -240,10 +249,11 @@ jobs:
240249
- uses: astral-sh/setup-uv@v5
241250
with:
242251
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
247257
248258
- name: Upload Artifact
249259
uses: actions/upload-artifact@v4
@@ -252,7 +262,7 @@ jobs:
252262
path: dist/
253263

254264
# slack_notify_succeeded:
255-
# needs: [build_linux_macos, build_ubuntu_arm, build_windows]
265+
# needs: [build_ubuntu, build_ubuntu_arm, build_macos, build_windows]
256266
# runs-on: ubuntu-24.04
257267
# if: success()
258268
# steps:
@@ -266,7 +276,7 @@ jobs:
266276
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
267277

268278
slack_notify_failed:
269-
needs: [build_linux_macos, build_ubuntu_arm, build_windows]
279+
needs: [build_ubuntu, build_ubuntu_arm, build_macos,build_windows]
270280
runs-on: ubuntu-24.04
271281
if: failure()
272282
steps:
@@ -282,7 +292,8 @@ jobs:
282292
publish_wheel:
283293
if: contains(github.ref, 'tags/202')
284294
needs:
285-
- build_linux_macos
295+
- build_ubuntu
296+
- build_macos
286297
- build_windows
287298
strategy:
288299
fail-fast: false
@@ -341,7 +352,8 @@ jobs:
341352
create-release:
342353
if: contains(github.ref, 'tags/202')
343354
needs:
344-
- build_linux_macos
355+
- build_ubuntu
356+
- build_macos
345357
- build_windows
346358
runs-on: ubuntu-24.04
347359
timeout-minutes: 60

.github/workflows/e2e-test-apple-video-toolbox.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- "3.13"
3333
runs-on:
3434
group: Self
35-
labels: [self-hosted, self-hosted, macOS, ARM64, M2Pro]
35+
labels: [self-hosted, self-hosted, macOS, ARM64, Apple-M2-Pro]
3636
timeout-minutes: 15
3737
if: >-
3838
${{
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: e2e-test-nvidia-video-codec-sdk
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
paths:
7+
- ".github/workflows/e2e-test-nvidia-video-codec-sdk.yml"
8+
- "tests/test_nvidia_video_codec_sdk.py"
9+
# C++ SDK のアップデートしたときテストするため
10+
- "VERSION"
11+
schedule:
12+
# UTC の 01:00 は JST だと 10:00 。
13+
# 1-5 で 月曜日から金曜日
14+
- cron: "0 1 * * 1-5"
15+
16+
env:
17+
TEST_SIGNALING_URLS: ${{ secrets.TEST_SIGNALING_URLS }}
18+
TEST_CHANNEL_ID_PREFIX: ${{ secrets.TEST_CHANNEL_ID_PREFIX }}
19+
TEST_SECRET_KEY: ${{ secrets.TEST_SECRET_KEY }}
20+
TEST_API_URL: ${{ secrets.TEST_API_URL }}
21+
NVIDIA_VIDEO_CODEC_SDK: true
22+
23+
jobs:
24+
e2e_test_nvidia_video_codec_sdk:
25+
strategy:
26+
fail-fast: true
27+
matrix:
28+
python_version:
29+
# TODO: push 時には 3.13 でテストする、schedule 時には全部でテストする
30+
# - "3.11"
31+
# - "3.12"
32+
- "3.13"
33+
runs-on:
34+
group: Self
35+
labels: [self-hosted, linux, x64, NVIDIA-Video-Codec-SDK]
36+
timeout-minutes: 15
37+
if: >-
38+
${{
39+
contains(github.event.head_commit.message, '[e2e]') ||
40+
contains(github.ref, 'feature/e2e-test') ||
41+
github.event_name == 'workflow_dispatch' ||
42+
github.event_name == 'push' ||
43+
github.event_name == 'schedule'
44+
}}
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: astral-sh/setup-uv@v5
48+
with:
49+
enable-cache: false
50+
- run: uv python pin ${{ matrix.python_version }}
51+
- run: uv sync
52+
- run: uv run python run.py ubuntu-24.04_x86_64
53+
- run: uv run pytest tests/test_nvidia_video_codec_sdk.py -v
54+
55+
# slack_notify_succeeded:
56+
# needs: [e2e_test_intel_vpl]
57+
# runs-on: ubuntu-24.04
58+
# if: success()
59+
# steps:
60+
# - name: Slack Notification
61+
# uses: rtCamp/action-slack-notify@v2
62+
# env:
63+
# SLACK_CHANNEL: sora-python-sdk
64+
# SLACK_COLOR: good
65+
# SLACK_TITLE: SUCCEEDED
66+
# SLACK_ICON_EMOJI: ":star-struck:"
67+
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
68+
69+
slack_notify_failed:
70+
needs: [e2e_test_nvidia_video_codec_sdk]
71+
runs-on: ubuntu-24.04
72+
if: failure()
73+
steps:
74+
- name: Slack Notification
75+
uses: rtCamp/action-slack-notify@v2
76+
env:
77+
SLACK_CHANNEL: sora-python-sdk
78+
SLACK_COLOR: danger
79+
SLACK_TITLE: "FAILED"
80+
SLACK_ICON_EMOJI: ":japanese_ogre:"
81+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

0 commit comments

Comments
 (0)