-
-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (38 loc) · 1.18 KB
/
rust.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
name: Rust
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
RUSTFLAGS: "-Dwarnings"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install Rust toolchain
id: toolchain
uses: dtolnay/[email protected]
with:
components: clippy, rustfmt
- name: Check formatting
run: cargo fmt --check
- name: Install dependencies
run: sudo apt update && sudo apt install libopencv-dev libxinerama-dev libxcursor-dev xorg-dev libgl1 libgl1-mesa-dev libudev-dev clang libclang-dev libasound2-dev
- name: Cache cargo dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}-rust-${{ steps.toolchain.outputs.cachekey }}
- name: Clippy
run: cargo clippy
- name: Clippy WebUI with visualizer enabled
run: cargo clippy -p rustmas-webui --features visualizer
- name: Test
run: cargo test -p lightfx