-
Notifications
You must be signed in to change notification settings - Fork 41
133 lines (131 loc) · 4.33 KB
/
ci.yaml
File metadata and controls
133 lines (131 loc) · 4.33 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
on: [push, pull_request]
name: CI
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
RUSTDOCFLAGS: -D warnings
PKG_CONFIG_PATH: /usr/lib/pkgconfig
jobs:
Features:
runs-on: ubuntu-latest
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y alsa pkg-config libasound2-dev
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
- name: Check no features
run: cargo check --all-targets --no-default-features
- name: Check listen feature
run: cargo check --all-targets --no-default-features --features=listen
- name: Check speak feature
run: cargo check --all-targets --no-default-features --features=speak
- name: Check manage feature
run: cargo check --all-targets --no-default-features --features=manage
Build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y alsa pkg-config libasound2-dev
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
- name: Cargo Build
run: cargo build --all-targets --all-features
Clippy:
runs-on: ubuntu-latest
steps:
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y alsa pkg-config libasound2-dev
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
- name: Cargo Clippy
run: cargo clippy --all-targets --all-features
Test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y alsa pkg-config libasound2-dev
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
- name: Cargo Test
run: cargo test --all --all-features
Format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Cargo Fmt
run: cargo fmt --check --all
Documentation:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y alsa pkg-config libasound2-dev
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
- name: Cargo Doc
run: cargo doc --workspace --all-features
Audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: sudo apt-get update
- name: Install cargo-audit
run: cargo install --locked cargo-audit
- name: Remove Dev Dependencies
run: |
cargo install --locked cargo-hack
cargo hack --remove-dev-deps
cargo generate-lockfile
- name: Cargo Audit
run: cargo audit
Minimal-Versions:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y alsa pkg-config libasound2-dev
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
- name: Install Rust Nightly
run: rustup toolchain install nightly
- name: Cargo Build
run: rustup run nightly cargo build --all-targets --all-features -Z minimal-versions
- name: Cargo Test
run: rustup run nightly cargo test --all --all-features -Z minimal-versions
- name: Remove Dev Dependencies
run: |
cargo install --locked cargo-hack
cargo hack --remove-dev-deps
rustup run nightly cargo generate-lockfile -Z minimal-versions
- name: Cargo Build Without Dev Dependencies
run: rustup run nightly cargo build --all-features -Z minimal-versions
SemVer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y alsa pkg-config libasound2-dev
export PKG_CONFIG_PATH=/usr/lib/pkgconfig:$PKG_CONFIG_PATH
- name: Install cargo-semver-checks
run: cargo install --locked cargo-semver-checks
- name: Cargo SemVer Checks
run: cargo semver-checks check-release --verbose