From b148c94965087af01657838ae2597b5b072fc3f7 Mon Sep 17 00:00:00 2001 From: Ryo Yamashita Date: Thu, 12 Oct 2023 14:07:41 +0900 Subject: [PATCH 1/3] =?UTF-8?q?Renovate=E3=81=AE=E8=A8=AD=E5=AE=9A?= =?UTF-8?q?=E3=82=92=E7=9B=B4=E3=81=99=20(#637)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- renovate.json | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/renovate.json b/renovate.json index 5888afc5d..3e6f4eae4 100644 --- a/renovate.json +++ b/renovate.json @@ -4,11 +4,22 @@ "config:recommended" ], "timezone": "Asia/Tokyo", - "schedule": [ - "before 1am" + "packageRules": [ + { + "groupSlug": "rust", + "groupName": "Rust", + "matchPackagePatterns": "^Rust$" + }, + { + "groupSlug": "others", + "groupName": "Others", + "excludePackagePatterns": "^Rust$", + "dependencyDashboardApproval": true + } ], - "regexManagers": [ + "customManagers": [ { + "customType": "regex", "fileMatch": [ "^rust-toolchain$" ], @@ -16,7 +27,7 @@ "(?\\d+\\.\\d+\\.\\d+)" ], "depNameTemplate": "Rust", - "lookupNameTemplate": "rust-lang/rust", + "packageNameTemplate": "rust-lang/rust", "datasourceTemplate": "github-releases" } ] From 6d3d634a2bdee92b13837068e225f4c5138976db Mon Sep 17 00:00:00 2001 From: Hiroshiba Date: Fri, 13 Oct 2023 01:50:39 +0900 Subject: [PATCH 2/3] =?UTF-8?q?Github=20Actions=E3=81=AEinputs=E3=81=AFboo?= =?UTF-8?q?lean=E3=81=8C=E6=AD=A3=E3=81=97=E3=81=8F=E3=81=AA=E3=82=8B?= =?UTF-8?q?=E3=81=AE=E3=81=A7=E4=BF=AE=E6=AD=A3=20(#638)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build_and_deploy.yml | 36 +++++++++---------- .../workflows/build_and_deploy_downloader.yml | 4 +-- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build_and_deploy.yml b/.github/workflows/build_and_deploy.yml index b08613161..0c3bb327a 100644 --- a/.github/workflows/build_and_deploy.yml +++ b/.github/workflows/build_and_deploy.yml @@ -184,7 +184,7 @@ jobs: build_and_deploy: needs: config - environment: ${{ inputs.is_production == 'true' && 'production' || '' }} # 製品版のenvironment + environment: ${{ inputs.is_production && 'production' || '' }} # 製品版のenvironment strategy: matrix: include: ${{ fromJson(needs.config.outputs.includes) }} @@ -193,14 +193,14 @@ jobs: ASSET_NAME: voicevox_core-${{ matrix.artifact_name }}-${{ needs.config.outputs.version }} steps: - uses: actions/checkout@v3 # 製品版ではない場合 - if: ${{ inputs.is_production != 'true' }} + if: ${{ !inputs.is_production }} - uses: actions/checkout@v3 # 製品版の場合 - if: ${{ inputs.is_production == 'true' }} + if: inputs.is_production with: fetch-depth: 0 # 全履歴取得 token: ${{ secrets.PRODUCTION_GITHUB_TOKEN }} - name: Merge production branch - if: inputs.is_production == 'true' + if: inputs.is_production shell: bash run: | ( @@ -233,21 +233,21 @@ jobs: echo "$ANDROID_NDK/toolchains/llvm/prebuilt/linux-x86_64/bin" >> "$GITHUB_PATH" echo "AR_${{ matrix.target }}=llvm-ar" >> "$GITHUB_ENV" - name: Checkout VOICEVOX RESOURCE - if: inputs.is_production == 'true' + if: inputs.is_production uses: actions/checkout@v3 with: repository: VOICEVOX/voicevox_resource ref: ${{ env.VOICEVOX_RESOURCE_VERSION }} path: download/resource - name: Checkout VOICEVOX FAT RESOURCE - if: inputs.is_production == 'true' + if: inputs.is_production uses: actions/checkout@v3 with: repository: VOICEVOX/voicevox_fat_resource ref: ${{ env.VOICEVOX_FAT_RESOURCE_VERSION }} path: download/fat_resource - name: Raplace resource - if: inputs.is_production == 'true' + if: inputs.is_production shell: bash run: | mv -f download/resource/core/README.md ./README.md @@ -262,14 +262,14 @@ jobs: if ${{ !!matrix.whl_local_version }}; then cargo set-version "$VERSION+"${{ matrix.whl_local_version }} -p voicevox_core_python_api; fi - name: cache target uses: Swatinem/rust-cache@v2 - if: inputs.is_production != 'true' + if: ${{ !inputs.is_production }} - name: build voicevox_core_c_api shell: bash run: | function build() { cargo build -p voicevox_core_c_api -vv --features ${{ matrix.features }}, --target ${{ matrix.target }} --release } - if ${{ inputs.is_production != 'true' }}; then + if ${{ !inputs.is_production }}; then build else build > /dev/null 2>&1 @@ -286,7 +286,7 @@ jobs: function build() { maturin build --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --features ${{ matrix.features }}, --target ${{ matrix.target }} --release } - if ${{ inputs.is_production != 'true' }}; then + if ${{ !inputs.is_production }}; then build else build > /dev/null 2>&1 @@ -300,7 +300,7 @@ jobs: function build() { cargo build -p voicevox_core_java_api -vv --features ${{ matrix.features }}, --target ${{ matrix.target }} --release } - if ${{ inputs.is_production != 'true' }}; then + if ${{ !inputs.is_production }}; then build else build > /dev/null 2>&1 @@ -321,7 +321,7 @@ jobs: mkdir java_artifact cp -v target/${{ matrix.target }}/release/libvoicevox_core_java_api.so java_artifact/ || true - name: Code signing (Windows) - if: startsWith(matrix.os, 'windows') && inputs.code_signing == 'true' + if: startsWith(matrix.os, 'windows') && inputs.code_signing run: | bash build_util/codesign.bash "artifact/${{ env.ASSET_NAME }}/voicevox_core.dll" env: @@ -339,7 +339,7 @@ jobs: cd artifact 7z a "../${{ env.ASSET_NAME }}.zip" "${{ env.ASSET_NAME }}" - name: Upload to Release - if: needs.config.outputs.deploy == 'true' && !contains(matrix.target, 'ios') + if: fromJson(needs.config.outputs.deploy) && !contains(matrix.target, 'ios') uses: softprops/action-gh-release@v1 with: prerelease: true @@ -348,7 +348,7 @@ jobs: ${{ env.ASSET_NAME }}.zip target_commitish: ${{ github.sha }} - name: Upload Python whl to Release - if: needs.config.outputs.deploy == 'true' && matrix.whl_local_version + if: fromJson(needs.config.outputs.deploy) && matrix.whl_local_version uses: softprops/action-gh-release@v1 with: prerelease: true @@ -357,7 +357,7 @@ jobs: ${{ steps.build-voicevox-core-python-api.outputs.whl }} target_commitish: ${{ github.sha }} - name: Upload voicevox_core_java_api artifact - if: needs.config.outputs.deploy == 'true' && contains(matrix.target, 'android') + if: fromJson(needs.config.outputs.deploy) && contains(matrix.target, 'android') uses: actions/upload-artifact@v3 with: name: voicevox_core_java_api-${{ matrix.artifact_name }} @@ -408,7 +408,7 @@ jobs: cd artifact/${{ env.ASSET_NAME }} 7z a "../../${{ env.ASSET_NAME }}.zip" "voicevox_core.xcframework" - name: Upload to Release - if: needs.config.outputs.deploy == 'true' + if: fromJson(needs.config.outputs.deploy) uses: softprops/action-gh-release@v1 with: prerelease: true @@ -482,7 +482,7 @@ jobs: zip -r /tmp/java_packages.zip . - name: Upload to Release - if: needs.config.outputs.deploy == 'true' + if: fromJson(needs.config.outputs.deploy) uses: softprops/action-gh-release@v1 with: prerelease: true @@ -493,7 +493,7 @@ jobs: download_test: needs: [config, build_and_deploy] - if: needs.config.outputs.deploy == 'true' + if: fromJson(needs.config.outputs.deploy) uses: ./.github/workflows/download_test.yml with: version: ${{ inputs.version }} diff --git a/.github/workflows/build_and_deploy_downloader.yml b/.github/workflows/build_and_deploy_downloader.yml index 690da5b84..3c636b73a 100644 --- a/.github/workflows/build_and_deploy_downloader.yml +++ b/.github/workflows/build_and_deploy_downloader.yml @@ -42,7 +42,7 @@ defaults: jobs: deploy_and_deploy_downloader: - environment: ${{ inputs.is_production == 'true' && 'production' || '' }} # コード署名用のenvironment + environment: ${{ inputs.is_production && 'production' || '' }} # コード署名用のenvironment strategy: matrix: include: @@ -94,7 +94,7 @@ jobs: mv $"target/${{ matrix.target }}/release/download$exe_suffix" ./${{ matrix.name }} - name: Code signing (Windows) - if: startsWith(matrix.os, 'windows') && inputs.code_signing == 'true' + if: startsWith(matrix.os, 'windows') && inputs.code_signing run: | bash build_util/codesign.bash ./${{ matrix.name }} env: From 76ce1fe9fc8fb1e8237e65c8f50b86630fbc2bcb Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 13 Oct 2023 01:54:08 +0900 Subject: [PATCH 3/3] Update dependency Rust to v1.73.0 (#639) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Ryo Yamashita --- crates/voicevox_core/src/voice_model.rs | 4 ++-- crates/voicevox_core_c_api/src/compatible_engine.rs | 4 ++-- crates/voicevox_core_python_api/src/lib.rs | 4 ++-- rust-toolchain | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/voicevox_core/src/voice_model.rs b/crates/voicevox_core/src/voice_model.rs index e17d862fc..8a86a4399 100644 --- a/crates/voicevox_core/src/voice_model.rs +++ b/crates/voicevox_core/src/voice_model.rs @@ -179,7 +179,7 @@ impl VvmEntryReader { } async fn read_vvm_entry(&self, filename: &str) -> LoadModelResult> { - (|| async { + async { let me = self .entry_map .get(filename) @@ -190,7 +190,7 @@ impl VvmEntryReader { .read_to_end_checked(&mut buf, &me.entry) .await?; Ok::<_, anyhow::Error>(buf) - })() + } .await .map_err(|source| LoadModelError { path: self.reader.path().to_owned(), diff --git a/crates/voicevox_core_c_api/src/compatible_engine.rs b/crates/voicevox_core_c_api/src/compatible_engine.rs index 92d007e94..64470c7bf 100644 --- a/crates/voicevox_core_c_api/src/compatible_engine.rs +++ b/crates/voicevox_core_c_api/src/compatible_engine.rs @@ -68,7 +68,7 @@ fn set_message(message: &str) { #[no_mangle] pub extern "C" fn initialize(use_gpu: bool, cpu_num_threads: c_int, load_all_models: bool) -> bool { - let result = RUNTIME.block_on((|| async { + let result = RUNTIME.block_on(async { let synthesizer = voicevox_core::Synthesizer::new_with_initialize( Arc::new(OpenJtalk::new_without_dic()), &voicevox_core::InitializeOptions { @@ -89,7 +89,7 @@ pub extern "C" fn initialize(use_gpu: bool, cpu_num_threads: c_int, load_all_mod } Ok::<_, voicevox_core::Error>(synthesizer) - })()); + }); match result { Ok(synthesizer) => { diff --git a/crates/voicevox_core_python_api/src/lib.rs b/crates/voicevox_core_python_api/src/lib.rs index 42d3feaeb..adabd09ae 100644 --- a/crates/voicevox_core_python_api/src/lib.rs +++ b/crates/voicevox_core_python_api/src/lib.rs @@ -283,7 +283,7 @@ impl Synthesizer { .iter() .map(|ap| to_pydantic_dataclass(ap, class)) .collect::>>(); - let list = PyList::new(py, accent_phrases.into_iter()); + let list = PyList::new(py, accent_phrases); Ok(list.to_object(py)) }) }, @@ -314,7 +314,7 @@ impl Synthesizer { .iter() .map(|ap| to_pydantic_dataclass(ap, class)) .collect::>>(); - let list = PyList::new(py, accent_phrases.into_iter()); + let list = PyList::new(py, accent_phrases); Ok(list.to_object(py)) }) }, diff --git a/rust-toolchain b/rust-toolchain index 68bc7ff2a..5e3a42566 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1 +1 @@ -1.71.1 +1.73.0