-
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
Conversation
.github/workflows/build.yml
Outdated
rm -rf "archive/$d/$d" | ||
(cd archive && tar czf "../sumomo_macos_arm64.tar.gz" "$d") | ||
echo "sumomo_macos_arm64.tar.gz" >> package_paths.env | ||
elif [[ "$d" == *"windows"* ]]; then |
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.
プラットフォーム名に対してこういう曖昧な判定をすると、
- この部分を見た時に実際に何のプラットフォームに引っかかるのか分からない
- 後でプラットフォームを増やす時に既存のやつを確認しようと検索してもマッチしないからこの部分を確認できずスルーして意図しないバグを埋め込むことになる
という問題があるので、ワイルドカードを使わずに "$d" == "windows_x86_64"
のような書き方をして下さい。
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.
プラットフォームをまとめず一つずつ書くようにしました。
.github/workflows/build.yml
Outdated
elif [[ "$d" == *"windows"* ]]; then | ||
(cd archive && zip -r "../sumomo_windows_x86_64.zip" "$d") | ||
echo "sumomo_windows_x86_64.zip" >> package_paths.env | ||
else |
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.
ここも同じ問題があるので、意図したプラットフォームを全部列挙して、意図しないプラットフォーム名が来たらエラーになるようにして下さい
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.
バイナリを作りたいプラットフォームを書くようにし、意図しないものは無視するようにしました。
.github/workflows/build.yml
Outdated
merge-multiple: false | ||
- name: Archive Examples | ||
run: | | ||
for d in examples_*; do |
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.
d
という名前が分かりにくいのでちゃんとした名前を指定して下さい。
また、ワイルドカードで列挙すると一覧性が悪くなるので、以下のようにして下さい。
for d in examples_*; do | |
for platform in \ | |
windows_x86_64 \ | |
macos_arm64 \ | |
ubuntu-20.04_x86_64 \ | |
ubuntu-22.04_x86_64 \ | |
ubuntu-24.04_x86_64 \ | |
ubuntu-24.04_armv8; do |
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.
d
を使用することをやめました。
.github/workflows/build.yml
Outdated
(cd archive && tar czf "../sumomo_macos_arm64.tar.gz" "$d") | ||
echo "sumomo_macos_arm64.tar.gz" >> package_paths.env | ||
elif [[ "$d" == *"windows"* ]]; then | ||
(cd archive && zip -r "../sumomo_windows_x86_64.zip" "$d") |
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 バイナリが含まれてそう
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.
バイナリ格納方法を見直しました。
.github/workflows/build.yml
Outdated
run: | | ||
for d in examples_*; do | ||
mkdir -p "archive/$d" | ||
mv "$d" "archive/$d/" |
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.
入力となるディレクトリと、そこから sumomo を取り出して配置するディレクトリが同じ場所にあると分かりにくいので、わざわざ mv しなくて良いです。
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.
mv を削除しました
.github/workflows/build.yml
Outdated
(cd archive && zip -r "../sumomo_windows_x86_64.zip" "$d") | ||
echo "sumomo_windows_x86_64.zip" >> package_paths.env | ||
else | ||
(cd archive && tar czf "../sumomo_${d#examples_}.tar.gz" "$d") |
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 バイナリが含まれてそう
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.
バイナリ格納方法を見直しました。
レビューありがとうございます。 |
レビューしていただいているところですが、もう少し見直しをしたいため WIP にします。 |
@@ -82,20 +82,6 @@ jobs: | |||
with: | |||
name: ${{ matrix.name }}.env | |||
path: _package/${{ matrix.name }}/release/sora.env | |||
# Examples のビルド |
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 のビルドはこれまで通り実施するように戻します。
WIP を解除しました。レビューよろしくお願いします。 |
変更履歴と build.yml を修正しました。 |
@@ -82,20 +82,6 @@ jobs: | |||
with: | |||
name: ${{ matrix.name }}.env | |||
path: _package/${{ matrix.name }}/release/sora.env | |||
# Examples のビルド |
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 しかビルドしてないから、ほかのサンプルのビルドが通ることを担保できなくなります。
.github/workflows/build.yml
Outdated
- 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 comment
The 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
こちらは導入時に原因となったロジックが削除されていました。削除してビルドが通ることも確認しており、不要と判断して削除します。
差分
.github/workflows/build.yml
Outdated
- name: Upload Examples Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
# .tar.gz まで含めないとアップロード時には設定されない |
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.
このコメントを書く意味がちょっと分かりませんでした。
name で指定した名前は download-artifact で引っ張ってくる時に利用する名前というだけなので、アーティファクト間で一意であれば何でも良いはずで、アップロードしたアーティファクト名に拡張子が含まれてるかどうかは別に重要ではないです。
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_ に拡張子が入っていなかったのでわかるようにしたほうが良いと考えていれたコメントでした。
ビルドパッケージを作成する場所でファイルの例も載せているのでここにこのコメントは不要でした。
.github/workflows/build.yml
Outdated
- 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 comment
The 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 comment
The reason will be displayed to describe this comment to others. Learn more.
ご指摘のとおりです。
ここはたんにリリースしているだけになりますのでコメントが間違っていました。
先の # ビルドした Examples のアーティファクトをダウンロード
も含めてここは違うコメントか無くすようにします。
ご指摘いただいた内容について対応完了しました。CI も通っているのを確認しました。 |
動作確認もできました。こちらマージします。 |
リリース時に sumomo バイナリを含めるように build.yml を修正
This pull request includes changes to the build workflow and documentation. The most important changes involve adding a new step to download and archive example files in the build process and updating the changelog to reflect this addition.
Changes to build workflow:
.github/workflows/build.yml
: Added a new step to download and archive example files, including specific handling for macOS and Windows examples.Documentation updates:
CHANGES.md
: Updated the changelog to include the addition of sumomo binaries in the release.