forked from VOICEVOX/voicevox_core
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Rust]C++ unix向けのexampleを修正する (VOICEVOX#197)
* C++ unix向けのexampleを修正する * CIでのbuildチェックを追加した * deployのfile copyに合わせてコピーするファイル対象を変更した * 余分な変数を削除 * 消してしまっていた CXX_STANDARDを復活 * CIにrust toolchain instlalを追加 * macのexample build patternを一旦コメントアウト * Update .github/workflows/test.yml Co-authored-by: Hiroshiba <[email protected]> * exampleをダウンロード前提にして実行するように変更 * CIのbuildをちゃんと動くように修正 * file配置の説明を記載 * rpathの設定がされてればLD_LIBRARY_PATHの設定は不要になったため * 表記揺れの修正 Co-authored-by: Hiroshiba <[email protected]> Co-authored-by: Gray Suitcase <[email protected]>
- Loading branch information
1 parent
8df0774
commit 55de65f
Showing
5 changed files
with
59 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,5 +59,45 @@ jobs: | |
find target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib -name onnxruntime.dll -ctime 0 | ||
find target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib -name onnxruntime.dll -ctime 0 | head -n 1 | xargs -i cp {} target/debug/deps/ | ||
- run: cargo test --all-features | ||
|
||
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 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
- name: build voicevox_core | ||
run: cargo build | ||
- name: 必要なfileをunix用exampleのディレクトリに移動させる | ||
run: | | ||
cp -v target/core.h example/cpp/unix/ | ||
cp -v target/debug/libcore.{so,dylib} example/cpp/unix/ || true | ||
cp -v target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.so.* example/cpp/unix/ || true | ||
cp -v target/debug/build/onnxruntime-sys-*/out/onnxruntime_*/onnxruntime-*/lib/libonnxruntime.*.dylib example/cpp/unix/ || 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 | ||
env: | ||
CARGO_TERM_COLOR: always |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
# libraries | ||
*.dylib | ||
*.so | ||
*.so.* | ||
core.h | ||
|
||
# OpenJTalk-dictionary's dir | ||
open_jtalk_dic_utf_8-* | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters