Skip to content
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

Merged
merged 30 commits into from
Feb 7, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a8cea51
リリースに sumomo バイナリを含めるようにする
torikizi Jan 30, 2025
ba26d43
CHANGES を更新
torikizi Jan 31, 2025
ca6651e
sumomo だけを抜き出してアーカイブにする処理を見直し
torikizi Feb 1, 2025
825b725
サブシェルを使わず一つずつ実行する
torikizi Feb 1, 2025
6ea4e03
examples のビルドとリリースを SDK と分ける
torikizi Feb 5, 2025
79d0085
CHANGES を更新
torikizi Feb 5, 2025
9edd9c5
変更履歴を修正
torikizi Feb 5, 2025
89d6227
build.yml の修正を見直し
torikizi Feb 5, 2025
22db937
Ubuntu24.04 共通パッケージなので runs-on を指定する
torikizi Feb 5, 2025
0d6bb67
matrix の定義を使用できていない箇所が残っていた
torikizi Feb 5, 2025
3bee9ea
コメント追加
torikizi Feb 5, 2025
89d511a
通知の見直し
torikizi Feb 5, 2025
df076ba
コメント修正
torikizi Feb 6, 2025
b33addf
SDK の examples ビルドを戻す
torikizi Feb 6, 2025
97a4d38
CHANGES を修正
torikizi Feb 6, 2025
f87a35d
Xcode の指定を外す
torikizi Feb 6, 2025
b66298f
Xcode のバージョン指定を外す
torikizi Feb 6, 2025
74f312c
Ubuntu の examples のビルドを修正
torikizi Feb 6, 2025
7b5afd5
Merge branch 'develop' into feature/add-sumomo-release-build-binary
torikizi Feb 7, 2025
d724f90
コメントを少し見直し
torikizi Feb 7, 2025
6c5f641
不要なコメントを削除
voluntas Feb 7, 2025
46e80f9
コメントと変更履歴を整理
voluntas Feb 7, 2025
5c19bd6
インデントがおかしいのを修正する
voluntas Feb 7, 2025
38fc98c
archive で統一する
voluntas Feb 7, 2025
34de507
name 修正
voluntas Feb 7, 2025
921a800
strategy を上にする
voluntas Feb 7, 2025
875d1cb
strategy を上に持ってくる
voluntas Feb 7, 2025
b2687ce
不要なコメント削除
voluntas Feb 7, 2025
83a4559
コスメ
voluntas Feb 7, 2025
378ad70
Ubuntu は matrix.name まで指定が必要
torikizi Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,30 @@ jobs:
- uses: ./.github/actions/download
with:
platform: android
# Examples のダウンロード
- name: Download Examples
uses: actions/download-artifact@v4
with:
pattern: examples_*
merge-multiple: false
- name: Archive Examples
run: |
for d in examples_*; do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d という名前が分かりにくいのでちゃんとした名前を指定して下さい。
また、ワイルドカードで列挙すると一覧性が悪くなるので、以下のようにして下さい。

Suggested change
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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d を使用することをやめました。

mkdir -p "archive/$d"
mv "$d" "archive/$d/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

入力となるディレクトリと、そこから sumomo を取り出して配置するディレクトリが同じ場所にあると分かりにくいので、わざわざ mv しなくて良いです。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mv を削除しました

if [[ "$d" == "examples_macos_arm64" ]]; then
mv "archive/$d/$d/sumomo" "archive/$d/sumomo"
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

プラットフォーム名に対してこういう曖昧な判定をすると、

  • この部分を見た時に実際に何のプラットフォームに引っかかるのか分からない
  • 後でプラットフォームを増やす時に既存のやつを確認しようと検索してもマッチしないからこの部分を確認できずスルーして意図しないバグを埋め込むことになる

という問題があるので、ワイルドカードを使わずに "$d" == "windows_x86_64" のような書き方をして下さい。

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

プラットフォームをまとめず一つずつ書くようにしました。

(cd archive && zip -r "../sumomo_windows_x86_64.zip" "$d")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このままだと全部の examples バイナリが含まれてそう

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

バイナリ格納方法を見直しました。

echo "sumomo_windows_x86_64.zip" >> package_paths.env
else
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここも同じ問題があるので、意図したプラットフォームを全部列挙して、意図しないプラットフォーム名が来たらエラーになるようにして下さい

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

バイナリを作りたいプラットフォームを書くようにし、意図しないものは無視するようにしました。

(cd archive && tar czf "../sumomo_${d#examples_}.tar.gz" "$d")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

このままだと全部の examples バイナリが含まれてそう

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

バイナリ格納方法を見直しました。

echo "sumomo_${d#examples_}.tar.gz" >> package_paths.env
fi
done
- name: Env to output
run: |
echo "package_paths<<EOF" >> $GITHUB_OUTPUT
Expand Down
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
- [UPDATE] CMake を 3.31.4 にあげる
- @voluntas

### misc

- [ADD] リリース時に sumomo バイナリを含めるようにする
voluntas marked this conversation as resolved.
Show resolved Hide resolved
- @torikizi

## 2025.1.0

Expand Down