Skip to content

Commit e33f990

Browse files
committed
examples の全サンプルのビルドコマンドを統一形式にする
sumomo 形式に統一し、各サンプルのトップレベルに run.py を配置。 全サンプルを python3 examples/<app>/run.py build <platform> の形式で呼び出せるようにした。 - examples/sdl_sample/run.py を追加 - examples/messaging_recvonly_sample/run.py を追加 - .github/workflows/build.yml の全 examples ビルドコマンドを統一形式に変更
1 parent dc7debf commit e33f990

File tree

4 files changed

+739
-8
lines changed

4 files changed

+739
-8
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ jobs:
9090
cd examples
9191
mkdir examples_${{ matrix.name }}
9292
foreach ($app in @('sdl_sample', 'sumomo', 'messaging_recvonly_sample')) {
93-
python3 "$app\${{ matrix.name }}\run.py" --local-sora-cpp-sdk-dir ..
93+
python3 "$app\run.py" build ${{ matrix.name }} --local-sora-cpp-sdk-dir ..
9494
cp "_build\${{ matrix.name }}\release\$app\Release\$app.exe" "examples_${{ matrix.name }}"
9595
}
9696
- name: Upload Examples Artifact
@@ -146,7 +146,7 @@ jobs:
146146
cd examples
147147
mkdir examples_${{ matrix.name }}
148148
for app in sdl_sample sumomo messaging_recvonly_sample; do
149-
python3 $app/${{ matrix.name }}/run.py --local-sora-cpp-sdk-dir ..
149+
python3 $app/run.py build ${{ matrix.name }} --local-sora-cpp-sdk-dir ..
150150
cp _build/${{ matrix.name }}/release/$app/$app examples_${{ matrix.name }}
151151
done
152152
if: matrix.name == 'macos_arm64'
@@ -298,7 +298,7 @@ jobs:
298298
cd examples
299299
mkdir examples_${{ matrix.platform.name }}
300300
for app in sdl_sample sumomo messaging_recvonly_sample; do
301-
python3 $app/${{ matrix.platform.name }}/run.py --local-sora-cpp-sdk-dir ..
301+
python3 $app/run.py build ${{ matrix.platform.name }} --local-sora-cpp-sdk-dir ..
302302
cp _build/${{ matrix.platform.name }}/release/$app/$app examples_${{ matrix.platform.name }}
303303
done
304304
- name: Build Examples (Raspberry Pi OS)
@@ -307,7 +307,7 @@ jobs:
307307
cd examples
308308
mkdir examples_${{ matrix.platform.name }}
309309
for app in sumomo; do
310-
python3 $app/${{ matrix.platform.name }}/run.py --local-sora-cpp-sdk-dir ..
310+
python3 $app/run.py build ${{ matrix.platform.name }} --local-sora-cpp-sdk-dir ..
311311
cp _build/${{ matrix.platform.name }}/release/$app/$app examples_${{ matrix.platform.name }}
312312
# raspberry-pi-os は libcamerac.so も必要
313313
cp _build/${{ matrix.platform.name }}/release/$app/libcamerac.so examples_${{ matrix.platform.name }}
@@ -394,7 +394,7 @@ jobs:
394394
- uses: actions/checkout@v5
395395
- name: Build Example
396396
run: |
397-
python3 ${{ matrix.example }}/windows_x86_64/run.py
397+
python3 ${{ matrix.example }}/run.py build windows_x86_64
398398
- name: Package Binary
399399
run: |
400400
# アップロード用のディレクトリを作成する
@@ -424,7 +424,7 @@ jobs:
424424
- uses: actions/checkout@v5
425425
- name: Build Example
426426
run: |
427-
python3 ${{ matrix.example }}/macos_arm64/run.py
427+
python3 ${{ matrix.example }}/run.py build macos_arm64
428428
- name: Package Binary
429429
run: |
430430
# アップロード用のディレクトリを作成する
@@ -480,7 +480,7 @@ jobs:
480480
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap
481481
- name: Build Example
482482
run: |
483-
python3 ${{ matrix.example }}/${{ matrix.platform.name }}/run.py
483+
python3 ${{ matrix.example }}/run.py build ${{ matrix.platform.name }}
484484
- name: Package Binary
485485
run: |
486486
# アップロード用のディレクトリを作成する

.github/workflows/formatter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ jobs:
6464
run: |
6565
cd examples
6666
for app in sdl_sample sumomo messaging_recvonly_sample; do
67-
python3 $app/${{ matrix.platform.name }}/run.py \
67+
python3 $app/run.py build ${{ matrix.platform.name }} \
6868
--local-sora-cpp-sdk-dir .. \
6969
--local-sora-cpp-sdk-args=--disable-cuda \
7070
--install-dir `pwd`/../_install/${{ matrix.platform.name }}/release

0 commit comments

Comments
 (0)