Add text chunking for long input and integration tests #37
This file contains hidden or 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
| name: CI | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| name: Linux x86_64 (tch) | |
| backend: tch | |
| libtorch-url: https://github.com/second-state/libtorch-releases/releases/download/v2.7.1/libtorch-cxx11-abi-x86_64-2.7.1.tar.gz | |
| - os: ubuntu-24.04-arm | |
| name: Linux ARM64 (tch) | |
| backend: tch | |
| libtorch-url: https://github.com/second-state/libtorch-releases/releases/download/v2.7.1/libtorch-cxx11-abi-aarch64-2.7.1.tar.gz | |
| - os: macos-latest | |
| name: macOS ARM64 (MLX) | |
| backend: mlx | |
| runs-on: ${{ matrix.os }} | |
| name: Build (${{ matrix.name }}) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Init MLX submodule | |
| if: matrix.backend == 'mlx' | |
| run: git submodule update --init --recursive | |
| - name: Install build dependencies (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install automake autoconf libtool | |
| - name: Delete Cargo.lock | |
| run: rm -f Cargo.lock | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Download libtorch | |
| if: matrix.backend == 'tch' | |
| run: | | |
| curl -Lo libtorch.tar.gz "${{ matrix.libtorch-url }}" | |
| tar xzf libtorch.tar.gz | |
| - name: Set linker rpath-link (Linux only) | |
| if: runner.os == 'Linux' && matrix.backend == 'tch' | |
| run: echo "RUSTFLAGS=-C link-arg=-Wl,-rpath-link,${{ github.workspace }}/libtorch/lib" >> "$GITHUB_ENV" | |
| - name: Build (tch) | |
| if: matrix.backend == 'tch' | |
| env: | |
| LIBTORCH: ${{ github.workspace }}/libtorch | |
| LIBTORCH_BYPASS_VERSION_CHECK: "1" | |
| run: cargo build --release | |
| - name: Build (MLX) | |
| if: matrix.backend == 'mlx' | |
| run: cargo build --release --no-default-features --features mlx | |
| - name: Run unit tests (tch) | |
| if: matrix.backend == 'tch' | |
| env: | |
| LIBTORCH: ${{ github.workspace }}/libtorch | |
| LIBTORCH_BYPASS_VERSION_CHECK: "1" | |
| run: cargo test --release | |
| - name: Run unit tests (MLX) | |
| if: matrix.backend == 'mlx' | |
| run: cargo test --release --no-default-features --features mlx | |
| - name: Smoke test - CLI prints help | |
| run: ./target/release/voxtral-tts --help | |
| - name: Smoke test - server prints help | |
| run: ./target/release/voxtral-tts-server --help | |
| - name: Upload binaries | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: voxtral-tts-${{ matrix.os }}-${{ runner.arch }}-${{ matrix.backend }} | |
| path: | | |
| target/release/voxtral-tts | |
| target/release/voxtral-tts-server |