-
Notifications
You must be signed in to change notification settings - Fork 19
66 lines (55 loc) · 1.82 KB
/
run-clippy-and-test.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Run Clippy and test
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
FEATURES: xq-audio,discord-presence,debug-views,log,pu-checks,gdb-server,dldi
MACOSX_DEPLOYMENT_TARGET: 10.11
jobs:
run-clippy-and-test:
name: Run Clippy and test
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: clippy
- name: Cache dependencies and build directory
uses: actions/cache@v2
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target/
key: ${{ matrix.os }}-clippy
- name: Install GTK and ALSA
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install libgtk-3-dev libasound2-dev
- name: Run clippy (no default features)
uses: actions-rs/clippy-check@v1
with:
name: Run clippy (${{ matrix.os }}, no default features)
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features --package dust-desktop
- name: Run clippy (all features)
uses: actions-rs/clippy-check@v1
with:
name: Run clippy (${{ matrix.os }}, all features)
token: ${{ secrets.GITHUB_TOKEN }}
args: --no-default-features --features=${{ env.FEATURES }} --package dust-desktop
- name: Run tests (no default features)
run: cargo test --verbose --no-default-features --package dust-desktop
- name: Run tests (all features)
run: cargo test --verbose --features=${{ env.FEATURES }} --package dust-desktop