Skip to content

Commit

Permalink
Merge branch 'main' into introduce-voicevox-core-errorkind
Browse files Browse the repository at this point in the history
  • Loading branch information
qryxip committed Sep 3, 2023
2 parents e8045e4 + 5e82723 commit d4b8b0b
Show file tree
Hide file tree
Showing 42 changed files with 3,073 additions and 69 deletions.
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' }}
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
- 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
34 changes: 0 additions & 34 deletions .github/workflows/update_rust_toolchain.yml

This file was deleted.

Loading

0 comments on commit d4b8b0b

Please sign in to comment.