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

整理: build_utiltools へリネーム #1388

Merged
merged 5 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
uses: ./.github/actions/prepare_python

- name: <Build> Make documents
run: PYTHONPATH=. python build_util/make_docs.py
run: PYTHONPATH=. python tools/make_docs.py

- name: <Deploy> Deploy documents to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-engine-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ jobs:
- name: <Build> Merge VOICEVOX RESOURCE
env:
DOWNLOAD_RESOURCE_PATH: download/resource
run: bash build_util/process_voicevox_resource.bash
run: bash tools/process_voicevox_resource.bash

- name: <Build/Deploy> Build and Deploy Docker image
uses: docker/build-push-action@v5
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-engine-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ jobs:

- name: <Setup> Prepare custom PyInstaller
if: startsWith(matrix.os, 'windows-')
run: ./build_util/modify_pyinstaller.bash
run: ./tools/modify_pyinstaller.bash

- name: <Setup> Download pyopenjtalk dictionary
run: |
Expand Down Expand Up @@ -409,7 +409,7 @@ jobs:
- name: <Build> Merge RESOURCE
env:
DOWNLOAD_RESOURCE_PATH: download/resource
run: bash build_util/process_voicevox_resource.bash
run: bash tools/process_voicevox_resource.bash

# VOICEVOX CORE
- name: <Setup> Prepare CORE cache
Expand Down Expand Up @@ -441,7 +441,7 @@ jobs:
- name: <Build> Generate licenses.json
run: |
OUTPUT_LICENSE_JSON_PATH=resources/engine_manifest_assets/dependency_licenses.json \
bash build_util/create_venv_and_generate_licenses.bash
bash tools/create_venv_and_generate_licenses.bash
# FIXME: VOICEVOX (editor) cannot build without licenses.json
cp resources/engine_manifest_assets/dependency_licenses.json licenses.json

Expand Down Expand Up @@ -547,7 +547,7 @@ jobs:

