Repository navigation
Expand file tree
/
Copy pathtest-package-rust-transcription.yml
More file actions
88 lines (77 loc) · 2.86 KB
/
Copy pathtest-package-rust-transcription.yml
File metadata and controls
88 lines (77 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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