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

Add: Java APIを作成 #558

Merged
merged 104 commits into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
104 commits
Select commit Hold shift + click to select a range
1c2e5db
Add: Java+gradleのセットアップ
sevenc-nanashi Jul 29, 2023
fca848c
Add: OpenJtalkクラスを追加
sevenc-nanashi Jul 29, 2023
5f09650
WIP: VoiceModelを追加
sevenc-nanashi Jul 29, 2023
957f11a
Refactor: unwrap_or_throw\!からthrow_if_errに
sevenc-nanashi Jul 30, 2023
87a0ac4
Add: VoiceModelを追加
sevenc-nanashi Jul 30, 2023
4228435
Refactor: ファイル分割、internal周りをjni-rsのものに
sevenc-nanashi Jul 31, 2023
50dc06d
Refactor: ファイル統合
sevenc-nanashi Aug 1, 2023
baf3ba3
Fix: SEGVを修正
sevenc-nanashi Aug 2, 2023
2ce8cd5
Change: Meta系をfinalに
sevenc-nanashi Aug 2, 2023
fd54793
Change: TtsTest -> SynthesizerTest
sevenc-nanashi Aug 2, 2023
c3c7971
Add: AudioQuery系を追加
sevenc-nanashi Aug 2, 2023
034b326
Change: SpeakerMeta系をJSONベースに
sevenc-nanashi Aug 2, 2023
6825efc
Add: accent_phrasesを追加
sevenc-nanashi Aug 2, 2023
cca1c17
Add: テストを追加
sevenc-nanashi Aug 2, 2023
18ec0ac
Add: AccentPhrasesの操作系を追加
sevenc-nanashi Aug 2, 2023
39f7dc8
Add: ユーザー辞書のテストを追加
sevenc-nanashi Aug 2, 2023
79a8ca5
Add: ユーザー辞書のインターフェイスを追加
sevenc-nanashi Aug 2, 2023
38d5456
Add: 辞書ロードを追加
sevenc-nanashi Aug 3, 2023
da573e8
Add: ユーザー辞書操作のテストを追加
sevenc-nanashi Aug 3, 2023
7a25f57
Merge: main -> add/java_api
sevenc-nanashi Aug 3, 2023
f172d6b
Add: ドキュメントを追加
sevenc-nanashi Aug 3, 2023
a4187c8
Add: ドキュメントを追加
sevenc-nanashi Aug 3, 2023
7a1a4c6
Fix: スコープを修正
sevenc-nanashi Aug 3, 2023
2638950
Fix: clippyに引っかかっていたのを修正b
sevenc-nanashi Aug 3, 2023
2480bc4
Add: workflowを追加
sevenc-nanashi Aug 3, 2023
b8e42d9
Fix: パイプ忘れ
sevenc-nanashi Aug 3, 2023
08fa0c8
Fix: Typo
sevenc-nanashi Aug 3, 2023
bfd9353
Add: Infoフラグを追加
sevenc-nanashi Aug 3, 2023
04f48f1
Fix: 絶対パスに
sevenc-nanashi Aug 3, 2023
c4bb56f
Change: $PWDを使う用に
sevenc-nanashi Aug 3, 2023
45502d4
Add: test_utilをコンパイルするように
sevenc-nanashi Aug 3, 2023
b86bcf5
Change: Utils -> TestUtils
sevenc-nanashi Aug 3, 2023
348bdc2
Fix: 二重変更を修正
sevenc-nanashi Aug 3, 2023
7d22f64
Add: DYLD_PATHを追加
sevenc-nanashi Aug 3, 2023
4ceb4b5
Add: javadocのworkflowを追加
sevenc-nanashi Aug 3, 2023
6461932
Delete: Jacksonサポートを削除
sevenc-nanashi Aug 3, 2023
da74a88
Fix: generate_documentを修正
sevenc-nanashi Aug 4, 2023
583a957
Add: 環境変数でパスを指定できるように
sevenc-nanashi Aug 4, 2023
3509323
Fix: onnxruntimeの名前を修正
sevenc-nanashi Aug 5, 2023
302742e
Fix: パスを修正
sevenc-nanashi Aug 5, 2023
1ce6ffb
Fix: PWDを削除
sevenc-nanashi Aug 5, 2023
d30d446
Merge branch 'add/java_api' of github.com:sevenc-nanashi/voicevox_cor…
sevenc-nanashi Aug 5, 2023
0f01fa8
Fix: クオートを削除
sevenc-nanashi Aug 5, 2023
136d1dd
Add: ドキュメントを追加
sevenc-nanashi Aug 5, 2023
35d6e49
Add: linguist-vendoredを追加
sevenc-nanashi Aug 5, 2023
a943632
Change: gitattributesを統合
sevenc-nanashi Aug 5, 2023
de16c9b
Revert: a9436326ca9e28e8b51523e130f6cf986b1cf784
sevenc-nanashi Aug 5, 2023
1e8cfa6
Merge: main -> add/java_api
sevenc-nanashi Aug 5, 2023
6676f4e
Add: linguist-generatedを追加
sevenc-nanashi Aug 10, 2023
93f932b
Add: dll読み込み周りを修正
sevenc-nanashi Aug 11, 2023
71e4768
Fix: Actionを修正
sevenc-nanashi Aug 11, 2023
ff64887
Fix: DLL_NAMEを修正
sevenc-nanashi Aug 11, 2023
84c4468
Fix: macos -> mac
sevenc-nanashi Aug 11, 2023
54ea5fc
Change: DLLの説明を移動
sevenc-nanashi Aug 11, 2023
722818b
Add: windows-x86を追加
sevenc-nanashi Aug 11, 2023
241ae7d
Add: デバッグ表示を追加
sevenc-nanashi Aug 11, 2023
33322c5
Fix: gradle -> gradlew
sevenc-nanashi Aug 11, 2023
2064fed
Fix: win -> windows
sevenc-nanashi Aug 11, 2023
ad080c4
Change: close -> finalize
sevenc-nanashi Aug 12, 2023
2aa4054
Add: spotlessを追加
sevenc-nanashi Aug 12, 2023
480ea7d
Fix: applyを削除
sevenc-nanashi Aug 12, 2023
9e268d0
Change: workflowのJavaを11に
sevenc-nanashi Aug 12, 2023
d1c3f96
Change: APIドキュメント生成のJavaのバージョンを変更
sevenc-nanashi Aug 13, 2023
9a8129e
Fix: JDKのバージョンを修正
sevenc-nanashi Aug 13, 2023
b091e6a
Fix: <p>を削除
sevenc-nanashi Aug 13, 2023
e766bd6
Revert: pを復活
sevenc-nanashi Aug 13, 2023
6d1e517
Code: shellcheckの違反を修正
sevenc-nanashi Aug 13, 2023
225c8f9
Revert: newをdefaultに戻す
sevenc-nanashi Aug 13, 2023
f62adc1
Change: realpathに
sevenc-nanashi Aug 13, 2023
87a286d
Change: 順番を変更
sevenc-nanashi Aug 15, 2023
5dbb30f
Change: $RUNNER_OSを使う用に
sevenc-nanashi Aug 15, 2023
0cb2721
Fix: READMEの記述を修正
sevenc-nanashi Aug 15, 2023
e6facbc
Fix: RUNNER_OSの値を修正
sevenc-nanashi Aug 15, 2023
8cad17a
Fix: OSの値を修正
sevenc-nanashi Aug 15, 2023
c6c56c3
Change: AudioQuery#kanaをNullableに
sevenc-nanashi Aug 16, 2023
17e1a8b
Delete: 不要なget->dropを削除
sevenc-nanashi Aug 16, 2023
7f6dc51
Change: internal -> handle
sevenc-nanashi Aug 16, 2023
28ca040
Change: 999.999.999 -> 0.0.0
sevenc-nanashi Aug 16, 2023
57bc419
Change: internal -> handle
sevenc-nanashi Aug 16, 2023
922e8d6
Change: getWords -> toHashMap
sevenc-nanashi Aug 16, 2023
02b87c6
Change: as jboolean -> into()
sevenc-nanashi Aug 16, 2023
1d9b0a5
Change: 整数の範囲のチェックをJava側で行うように
sevenc-nanashi Aug 16, 2023
30d5c59
Change: unsafeを関数に移動
sevenc-nanashi Aug 16, 2023
6d6198a
Merge: local <- remote
sevenc-nanashi Aug 16, 2023
86e6a8b
Change: target周りを変更
sevenc-nanashi Aug 16, 2023
cf82621
Change: Java 11に変更
sevenc-nanashi Aug 16, 2023
9877a6e
Delete: ARCHを削除
sevenc-nanashi Aug 16, 2023
f26ea63
Fix: dllコピーを修正
sevenc-nanashi Aug 16, 2023
5228064
Change: Builderパターンに
sevenc-nanashi Aug 16, 2023
d8a9ed2
Change: finalize -> Cleaner
sevenc-nanashi Aug 16, 2023
16ac034
Change: VAR,, -> tr
sevenc-nanashi Aug 16, 2023
78bc92c
Fix: javadocが生成できないのを修正
sevenc-nanashi Aug 16, 2023
5890f61
Delete: 不要な指定を削除
sevenc-nanashi Aug 16, 2023
e75a0fa
Delete: 不要な依存を削除
sevenc-nanashi Aug 16, 2023
8def701
Change: jp.Hiroshiba.VoicevoxCore -> jp.hiroshiba.voicevoxcore
sevenc-nanashi Aug 17, 2023
ee5eadf
Merge: main -> add/java_api
sevenc-nanashi Aug 18, 2023
7ea44fb
Delete: mutを削除
sevenc-nanashi Aug 18, 2023
e4d2dd6
Change: gradleをgeneratedに
sevenc-nanashi Aug 29, 2023
44c9c91
Fix: 小文字化に追従
sevenc-nanashi Aug 29, 2023
e149843
Change: READMEの細かい部分を修正
sevenc-nanashi Aug 29, 2023
cbba795
Delete: 空ディレクトリを削除
sevenc-nanashi Aug 29, 2023
f54bc1f
Change: ()を使うように
sevenc-nanashi Aug 29, 2023
d779a04
Change: gradle-wrapper.jarをgeneratedに
sevenc-nanashi Aug 29, 2023
456891e
update-rust-branchの案内を追加
Hiroshiba Aug 30, 2023
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
11 changes: 11 additions & 0 deletions .github/workflows/generate_document.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Setup Java
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Install cargo-binstall
uses: taiki-e/install-action@cargo-binstall
- name: Create a venv
Expand All @@ -42,8 +47,14 @@ jobs:
maturin develop --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --locked
- name: Generate Sphinx document
run: sphinx-build docs/apis/python_api public/apis/python_api
- name: Generate Javadoc
run: |
(cd crates/voicevox_core_java_api && ./gradlew javadoc)
mkdir -p public/apis/java_api
cp -r crates/voicevox_core_java_api/lib/build/docs/javadoc/* public/apis/java_api
- name: Uplaod api document
uses: actions/upload-pages-artifact@v1
if: ${{ github.ref_name == 'main' }}
sevenc-nanashi marked this conversation as resolved.
Show resolved Hide resolved
with:
path: public
deploy_api_github_pages:
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -283,3 +283,51 @@ jobs:

pip install -r requirements-test.txt
pytest
build-and-test-java-api:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
- os: macos-latest
- os: ubuntu-latest
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/rust-toolchain-from-file
- name: Set up Java
uses: actions/setup-java@v2
with:
java-version: "11"
distribution: "adopt"
- name: Build
run: |
cargo build -p voicevox_core_java_api -vv
cargo build -p test_util -vv
Hiroshiba marked this conversation as resolved.
Show resolved Hide resolved
- name: 必要なDLLをコピーしてテストを実行
working-directory: crates/voicevox_core_java_api
run: |
OS=$(tr '[:upper:]' '[:lower:]' <<<"$RUNNER_OS")
ARCH=$(tr '[:upper:]' '[:lower:]' <<<"$RUNNER_ARCH")

case "$RUNNER_OS" in
Windows)
DLL_NAME="voicevox_core_java_api.dll"
;;
macOS)
DLL_NAME="libvoicevox_core_java_api.dylib"
;;
Linux)
DLL_NAME="libvoicevox_core_java_api.so"
;;
*)
echo "Unsupported OS: $RUNNER_OS"
exit 1
;;
esac
TARGET_NAME="$OS-$ARCH"
mkdir -p "./lib/src/main/resources/dll/$TARGET_NAME"
cp -v "../../target/debug/$DLL_NAME" "./lib/src/main/resources/dll/$TARGET_NAME/$DLL_NAME"
echo "target = $TARGET_NAME, dll = $DLL_NAME"
./gradlew test --info
Loading
Loading