-
Notifications
You must be signed in to change notification settings - Fork 66
34 lines (31 loc) · 1.1 KB
/
Copy pathrun-tests.yml
File metadata and controls
34 lines (31 loc) · 1.1 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
name: Run Tests
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: ['1.86.0', '1.95.0']
feature: ['none', 'cpal', 'mp3', 'all']
steps:
- uses: actions/checkout@v4
- name: install cpal dependencies
run: |
sudo apt-get update
sudo apt-get install libasound2-dev libdbus-1-dev pkg-config
- name: install toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
- name: cache
uses: Swatinem/rust-cache@v2
with:
shared-key: desktop-${{ matrix.toolchain }}
- name: run tests (desktop - ${{ (matrix.feature == 'all' && 'all features') || (matrix.feature == 'none' && 'no feature' || matrix.feature) }})
run: >
cargo test
--package kira
${{ ( matrix.feature == 'all' ) && '--all-features' || '--no-default-features --lib' }}
${{ ( matrix.feature != 'all' && matrix.feature != 'none' ) && format('--features={0}', matrix.feature) || '' }}