Skip to content

download page

download page #1

name: Test Package Rust Transcription
on:
push:
branches:
- main
paths:
- "packages/rust_transcription/**"
- ".github/workflows/test-package-rust-transcription.yml"
pull_request:
branches:
- main
paths:
- "packages/rust_transcription/**"
- ".github/workflows/test-package-rust-transcription.yml"
workflow_dispatch:
jobs:
integration-tests:
name: Rust Transcription Integration Tests (${{ matrix.label }})
runs-on: ${{ matrix.os }}
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- label: Ubuntu
os: ubuntu-latest
- label: Windows
os: windows-latest
- label: macOS
os: macos-latest
permissions:
contents: read
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache cargo
uses: Swatinem/rust-cache@v2
with:
workspaces: |
packages/rust_transcription -> packages/rust_transcription/target
- name: Install system dependencies (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y \
build-essential \
cmake \
pkg-config \
clang \
libclang-dev
- name: Install system dependencies (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
choco install -y llvm --no-progress
"LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $env:GITHUB_ENV
"CLANG_PATH=C:\Program Files\LLVM\bin\clang.exe" >> $env:GITHUB_ENV
"C:\Program Files\LLVM\bin" >> $env:GITHUB_PATH
- name: Configure whisper build flags (Linux)
if: matrix.os == 'ubuntu-latest'
run: |
echo "CMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/packages/rust_transcription/cmake/linux-ci-toolchain.cmake" >> "$GITHUB_ENV"
- name: Configure whisper build flags (macOS)
if: matrix.os == 'macos-latest'
run: |
echo "CMAKE_TOOLCHAIN_FILE=${GITHUB_WORKSPACE}/packages/rust_transcription/cmake/macos-ci-toolchain.cmake" >> "$GITHUB_ENV"
- name: Configure whisper build flags (Windows)
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
echo "CMAKE_TOOLCHAIN_FILE=$env:GITHUB_WORKSPACE\packages\rust_transcription\cmake\windows-ci-toolchain.cmake" >> $env:GITHUB_ENV
- name: Run non-ignored integration tests
run: cargo test --manifest-path packages/rust_transcription/Cargo.toml --test sidecar_integration -- --nocapture
- name: Run ignored end-to-end integration tests
run: cargo test --manifest-path packages/rust_transcription/Cargo.toml --test sidecar_integration -- --ignored --nocapture