v0.1.5 release #6
Workflow file for this run
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: Release | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: ubuntu-latest | |
| name: Linux x86_64 | |
| backend: tch | |
| asset-name: asr-linux-x86_64 | |
| libtorch-url: https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.7.1%2Bcpu.zip | |
| libtorch-archive: libtorch.zip | |
| - os: ubuntu-latest | |
| name: Linux x86_64 (CUDA) | |
| backend: tch | |
| asset-name: asr-linux-x86_64-cuda | |
| libtorch-url: https://download.pytorch.org/libtorch/cu128/libtorch-cxx11-abi-shared-with-deps-2.7.1%2Bcu128.zip | |
| libtorch-archive: libtorch.zip | |
| - os: ubuntu-24.04-arm | |
| name: Linux ARM64 | |
| backend: tch | |
| asset-name: asr-linux-aarch64 | |
| libtorch-url: https://github.com/second-state/libtorch-releases/releases/download/v2.7.1/libtorch-cxx11-abi-aarch64-2.7.1.tar.gz | |
| libtorch-archive: libtorch.tar.gz | |
| - os: macos-latest | |
| name: macOS ARM64 | |
| backend: mlx | |
| asset-name: asr-macos-aarch64 | |
| runs-on: ${{ matrix.os }} | |
| name: Build (${{ matrix.name }}) | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| if: matrix.backend == 'tch' | |
| - uses: actions/checkout@v4 | |
| if: matrix.backend == 'mlx' | |
| with: | |
| submodules: recursive | |
| - name: Install build tools (Linux) | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y nasm pkg-config | |
| - name: Install Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache cargo registry | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| key: ${{ runner.os }}-${{ runner.arch }}-${{ matrix.backend }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ runner.arch }}-${{ matrix.backend }}-cargo-registry- | |
| - name: Download libtorch | |
| if: matrix.backend == 'tch' | |
| run: curl -Lo ${{ matrix.libtorch-archive }} "${{ matrix.libtorch-url }}" | |
| - name: Extract libtorch | |
| if: matrix.backend == 'tch' | |
| run: | | |
| if [[ "${{ matrix.libtorch-archive }}" == *.zip ]]; then | |
| unzip -q ${{ matrix.libtorch-archive }} | |
| else | |
| tar xzf ${{ matrix.libtorch-archive }} | |
| fi | |
| - name: Set linker rpath-link (Linux only) | |
| if: matrix.backend == 'tch' && runner.os == 'Linux' | |
| 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 --features build-ffmpeg | |
| - name: Build (mlx) | |
| if: matrix.backend == 'mlx' | |
| run: cargo build --release --no-default-features --features mlx,build-ffmpeg | |
| - name: Package binary | |
| run: | | |
| mkdir ${{ matrix.asset-name }} | |
| cp target/release/asr ${{ matrix.asset-name }}/asr | |
| if [ "${{ matrix.backend }}" = "mlx" ]; then | |
| cp target/release/build/qwen3_asr-*/out/lib/mlx.metallib ${{ matrix.asset-name }}/ | |
| fi | |
| zip -r ${{ matrix.asset-name }}.zip ${{ matrix.asset-name }} | |
| - name: Upload release asset | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh release upload "${{ github.event.release.tag_name }}" "${{ matrix.asset-name }}.zip" |