-
Notifications
You must be signed in to change notification settings - Fork 118
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
PR時に走るworkflowの数を減らす #382
base: main
Are you sure you want to change the base?
PR時に走るworkflowの数を減らす #382
Conversation
かなり減ったと思うけど、それでも20個弱走っていて、 |
細分化、良いと思います!! |
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.
paths
指定はここまで入れた方がよいと思います。
正直cargo-denyとかに留めておいた方がよい気もします。
あーでも細分化する前提なら |
一旦Suggestionを取り入れて、細分化していきたいと思います...! |
Co-authored-by: Ryo Yamashita <[email protected]>
条件に合わせてactionsを分割したのと、結合してもよさそうなものを結合してみました。 |
.github/workflows/test.yml
Outdated
- name: Set up Rust (test only) | ||
if: matrix.os != 'windows-2022' | ||
uses: ./.github/actions/rust-toolchain-from-file | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
# cargoのキャッシュが原因でテストが失敗する場合はバージョン部分をカウントアップすること | ||
key: "v2-cargo-test-cache-${{ matrix.features }}-${{ matrix.os }}" | ||
- name: Run cargo test | ||
shell: bash | ||
run: cargo test -vv --features ,${{ matrix.features }} | ||
|
||
xtask-generate-c-header: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Rust | ||
- name: Set up Rust (test and lint) | ||
if: matrix.os == 'windows-2022' | ||
uses: ./.github/actions/rust-toolchain-from-file | ||
with: | ||
components: clippy,rustfmt |
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.
matrix
に"components"を含む形でもよいのでは?
判定するときは${{ contains(matrix.components, 'clippy') }}
とかにして。
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/test.yml
Outdated
- name: Validate Cargo.lock | ||
run: cargo metadata --locked --format-version 1 > /dev/null |
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.
別workflowに分離してもよさそうな気がします。cargo-fmtも。
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.
ジョブの数が多いと並行ジョブ数上限に引っかかって、かえってCIにかかる時間が増えそうだったので、まとめられそうなものをまとめてみましたが、分ける方がメリットが大きそうでしょうか...?
いろんな視点からの意見が知りたいです:pray:
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.
ちゃんと追えてないのですが、Actions起動のオーバーヘッドもあるので、対象のpath範囲が同じならまとめちゃった方が早いのかなと思いました!
Co-authored-by: Ryo Yamashita <[email protected]>
Co-authored-by: Ryo Yamashita <[email protected]>
こちら、そろそろマージできると嬉しいかもです!! |
そういえば |
@y-chan すみません、こちらどうでしょう・・・! |
ぱぱっとやっちゃいたいのですが、ちょっとActionsの書き方を調べるとかで時間がかかりそうなので、 @qryxip さんか @Hiroshiba さん、巻き取っていただけると大変助かります...!いかがでしょうか...? 巻取りが難しい感じでしたら、私の方で頑張ってみます...! |
なるほどです! 興味ありますが、ちょっといろんなタスクがあるので着手がかなり遅れる気がします・・・ 🙇♂️ |
@y-chan @Hiroshiba こちら、もし良かったら作業引き継ぎますか?(作業を引き継いだことがないので、もしかしたらやり方を質問するかもしれませんが……) |
@PickledChair ぜひぜひ!! |
@Hiroshiba わかりました! とりあえず conflict を解消しました。もう少し内容を確認して、どんな作業をすべきか整理したいと思います。 |
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.
とりあえずいくつか気になった点を:
branches: | ||
- "*" | ||
- "**/*" | ||
branches: |
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.
branches: | |
branches: |
branches: | ||
- "*" | ||
- "**/*" | ||
branches: |
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.
branches: | |
branches: |
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.
build_cpp_example.ymlに分離したbuild-unix-cpp-example
がまだ残っています。
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.
指摘ありがとうございます!
昨日の時点で気づいてはいて、ローカルでは直しています。あとで他の変更と一緒にまとめてpushするつもりでした
paths: | ||
- build_util/** |
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.
参考: #345
paths: | |
- build_util/** | |
paths: | |
- .github/workflows/build_and_deploy.yml | |
- build_util/** |
paths: | ||
- crates/voicevox_core** |
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.
paths: | |
- crates/voicevox_core** | |
paths: | |
- .github/workflows/build_cpp_example.yml | |
- crates/voicevox_core** |
paths: | ||
- '**/Cargo.*' | ||
- deny.toml |
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.
paths: | |
- '**/Cargo.*' | |
- deny.toml | |
paths: | |
- '**/Cargo.*' | |
- .github/workflows/cargo-deny.yml | |
- deny.toml |
- 'Cargo.*' | ||
- crates/voicevox_core** |
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.
- 'Cargo.*' | |
- crates/voicevox_core** | |
- 'Cargo.*' | |
- .github/workflows/generate_document.yml | |
- crates/voicevox_core** |
@qryxip いくつかのコメントありがとうございます! 参考にさせていただきます。 |
内容
題の通り
paths
条件など、いろいろ絞ってみましたが、間違ってそうであればご指摘お願いします。関連 Issue