- name: <Build> Code signing
if: github.event.inputs.code_signing == 'true' && startsWith(matrix.os, 'windows-')
run: bash build_util/codesign.bash "dist/run/run.exe"
run: bash tools/codesign.bash "dist/run/run.exe"
env:
ESIGNERCKA_USERNAME: ${{ secrets.ESIGNERCKA_USERNAME }}
ESIGNERCKA_PASSWORD: ${{ secrets.ESIGNERCKA_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-engine-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ jobs:
exit 1

- name: <Test> Test ENGINE application docker container
run: python build_util/check_release_build.py --skip_run_process --dist_dir dist/
run: python tools/check_release_build.py --skip_run_process --dist_dir dist/
2 changes: 1 addition & 1 deletion .github/workflows/test-engine-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,4 @@ jobs:
run: chmod +x dist/run

- name: <Test> Test ENGINE package
run: python build_util/check_release_build.py --dist_dir dist/
run: python tools/check_release_build.py --dist_dir dist/
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: <Test> Check licenses
run: OUTPUT_LICENSE_JSON_PATH=/dev/null bash build_util/create_venv_and_generate_licenses.bash
run: OUTPUT_LICENSE_JSON_PATH=/dev/null bash tools/create_venv_and_generate_licenses.bash

- name: <Test> Test names by checking typo
if: matrix.os == 'ubuntu-20.04'
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ safety check -r requirements.txt -r requirements-dev.txt -r requirements-build.t

```bash
OUTPUT_LICENSE_JSON_PATH=licenses.json \
bash build_util/create_venv_and_generate_licenses.bash
bash tools/create_venv_and_generate_licenses.bash

# モックでビルドする場合
pyinstaller --noconfirm run.spec
Expand All @@ -328,7 +328,7 @@ fork したリポジトリで Actions を ON にし、workflow_dispatch で`buil
次のコマンドで API ドキュメントを手動で作成することができます。

```bash
PYTHONPATH=. python build_util/make_docs.py
PYTHONPATH=. python tools/make_docs.py
```

## GitHub Actions
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ ADD ./voicevox_engine /opt/voicevox_engine/voicevox_engine
ADD ./docs /opt/voicevox_engine/docs
ADD ./run.py ./presets.yaml ./engine_manifest.json /opt/voicevox_engine/
ADD ./resources /opt/voicevox_engine/resources
ADD ./build_util/generate_licenses.py /opt/voicevox_engine/build_util/
ADD ./build_util/licenses /opt/voicevox_engine/build_util/licenses
ADD ./tools/generate_licenses.py /opt/voicevox_engine/tools/
ADD ./tools/licenses /opt/voicevox_engine/tools/licenses

# Replace version
ARG VOICEVOX_ENGINE_VERSION=latest
Expand All @@ -254,7 +254,7 @@ RUN <<EOF
gosu user /opt/python/bin/pip3 install -r /tmp/requirements.txt
# requirements-dev.txt でバージョン指定されている pip-licenses をインストールする
gosu user /opt/python/bin/pip3 install "$(grep pip-licenses /tmp/requirements-dev.txt | cut -f 1 -d ';')"
gosu user /opt/python/bin/python3 build_util/generate_licenses.py > /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json
gosu user /opt/python/bin/python3 tools/generate_licenses.py > /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json
cp /opt/voicevox_engine/resources/engine_manifest_assets/dependency_licenses.json /opt/voicevox_engine/licenses.json
EOF

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ DYLD_LIBRARY_PATH="/path/to/onnx" python run.py --voicelib_dir="/path/to/voicevo
python -m pip install -r requirements-build.txt

OUTPUT_LICENSE_JSON_PATH=licenses.json \
bash build_util/create_venv_and_generate_licenses.bash
bash tools/create_venv_and_generate_licenses.bash

# モックでビルドする場合
pyinstaller --noconfirm run.spec
Expand Down Expand Up @@ -718,7 +718,7 @@ VOICEVOX エディターにうまく読み込ませられないときは、エ
次のコマンドで API ドキュメントを手動で作成することができます。

```bash
PYTHONPATH=. python build_util/make_docs.py
PYTHONPATH=. python tools/make_docs.py
```

### GitHub Actions
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fi
pip install -r requirements.txt
# requirements-dev.txt でバージョン指定されている pip-licenses をインストールする
pip install "$(grep pip-licenses requirements-dev.txt | cut -f 1 -d ';')"
python build_util/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}"
python tools/generate_licenses.py > "${OUTPUT_LICENSE_JSON_PATH}"

deactivate

Expand Down
12 changes: 6 additions & 6 deletions build_util/generate_licenses.py → tools/generate_licenses.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,21 +141,21 @@ def generate_licenses() -> list[License]:
package_name="Open JTalk",
package_version="1.11",
license_name="Modified BSD license",
license_text="build_util/licenses/open_jtalk/COPYING",
license_text="tools/licenses/open_jtalk/COPYING",
license_text_type="local_address",
),
License(
package_name="MeCab",
package_version=None,
license_name="Modified BSD license",
license_text="build_util/licenses/open_jtalk/mecab/COPYING",
license_text="tools/licenses/open_jtalk/mecab/COPYING",
license_text_type="local_address",
),
License(
package_name="NAIST Japanese Dictionary",
package_version=None,
license_name="Modified BSD license",
license_text="build_util/licenses//open_jtalk/mecab-naist-jdic/COPYING",
license_text="tools/licenses//open_jtalk/mecab-naist-jdic/COPYING",
license_text_type="local_address",
),
License(
Expand Down Expand Up @@ -257,7 +257,7 @@ def generate_licenses() -> list[License]:
package_name="mpg123",
package_version="1.30.2",
license_name="LGPL-2.1 license",
license_text="build_util/licenses/mpg123/COPYING",
license_text="tools/licenses/mpg123/COPYING",
license_text_type="local_address",
),
# liblame
Expand All @@ -277,7 +277,7 @@ def generate_licenses() -> list[License]:
package_name="CUDA Toolkit",
package_version="11.8.0",
license_name=None,
license_text="build_util/licenses/cuda/EULA.txt",
license_text="tools/licenses/cuda/EULA.txt",
license_text_type="local_address",
),
# license text from cuDNN v8.9.2 (June 1st, 2023), for CUDA 11.x, cuDNN Library for Windows # noqa: B950
Expand All @@ -288,7 +288,7 @@ def generate_licenses() -> list[License]:
package_name="cuDNN",
package_version="8.9.2",
license_name=None,
license_text="build_util/licenses/cudnn/LICENSE",
license_text="tools/licenses/cudnn/LICENSE",
license_text_type="local_address",
),
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
引数のnaist_jdic_pathには、open_jtalkのsrc/mecab-naist-jdic/naist-jdic.csvを指定してください。

実行例:
python build_util/get_cost_candidates.py --naist_jdic_path=/path/to/naist-jdic.csv \
python tools/get_cost_candidates.py --naist_jdic_path=/path/to/naist-jdic.csv \
--pos=名詞 \
--pos_detail_1=固有名詞 \
--pos_detail_2=一般 \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jq -s '.[0] * .[1]' engine_manifest.json "${DOWNLOAD_RESOURCE_PATH}/engine/engin
mv engine_manifest.json.tmp engine_manifest.json

# エンジンとリソースの更新情報を統合する
python build_util/merge_update_infos.py \
python tools/merge_update_infos.py \
resources/engine_manifest_assets/update_infos.json \
"${DOWNLOAD_RESOURCE_PATH}/engine/engine_manifest_assets/update_infos.json" \
resources/engine_manifest_assets/update_infos.json
Expand Down