-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (48 loc) · 1.27 KB
/
build.yml
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
name: Rust Check, Build & Test
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check:
name: Check format & run linter
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy
- name: Install Dependencies
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
- name: Check format
run: cargo fmt --all -- --check
- name: Run clippy
run: cargo clippy -- -D warnings
build:
name: Build & Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Install Dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y libasound2-dev
- name: Check
run: cargo build --verbose
- name: Test
run: cargo test --verbose