-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into use-c-string-literal
- Loading branch information
Showing
175 changed files
with
8,825 additions
and
4,703 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
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,3 +1,6 @@ | ||
name: Create venv | ||
description: Pythonの仮想環境を作成し、$PATHと$VIRTUAL_ENVを設定する。 | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
|
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,16 @@ | ||
name: cargo-deny | ||
on: | ||
push: | ||
pull_request: | ||
defaults: | ||
run: | ||
shell: bash | ||
branches: | ||
- main | ||
jobs: | ||
cargo-deny: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Install cargo-binstall | ||
uses: taiki-e/install-action@cargo-binstall | ||
- name: Install cargo-deny | ||
run: cargo binstall cargo-deny@^0.14 --no-confirm --log-level debug | ||
run: cargo binstall cargo-deny@^0.16 --no-confirm --log-level debug | ||
- name: cargo-deny | ||
run: | | ||
if ${{ !!github.event.release }}; then | ||
cargo deny --all-features check | ||
else | ||
cargo deny --all-features check -W denied | ||
fi | ||
run: cargo deny --all-features check |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,22 +11,36 @@ jobs: | |
generate_api_document: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
- name: Set up Rust | ||
uses: ./.github/actions/rust-toolchain-from-file | ||
- name: Extract the Rust version used on Docs.rs | ||
id: docsrs-rust-version | ||
run: | | ||
page=$(curl -f https://docs.rs/about/builds) | ||
date=$( | ||
sed -n \ | ||
's:^.*<code>rustc 1\.[0-9]\+\.[0-9]\+-nightly ([0-9a-f]\{9\} \([0-9]\{4\}-[0-9]\{2\}-[0-9]\{2\}\))</code>.*$:\1:p' \ | ||
<<< "$page" | ||
) | ||
echo "rust-toolchain=nightly-$date" >> "$GITHUB_OUTPUT" | ||
- name: Set up nightly Rust | ||
uses: dtolnay/rust-toolchain@master | ||
with: | ||
toolchain: ${{ steps.docsrs-rust-version.outputs.rust-toolchain }} | ||
- name: Set up Python | ||
uses: actions/setup-python@v4 | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.8" | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: "11" | ||
distribution: "adopt" | ||
- name: Install cargo-binstall | ||
uses: taiki-e/install-action@cargo-binstall | ||
- name: Install cargo-docs-rs | ||
uses: dtolnay/install@cargo-docs-rs | ||
- name: Create a venv | ||
uses: ./.github/actions/create-venv | ||
- name: Install python dependencies | ||
|
@@ -39,19 +53,18 @@ jobs: | |
run: mkdir -p public/apis/c_api | ||
- name: cp docs/apis/index.html | ||
run: cp docs/apis/index.html public/apis/ | ||
- name: Generate rustdoc | ||
run: | | ||
cargo +${{ steps.docsrs-rust-version.outputs.rust-toolchain }} docs-rs -p voicevox_core | ||
mv target/x86_64-unknown-linux-gnu/doc public/apis/rust_api | ||
- name: cp crates/voicevox_core_c_api/include/voicevox_core.h | ||
run: cp crates/voicevox_core_c_api/include/voicevox_core.h docs/apis/c_api/doxygen/ | ||
- name: Generate doxygen document | ||
uses: mattnotmitt/[email protected].4 | ||
uses: mattnotmitt/[email protected].8 | ||
with: | ||
working-directory: "docs/apis/c_api/doxygen" | ||
- name: Build voicevox_core_python_api | ||
run: | | ||
cargo build -p voicevox_core_c_api -vv | ||
maturin develop --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --locked | ||
# https://github.com/readthedocs/sphinx-autoapi/issues/405 | ||
- name: Workaround to make Sphinx recognize `_rust` as a module | ||
run: touch ./crates/voicevox_core_python_api/python/voicevox_core/_rust/__init__.py | ||
run: 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 | ||
|
@@ -60,7 +73,7 @@ jobs: | |
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 | ||
uses: actions/upload-pages-artifact@v3 | ||
if: ${{ github.ref_name == 'main' }} | ||
with: | ||
path: public | ||
|
@@ -78,4 +91,4 @@ jobs: | |
steps: | ||
- name: Deploy to GitHub pages | ||
id: api | ||
uses: actions/deploy-pages@v1 | ||
uses: actions/deploy-pages@v4 |
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
Oops, something went wrong.