Fix backend imports #115
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: build | |
| on: [pull_request, push] | |
| jobs: | |
| build: | |
| name: Build - ${{ matrix.platform.os-name }} | |
| strategy: | |
| matrix: | |
| platform: | |
| - os-name: linux-x86_64 | |
| runs-on: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| output-file: libwhisp_rs.so | |
| - os-name: linux-aarch64 | |
| runs-on: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| output-file: libwhisp_rs.so | |
| - os-name: windows-x86_64 | |
| runs-on: windows-2025 | |
| target: x86_64-pc-windows-msvc | |
| arch: x64 | |
| output-file: whisp_rs.dll | |
| - os-name: windows-aarch64 | |
| runs-on: windows-2025 | |
| target: aarch64-pc-windows-msvc | |
| arch: amd64_arm64 | |
| output-file: whisp_rs.dll | |
| - os-name: macos-x86_64 | |
| runs-on: macOS-13 | |
| target: x86_64-apple-darwin | |
| output-file: libwhisp_rs.dylib | |
| - os-name: macos-aarch64 | |
| runs-on: macOS-15 | |
| target: aarch64-apple-darwin | |
| output-file: libwhisp_rs.dylib | |
| runs-on: ${{ matrix.platform.runs-on }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.platform.target }} | |
| - name: Install ALSA library and headers on Linux | |
| if: runner.os == 'Linux' | |
| run: sudo apt-get update && sudo apt-get install -y libasound2-dev | |
| - name: Use Visual Studio developer shell on Windows | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: ${{ matrix.platform.arch }} | |
| - name: Build library | |
| run: "cargo build --release --target ${{ matrix.platform.target }}" | |
| - name: Capture build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform.os-name }} | |
| path: target/${{ matrix.platform.target }}/release/${{ matrix.platform.output-file }} |