-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
リリースに sumomo バイナリを含めるようにする #158
Changes from 8 commits
a8cea51
ba26d43
ca6651e
825b725
6ea4e03
79d0085
9edd9c5
89d6227
22db937
0d6bb67
3bee9ea
89d511a
df076ba
b33addf
97a4d38
f87a35d
b66298f
74f312c
7b5afd5
d724f90
6c5f641
46e80f9
5c19bd6
38fc98c
34de507
921a800
875d1cb
b2687ce
83a4559
378ad70
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,20 +82,6 @@ jobs: | |
with: | ||
name: ${{ matrix.name }}.env | ||
path: _package/${{ matrix.name }}/release/sora.env | ||
# Examples のビルド | ||
- name: Build Examples | ||
run: | | ||
cd examples | ||
mkdir examples_${{ matrix.name }} | ||
foreach ($app in @('sdl_sample', 'sumomo', 'messaging_recvonly_sample')) { | ||
python3 "$app\${{ matrix.name }}\run.py" --local-sora-cpp-sdk-dir .. | ||
cp "_build\${{ matrix.name }}\release\$app\Release\$app.exe" "examples_${{ matrix.name }}" | ||
} | ||
- name: Upload Examples Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: examples_${{ matrix.name }} | ||
path: examples/examples_${{ matrix.name }} | ||
build-macos: | ||
strategy: | ||
fail-fast: false | ||
|
@@ -140,22 +126,6 @@ jobs: | |
with: | ||
name: ${{ matrix.name }}.env | ||
path: _package/${{ matrix.name }}/release/sora.env | ||
# Examples のビルド | ||
- name: Build Examples | ||
run: | | ||
cd examples | ||
mkdir examples_${{ matrix.name }} | ||
for app in sdl_sample sumomo messaging_recvonly_sample; do | ||
python3 $app/${{ matrix.name }}/run.py --local-sora-cpp-sdk-dir .. | ||
cp _build/${{ matrix.name }}/release/$app/$app examples_${{ matrix.name }} | ||
done | ||
if: matrix.name == 'macos_arm64' | ||
- name: Upload Examples Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: examples_${{ matrix.name }} | ||
path: examples/examples_${{ matrix.name }} | ||
if: matrix.name == 'macos_arm64' | ||
build-ubuntu: | ||
strategy: | ||
fail-fast: false | ||
|
@@ -297,22 +267,6 @@ jobs: | |
with: | ||
name: ${{ matrix.platform.name }}.env | ||
path: _package/${{ matrix.platform.name }}/release/sora.env | ||
# Examples のビルド | ||
- name: Build Examples | ||
run: | | ||
cd examples | ||
mkdir examples_${{ matrix.platform.name }} | ||
for app in sdl_sample sumomo messaging_recvonly_sample; do | ||
python3 $app/${{ matrix.platform.name }}/run.py --local-sora-cpp-sdk-dir .. | ||
cp _build/${{ matrix.platform.name }}/release/$app/$app examples_${{ matrix.platform.name }} | ||
done | ||
if: matrix.platform.os == 'ubuntu' | ||
- name: Upload Examples Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: examples_${{ matrix.platform.name }} | ||
path: examples/examples_${{ matrix.platform.name }} | ||
if: matrix.platform.os == 'ubuntu' | ||
|
||
create-release: | ||
name: Create Release | ||
|
@@ -360,6 +314,159 @@ jobs: | |
files: ${{ steps.env.outputs.package_paths }} | ||
prerelease: ${{ contains(github.ref, 'canary') }} | ||
|
||
# Windows の Examples ビルド | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
build-windows-examples: | ||
needs: create-release | ||
runs-on: windows-2022 | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }}/examples | ||
strategy: | ||
matrix: | ||
example: | ||
- name: sumomo | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Build Example | ||
run: | | ||
python3 ${{ matrix.example.name }}/windows_x86_64/run.py | ||
- name: Package Binary | ||
run: | | ||
# アップロード用のディレクトリ作成してバイナリをコピー | ||
mkdir -p ${{ matrix.example.name }}_windows_x86_64 | ||
cp _build/windows_x86_64/release/${{ matrix.example.name }}/Release/${{ matrix.example.name }}.exe ${{ matrix.example.name }}_windows_x86_64/${{ matrix.example.name }}.exe | ||
Compress-Archive -Path ${{ matrix.example.name }}_windows_x86_64 -DestinationPath ${{ matrix.example.name }}_windows_x86_64.zip | ||
- name: Upload Examples Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
# .zip まで含めないとアップロード時には設定されない | ||
name: ${{ matrix.example.name }}_windows_x86_64.zip | ||
path: examples/${{ matrix.example.name }}_windows_x86_64.zip | ||
|
||
# macOS の Examples ビルド | ||
build-macos-examples: | ||
needs: create-release | ||
runs-on: macos-14 | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }}/examples | ||
strategy: | ||
matrix: | ||
example: | ||
- name: sumomo | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# Select Xcode 15.4(build-macosと同じバージョンを使う) | ||
- name: Select Xcode 15.4 | ||
run: sudo xcode-select --switch /Applications/Xcode_15.4.app/Contents/Developer | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. これ必要なのかな…。(入れた経緯がよく分かってない。 shiguredo-webrtc-build/webrtc-build@8d3a781 が大元のコミットっぽい) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 必要かどうかを見直して対応します。 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. こちらは導入時に原因となったロジックが削除されていました。削除してビルドが通ることも確認しており、不要と判断して削除します。 |
||
- name: Build Example | ||
run: | | ||
python3 "${{ matrix.example.name }}/macos_arm64/run.py" | ||
- name: Package Binary | ||
run: | | ||
# アップロード用のディレクトリ作成してバイナリをコピー | ||
mkdir -p ${{ matrix.example.name }}_macos_arm64 | ||
cp _build/macos_arm64/release/${{ matrix.example.name }}/${{ matrix.example.name }} ${{ matrix.example.name }}_macos_arm64/${{ matrix.example.name }} | ||
tar -czf ${{ matrix.example.name }}_macos_arm64.tar.gz ${{ matrix.example.name }}_macos_arm64 | ||
- name: Upload Examples Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
# .tar.gz まで含めないとアップロード時には設定されない | ||
name: ${{ matrix.example.name }}_macos_arm64.tar.gz | ||
path: examples/${{ matrix.example.name }}_macos_arm64.tar.gz | ||
|
||
# Ubuntu の Examples ビルド | ||
build-ubuntu-examples: | ||
needs: create-release | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- name: ubuntu-20.04_x86_64 | ||
runs-on: ubuntu-20.04 | ||
- name: ubuntu-22.04_x86_64 | ||
runs-on: ubuntu-22.04 | ||
- name: ubuntu-24.04_x86_64 | ||
runs-on: ubuntu-24.04 | ||
- name: ubuntu-24.04_armv8 | ||
runs-on: ubuntu-24.04 | ||
example: | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: sumomo | ||
name: Build Examples for ${{ matrix.platform.name }} | ||
runs-on: ${{ matrix.platform.runs-on }} | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }}/examples | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Install deps | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libgl-dev | ||
# Ubuntu 24.04 の x86_64 と armv8 でそれぞれ必要なパッケージがあるのでインストール | ||
- name: Install Ubuntu 24.04 x86_64 specific deps | ||
if: matrix.platform.name == 'ubuntu-24.04_x86_64' | ||
torikizi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
run: | | ||
sudo apt-get install -y libx11-dev libxext-dev | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Install deps for Ubuntu 24.04 ARM | ||
if: matrix.platform.name == 'ubuntu-24.04_armv8' | ||
run: | | ||
sudo apt-get install -y multistrap binutils-aarch64-linux-gnu libx11-dev libxext-dev | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# multistrap に insecure なリポジトリからの取得を許可する設定を入れる | ||
sudo sed -e 's/Apt::Get::AllowUnauthenticated=true/Apt::Get::AllowUnauthenticated=true";\n$config_str .= " -o Acquire::AllowInsecureRepositories=true/' -i /usr/sbin/multistrap | ||
- name: Build Example | ||
run: | | ||
pwd | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
python3 "${{ matrix.example.name }}/${{ matrix.platform.name }}/run.py" | ||
- name: Package Binary | ||
run: | | ||
# アップロード用のディレクトリ作成してバイナリをコピー | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
mkdir -p ${{ matrix.example.name }}_${{ matrix.platform.name }} | ||
cp _build/${{ matrix.platform.name }}/release/${{ matrix.example.name }}/${{ matrix.example.name }} ${{ matrix.example.name }}_${{ matrix.platform.name }}/${{ matrix.example.name }} | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
tar -czf ${{ matrix.example.name }}_${{ matrix.platform.name }}.tar.gz ${{ matrix.example.name }}_${{ matrix.platform.name }} | ||
- name: Upload Examples Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: sumomo_${{ matrix.platform.name }}.tar.gz | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
path: examples/sumomo_${{ matrix.platform.name }}.tar.gz | ||
torikizi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
# Examples をリリース | ||
create-release-example: | ||
name: Create Release Examples | ||
needs: | ||
- build-windows-examples | ||
- build-macos-examples | ||
- build-ubuntu-examples | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
platform: | ||
- name: windows_x86_64 | ||
file_ext: zip | ||
- name: macos_arm64 | ||
file_ext: tar.gz | ||
- name: ubuntu-20.04_x86_64 | ||
file_ext: tar.gz | ||
- name: ubuntu-22.04_x86_64 | ||
file_ext: tar.gz | ||
- name: ubuntu-24.04_x86_64 | ||
file_ext: tar.gz | ||
- name: ubuntu-24.04_armv8 | ||
file_ext: tar.gz | ||
example: | ||
- name: sumomo | ||
steps: | ||
- uses: actions/checkout@v4 | ||
# ビルドした Examples のアーティファクトをダウンロード | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: ${{ matrix.example.name }}_${{ matrix.platform.name }}.${{ matrix.platform.file_ext }} | ||
# GitHub Releaseを作成し、Examplesをアップロード | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. リリース自体は既に作られてるので、単にリリースアセットを増やすだけのはず There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ご指摘のとおりです。 |
||
- name: Release Examples | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: ${{ matrix.example.name }}_${{ matrix.platform.name }}.${{ matrix.platform.file_ext }} | ||
voluntas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
notification: | ||
name: Slack Notification | ||
runs-on: ubuntu-24.04 | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples のビルドをわけました。 SDK のビルドの中では行わないようにします。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
example 自体のビルドは、ビルドが通ることを確認するためにも必要です。
リリース時にしかビルドしないとリリース時に初めてビルドエラーに気が付くみたいなことになるし、そもそも今はリリース時に sumomo しかビルドしてないから、ほかのサンプルのビルドが通ることを担保できなくなります。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ご指摘のとおりです。
SDK ビルド時の examples のビルドはこれまで通り実施するように戻します。