-
Notifications
You must be signed in to change notification settings - Fork 1
325 lines (292 loc) · 11.5 KB
/
test.yml
File metadata and controls
325 lines (292 loc) · 11.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
name: test
on:
workflow_call:
workflow_dispatch:
inputs:
run_id:
description: "wheel workflow run ID to test"
required: true
type: string
jobs:
test_self_hosted_runner:
# 自動実行: wheel.yml が成功した場合のみ実行
# 手動実行: 常に実行(ユーザーが run_id を指定)
# if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
platform:
# NVIDIA Video Codec (self-hosted runner)
- name: nvidia-video-codec
runs_on:
group: Self
labels: [self-hosted, linux, x64, NVIDIA-Video-Codec-SDK]
env_vars: |
NVIDIA_VIDEO_CODEC=true
test_target: tests/test_nvidia_video_codec.py tests/test_hwa.py
# NVIDIA Video Codec 用の wheel は ubuntu-24.04_x86_64 のものを使用
wheel_platform: ubuntu-24.04_x86_64
# Intel VPL (self-hosted runner)
- name: intel-vpl
runs_on:
group: Self
labels: [self-hosted, linux, x64, Intel-VPL]
env_vars: |
INTEL_VPL=true
LIBVA_MESSAGING_LEVEL=0
test_target: tests/test_intel_vpl.py tests/test_hwa.py
# Intel VPL 用の wheel は ubuntu-24.04_x86_64 のものを使用
wheel_platform: ubuntu-24.04_x86_64
# Apple Video Toolbox (self-hosted runner)
- name: apple-video-toolbox_arm64
runs_on:
group: Self
labels: [self-hosted, macOS, ARM64]
env_vars: |
APPLE_VIDEO_TOOLBOX=true
test_target: "tests/test_apple_video_toolbox.py tests/test_apple_audio_toolbox.py tests/test_hwa.py"
# Apple Video Toolbox 用の wheel は macos_arm64 のものを使用
wheel_platform: macos-15_arm64
python_version:
- "3.14"
- "3.14t"
- "3.13"
- "3.12"
runs-on: ${{ matrix.platform.runs_on }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: false
# self-hosted runner では uv python pin で Python バージョンを固定する
- name: Pin Python version
run: uv python pin ${{ matrix.python_version }}
- name: Debug event info
run: |
echo "Event name: ${{ github.event_name }}"
echo "Workflow: ${{ github.workflow }}"
echo "Run ID: ${{ github.run_id }}"
- name: Download wheel artifact (workflow_call)
if: ${{ !github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.wheel_platform }}_python-${{ matrix.python_version }}
path: wheelhouse/
- name: Download wheel artifact (workflow_dispatch)
if: ${{ github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
path: wheelhouse/
run-id: ${{ github.event.inputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: List downloaded wheels
run: |
echo "Downloaded wheel files:"
ls -la wheelhouse/
# プラットフォーム固有の環境変数を設定
- name: Set platform-specific environment variables
if: matrix.platform.env_vars
run: |
echo "${{ matrix.platform.env_vars }}" | while read line; do
if [ -n "$line" ]; then
echo "$line" >> $GITHUB_ENV
fi
done
shell: bash
- name: Install wheel
run: |
uv sync --only-group test
uv pip install wheelhouse/*.whl
- name: Run tests
run: |
uv run pytest ${{ matrix.platform.test_target }} --tb=short -v
env:
# UV_NO_SYNC=1 を指定する理由:
# uv run はデフォルトで実行前に pyproject.toml/uv.lock と環境を同期する
# この同期により、uv pip install でインストールした wheel が削除され、
# 元のソースコードがインストールされてしまう
# UV_NO_SYNC=1 で同期をスキップし、インストール済みの wheel を使用する
UV_NO_SYNC: 1
test_macos:
# 自動実行: wheel.yml が成功した場合のみ実行
# 手動実行: 常に実行(ユーザーが run_id を指定)
# if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
strategy:
matrix:
platform:
- name: macos-26_arm64
runs_on: macos-26
- name: macos-15_arm64
runs_on: macos-15
python_version:
- "3.14"
- "3.14t"
- "3.13"
- "3.12"
runs-on: ${{ matrix.platform.runs_on }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: false
python-version: ${{ matrix.python_version }}
- name: Debug event info
run: |
echo "Event name: ${{ github.event_name }}"
echo "Workflow: ${{ github.workflow }}"
echo "Run ID: ${{ github.run_id }}"
- name: Download wheel artifact (workflow_call)
if: ${{ !github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
path: wheelhouse/
- name: Download wheel artifact (workflow_dispatch)
if: ${{ github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
path: wheelhouse/
run-id: ${{ github.event.inputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: List downloaded wheels
run: |
echo "Downloaded wheel files:"
ls -la wheelhouse/
- name: Install wheel
run: |
uv sync --only-group test
uv pip install wheelhouse/*.whl
- name: Run tests
run: |
uv run pytest tests/ --tb=short -v
env:
# UV_NO_SYNC=1 を指定する理由:
# uv run はデフォルトで実行前に pyproject.toml/uv.lock と環境を同期する
# この同期により、uv pip install でインストールした wheel が削除され、
# 元のソースコードがインストールされてしまう
# UV_NO_SYNC=1 で同期をスキップし、インストール済みの wheel を使用する
UV_NO_SYNC: 1
test_ubuntu:
# 自動実行: wheel.yml が成功した場合のみ実行
# 手動実行: 常に実行(ユーザーが run_id を指定)
# if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
strategy:
fail-fast: false
matrix:
platform:
- name: ubuntu-24.04_x86_64
runs_on: ubuntu-24.04
- name: ubuntu-24.04_arm64
runs_on: ubuntu-24.04-arm
- name: ubuntu-22.04_x86_64
runs_on: ubuntu-22.04
- name: ubuntu-22.04_arm64
runs_on: ubuntu-22.04-arm
python_version:
- "3.14"
- "3.14t"
- "3.13"
- "3.12"
runs-on: ${{ matrix.platform.runs_on }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: false
python-version: ${{ matrix.python_version }}
- name: Download wheel artifact (workflow_call)
if: ${{ !github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
path: wheelhouse/
- name: Download wheel artifact (workflow_dispatch)
if: ${{ github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
path: wheelhouse/
run-id: ${{ github.event.inputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: List downloaded wheels
run: |
echo "Downloaded wheel files:"
ls -la wheelhouse/
- name: Install wheel
run: |
uv sync --only-group test
uv pip install wheelhouse/*.whl
- name: Run tests
run: |
uv run pytest tests/ --tb=short -v
env:
# UV_NO_SYNC=1 を指定する理由:
# uv run はデフォルトで実行前に pyproject.toml/uv.lock と環境を同期する
# この同期により、uv pip install でインストールした wheel が削除され、
# 元のソースコードがインストールされてしまう
# UV_NO_SYNC=1 で同期をスキップし、インストール済みの wheel を使用する
UV_NO_SYNC: 1
test_windows:
# 自動実行: wheel.yml が成功した場合のみ実行
# 手動実行: 常に実行(ユーザーが run_id を指定)
# if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
strategy:
fail-fast: false
matrix:
platform:
- name: windows-2025_x86_64
runs_on: windows-2025
python_version:
- "3.14"
# Windows の Python 3.14t (free-threaded) は nanobind のビルドで
# Py_GIL_DISABLED マクロが正しく検出されないため、現時点では非対応
# - "3.14t"
- "3.13"
- "3.12"
runs-on: ${{ matrix.platform.runs_on }}
timeout-minutes: 30
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v7
with:
enable-cache: false
python-version: ${{ matrix.python_version }}
- name: Download wheel artifact (workflow_call)
if: ${{ !github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
path: wheelhouse/
- name: Download wheel artifact (workflow_dispatch)
if: ${{ github.event.inputs.run_id }}
uses: actions/download-artifact@v7
with:
name: ${{ matrix.platform.name }}_python-${{ matrix.python_version }}
path: wheelhouse/
run-id: ${{ github.event.inputs.run_id }}
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: List downloaded wheels
shell: bash
run: |
echo "Downloaded wheel files:"
ls -la wheelhouse/
- name: Install wheel
shell: bash
run: |
uv sync --only-group test
uv pip install wheelhouse/*.whl
- name: Run tests
shell: bash
run: |
uv run pytest tests/ --tb=short -v
env:
# UV_NO_SYNC=1 を指定する理由:
# uv run はデフォルトで実行前に pyproject.toml/uv.lock と環境を同期する
# この同期により、uv pip install でインストールした wheel が削除され、
# 元のソースコードがインストールされてしまう
# UV_NO_SYNC=1 で同期をスキップし、インストール済みの wheel を使用する
UV_NO_SYNC: 1