diff --git a/.github/workflows/CI.Dockerfile b/.github/workflows/build.Dockerfile similarity index 100% rename from .github/workflows/CI.Dockerfile rename to .github/workflows/build.Dockerfile diff --git a/.github/workflows/CI.yml b/.github/workflows/build.yml similarity index 98% rename from .github/workflows/CI.yml rename to .github/workflows/build.yml index 5ee7808..67d99f5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: CI +name: Build on: push: @@ -6,7 +6,6 @@ on: - main tags: - '*' - pull_request: workflow_dispatch: permissions: @@ -29,7 +28,7 @@ jobs: - uses: actions/setup-python@v5 with: python-version: 3.x - - run: docker build . -f .github/workflows/CI.Dockerfile --tag ci + - run: docker build . -f .github/workflows/build.Dockerfile --tag ci - name: Build wheels uses: PyO3/maturin-action@v1 with: @@ -111,6 +110,7 @@ jobs: with: name: wheels-sdist path: ./crates/sbv2_bindings/dist + python-wheel: name: Wheel Upload runs-on: ubuntu-latest diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..43dc71b --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,31 @@ +name: Lint + +on: + pull_request: + +jobs: + check: + runs-on: ${{ matrix.machine.runner }} + strategy: + fail-fast: false + matrix: + machine: + - platform: amd64 + runner: ubuntu-latest + - platform: arm64 + runner: ubuntu-24.04-arm + components: + - rustfmt + - clippy + steps: + - name: Setup + uses: actions/checkout@v4 + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: ${{ matrix.components }} + - name: Format + if: ${{ matrix.components == 'rustfmt' }} + run: cargo fmt --all -- --check + - name: Lint + if: ${{ matrix.components == 'clippy' }} + run: cargo clippy --all-targets --all-features -- -D warnings \ No newline at end of file diff --git a/crates/sbv2_bindings/src/sbv2.rs b/crates/sbv2_bindings/src/sbv2.rs index 3bcb2ea..89089de 100644 --- a/crates/sbv2_bindings/src/sbv2.rs +++ b/crates/sbv2_bindings/src/sbv2.rs @@ -136,6 +136,7 @@ impl TTSModel { /// ------- /// voice_data : bytes /// 音声データ + #[allow(clippy::too_many_arguments)] fn synthesize<'p>( &'p mut self, py: Python<'p>, diff --git a/crates/sbv2_core/src/model.rs b/crates/sbv2_core/src/model.rs index 02a26fd..f0930d5 100644 --- a/crates/sbv2_core/src/model.rs +++ b/crates/sbv2_core/src/model.rs @@ -21,10 +21,7 @@ pub fn load_model>(model_file: P, bert: bool) -> Result #[cfg(feature = "cuda")] { #[allow(unused_mut)] - let mut cuda = ort::execution_providers::CUDAExecutionProvider::default() - .with_conv_algorithm_search( - ort::execution_providers::cuda::CUDAExecutionProviderCuDNNConvAlgoSearch::Default, - ); + let mut cuda = ort::execution_providers::CUDAExecutionProvider::default(); #[cfg(feature = "cuda_tf32")] { cuda = cuda.with_tf32(true); diff --git a/crates/sbv2_core/src/tts.rs b/crates/sbv2_core/src/tts.rs index 83d8c1a..eb6b3b7 100644 --- a/crates/sbv2_core/src/tts.rs +++ b/crates/sbv2_core/src/tts.rs @@ -214,6 +214,7 @@ impl TTSModelHolder { ) } + #[allow(clippy::type_complexity)] pub fn parse_text_neo( &mut self, text: String,