Skip to content

Conversation

Hiroshiba
Copy link
Member

内容

の一環です。

プッシュするたびにかなり多くの環境と条件でビルドタスクが回っていて、その影響でテストがすごく時間かかっていました。
このプルリクエストでは簡易テストという概念を導入し、各OSにつき1つだけビルドテストするようにしてみました。

workflow_dispatch(Github Actionsから直接実行できるやつ)とreleaseの経路では全部のビルドを行います。
それ以外の経路(push・pull_request)では簡易テストとします。

関連 Issue

その他

条件matrixを動的に変更する必要があるのですが、現状のgithub actionsでは前段階としてジョブを実行し、その出力結果を持ってmatrixを変更する以外方法がありません。
なので前段階のジョブ側に全条件のjsonを作っておいてフィルタリングするようにしました。

さすがに見づらかったのでジョブごとに改行を導入しました。

run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}

build-python-api:
build-and-test-python-api:
Copy link
Member Author

Choose a reason for hiding this comment

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

テストもしていることに気づいたので名称変更

Comment on lines -268 to -269
env:
CARGO_TERM_COLOR: always
Copy link
Member Author

Choose a reason for hiding this comment

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

他にenvを使うものが増えたので上に移動

target_commitish: ${{ github.sha }}

build_xcframework:
if: ${{ !(github.event_name != 'release' && github.event_name != 'workflow_dispatch') }} # !env.IS_SIMPLE_TEST と同じ
Copy link
Member Author

Choose a reason for hiding this comment

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

ここではenvを使えないのでこういう風に書くしかない・・・。

Copy link
Member

@qryxip qryxip left a comment

Choose a reason for hiding this comment

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

LGTM!

@Hiroshiba
Copy link
Member Author

レビューありがとうございます!

問題ないと思うのでマージします!! これでちょっと開発者と環境に優しくなったはず。

@Hiroshiba Hiroshiba merged commit 4073435 into VOICEVOX:main Jul 31, 2023
@Hiroshiba Hiroshiba deleted the ビルドを全通り試さない簡易テストモードを追加する branch July 31, 2023 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants