-
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
Changes from all commits
0bde985
d21c132
2db986f
2763afb
7ebc350
e67397f
8b01832
36fbcc4
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: shellcheck | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- .github/workflows/** | ||
- .github/actions/**/* | ||
|
||
jobs: | ||
actionlint: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
# ShellCheckとPyflakesをインストールしておくと、shell: bashとshell: pythonのコードを検査してくれるようになる | ||
# | ||
# 参考: | ||
# - https://github.com/rhysd/actionlint/blob/main/docs/checks.md#shellcheck-integration-for-run | ||
# - https://github.com/rhysd/actionlint/blob/main/docs/checks.md#pyflakes-integration-for-run | ||
- name: Update ShellCheck | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y shellcheck | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.8" | ||
- name: Install Pyflakes | ||
run: pip install 'pyflakes>3,<4' | ||
- name: actionlint | ||
run: | | ||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||
./actionlint -color |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -13,10 +13,16 @@ on: | |||||
types: | ||||||
- published | ||||||
pull_request: | ||||||
paths: | ||||||
- build_util/** | ||||||
- Cargo.* | ||||||
- crates/voicevox_core** | ||||||
- model/** | ||||||
- rust-toolchain | ||||||
- scripts/downloads/* | ||||||
push: | ||||||
branches: | ||||||
- "*" | ||||||
- "**/*" | ||||||
branches: | ||||||
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.
Suggested change
|
||||||
- main | ||||||
env: | ||||||
# releaseタグ名か、workflow_dispatchでのバージョン名か、'0.0.0'が入る | ||||||
VERSION: ${{ github.event.release.tag_name || github.event.inputs.version || '0.0.0' }} | ||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,56 @@ | ||||||||||||
name: Build C++ example | ||||||||||||
on: | ||||||||||||
push: | ||||||||||||
branches: | ||||||||||||
- main | ||||||||||||
pull_request: | ||||||||||||
paths: | ||||||||||||
- crates/voicevox_core** | ||||||||||||
Comment on lines
+7
to
+8
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.
Suggested change
|
||||||||||||
- '!crates/voicevox_core_python_api/**' | ||||||||||||
- model/** | ||||||||||||
- example/cpp/unix/** | ||||||||||||
|
||||||||||||
jobs: | ||||||||||||
build-unix-cpp-example: | ||||||||||||
strategy: | ||||||||||||
fail-fast: false | ||||||||||||
matrix: | ||||||||||||
include: | ||||||||||||
- os: macos-latest | ||||||||||||
artifact_name: osx-x64-cpu-cpp-shared | ||||||||||||
- os: ubuntu-latest | ||||||||||||
artifact_name: linux-x64-cpu-cpp-shared | ||||||||||||
runs-on: ${{ matrix.os }} | ||||||||||||
steps: | ||||||||||||
- uses: actions/checkout@v3 | ||||||||||||
- name: Set up Rust | ||||||||||||
uses: ./.github/actions/rust-toolchain-from-file | ||||||||||||
- name: Install cargo-binstall | ||||||||||||
uses: taiki-e/install-action@cargo-binstall | ||||||||||||
- name: Install cbindgen | ||||||||||||
uses: ./.github/actions/cargo-binstall-cbindgen | ||||||||||||
- name: build voicevox_core_c_api | ||||||||||||
run: cargo build -p voicevox_core_c_api -vv | ||||||||||||
- name: voicevox_core.hを生成 | ||||||||||||
run: cbindgen --crate voicevox_core_c_api -o ./example/cpp/unix/voicevox_core/voicevox_core.h | ||||||||||||
- name: 必要なfileをunix用exampleのディレクトリに移動させる | ||||||||||||
run: | | ||||||||||||
mkdir -p example/cpp/unix/voicevox_core/ | ||||||||||||
cp -v target/debug/libvoicevox_core.{so,dylib} example/cpp/unix/voicevox_core/ || true | ||||||||||||
cp -v target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.so.* example/cpp/unix/voicevox_core/ || true | ||||||||||||
cp -v target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.*.dylib example/cpp/unix/voicevox_core/ || true | ||||||||||||
|
||||||||||||
- if: startsWith(matrix.os, 'mac') | ||||||||||||
uses: jwlawson/[email protected] | ||||||||||||
- name: Install build dependencies | ||||||||||||
if: startsWith(matrix.os, 'ubuntu') | ||||||||||||
shell: bash | ||||||||||||
run: | | ||||||||||||
sudo apt-get update | ||||||||||||
sudo apt-get install -y cmake | ||||||||||||
- name: Build | ||||||||||||
shell: bash | ||||||||||||
run: | | ||||||||||||
cd example/cpp/unix | ||||||||||||
cmake -S . -B build | ||||||||||||
cmake --build build |
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -1,7 +1,13 @@ | ||||||||||||||||
name: cargo-deny | ||||||||||||||||
on: | ||||||||||||||||
push: | ||||||||||||||||
branches: | ||||||||||||||||
- main | ||||||||||||||||
pull_request: | ||||||||||||||||
paths: | ||||||||||||||||
- '**/Cargo.*' | ||||||||||||||||
- deny.toml | ||||||||||||||||
Comment on lines
+7
to
+9
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.
Suggested change
|
||||||||||||||||
- rust-toolchain | ||||||||||||||||
jobs: | ||||||||||||||||
cargo-deny: | ||||||||||||||||
runs-on: ubuntu-20.04 | ||||||||||||||||
|
Original file line number | Diff line number | Diff line change | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -4,6 +4,11 @@ on: | |||||||||||
branches: | ||||||||||||
- main | ||||||||||||
pull_request: | ||||||||||||
paths: | ||||||||||||
- 'Cargo.*' | ||||||||||||
- crates/voicevox_core** | ||||||||||||
Comment on lines
+8
to
+9
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.
Suggested change
|
||||||||||||
- docs/** | ||||||||||||
- rust-toolchain | ||||||||||||
jobs: | ||||||||||||
generate_api_document: | ||||||||||||
runs-on: ubuntu-latest | ||||||||||||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: shellcheck | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
paths: | ||
- '**.sh' | ||
- '**.bash' | ||
jobs: | ||
shellcheck: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Update ShellCheck | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y shellcheck | ||
- name: ShellCheck | ||
run: git ls-files | grep -E '\.(ba)?sh' | xargs shellcheck |
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. build_cpp_example.ymlに分離した 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. 指摘ありがとうございます! 昨日の時点で気づいてはいて、ローカルでは直しています。あとで他の変更と一緒にまとめてpushするつもりでした |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -1,46 +1,14 @@ | ||||||
name: test workflow | ||||||
on: | ||||||
push: | ||||||
branches: | ||||||
- "*" | ||||||
- "**/*" | ||||||
branches: | ||||||
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.
Suggested change
|
||||||
- main | ||||||
pull_request: | ||||||
paths: | ||||||
- crates/** | ||||||
- Cargo.* | ||||||
- rust-toolchain | ||||||
jobs: | ||||||
shellcheck: | ||||||
runs-on: ubuntu-22.04 | ||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
- name: Update ShellCheck | ||||||
run: | | ||||||
sudo apt-get update | ||||||
sudo apt-get install -y shellcheck | ||||||
- name: ShellCheck | ||||||
run: git ls-files | grep -E '\.(ba)?sh' | xargs shellcheck | ||||||
|
||||||
actionlint: | ||||||
runs-on: ubuntu-22.04 | ||||||
steps: | ||||||
- uses: actions/checkout@v3 | ||||||
# ShellCheckとPyflakesをインストールしておくと、shell: bashとshell: pythonのコードを検査してくれるようになる | ||||||
# | ||||||
# 参考: | ||||||
# - https://github.com/rhysd/actionlint/blob/main/docs/checks.md#shellcheck-integration-for-run | ||||||
# - https://github.com/rhysd/actionlint/blob/main/docs/checks.md#pyflakes-integration-for-run | ||||||
- name: Update ShellCheck | ||||||
run: | | ||||||
sudo apt-get update | ||||||
sudo apt-get install -y shellcheck | ||||||
- name: Set up Python 3.8 | ||||||
uses: actions/setup-python@v4 | ||||||
with: | ||||||
python-version: "3.8" | ||||||
- name: Install Pyflakes | ||||||
run: pip install 'pyflakes>3,<4' | ||||||
- name: actionlint | ||||||
run: | | ||||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) | ||||||
./actionlint -color | ||||||
|
||||||
validate-cargo-lock: | ||||||
runs-on: ubuntu-22.04 | ||||||
steps: | ||||||
|
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