Skip to content

Commit f650ef9

Browse files
authored
Enhance Rust CI workflow with additional steps
Updated the CI workflow to include additional steps for installing system dependencies, setting up the Rust toolchain, caching Cargo, and running formatting and linting checks.
1 parent 50493f2 commit f650ef9

1 file changed

Lines changed: 49 additions & 0 deletions

File tree

‎.github/workflows/rust.yml‎

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Rust CI (build, lint, test)
2+
3+
on:
4+
push:
5+
branches: [ stage, main ]
6+
pull_request:
7+
branches: [ stage, main ]
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v4
16+
17+
- name: Install system dependencies (GTK, ALSA, PipeWire, WirePlumber)
18+
run: |
19+
sudo apt-get update -y
20+
sudo apt-get install -y build-essential pkg-config libglib2.0-dev libgtk-3-dev libasound2-dev libpipewire-0.3-dev pipewire wireplumber
21+
22+
- name: Set up Rust toolchain
23+
uses: actions/setup-rust@v1
24+
with:
25+
rust-version: stable
26+
27+
- name: Cache Cargo and target
28+
uses: actions/cache@v4
29+
with:
30+
path: |
31+
~/.cargo/registry
32+
~/.cargo/git
33+
target
34+
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
35+
restore-keys: |
36+
${{ runner.os }}-cargo-
37+
38+
- name: cargo fmt check
39+
run: cargo fmt --all -- --check
40+
41+
- name: cargo clippy (deny warnings)
42+
run: cargo clippy --all-targets --all-features -- -D warnings
43+
44+
- name: Run tests (PipeWire integration disabled by default)
45+
env:
46+
CI: "true"
47+
GITHUB_ACTIONS: "true"
48+
RUN_PIPEWIRE_INTEGRATION: "false"
49+
run: cargo test --workspace --all-features --verbose

0 commit comments

Comments
 (0)