-
Notifications
You must be signed in to change notification settings - Fork 2
125 lines (105 loc) · 4.01 KB
/
Copy pathci.yml
File metadata and controls
125 lines (105 loc) · 4.01 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
name: CI
on:
# Every branch, not just master/main — feature branches (helix_floor, …) are where the
# work actually happens, and a check that never runs is a check that doesn't exist.
push:
branches: ['**']
pull_request:
env:
CARGO_TERM_COLOR: always
# The offline crates. The GUI (fretwire-tauri) needs WebKitGTK + a built frontend, so it
# gets its own job below.
jobs:
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --all --check
build-test:
name: build & test (offline crates)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- name: Install Rust toolchain with Clippy
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Rust toolchain info
run: rustc --version && cargo --version
# NB: the -p flags must come *before* the `--`; everything after it goes to the
# clippy driver, where `-p` is not a valid option.
- name: Clippy check
run: >
cargo clippy --locked --all-targets
-p fretwire -p fretwire-data -p fretwire-protocol
-p fretwire-usb -p fretwire-core -p fretwire-cli
-- -D warnings
- name: Build
run: >
cargo build --locked --verbose
-p fretwire -p fretwire-data -p fretwire-protocol
-p fretwire-usb -p fretwire-core -p fretwire-cli
- name: Test
run: >
cargo test --locked --verbose
-p fretwire -p fretwire-data -p fretwire-protocol
-p fretwire-usb -p fretwire-core -p fretwire-cli
gui:
name: build & test (GUI)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# WebKitGTK and a C toolchain: what the *-sys crates in the GUI's tree need to link.
- name: System dependencies
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
build-essential pkg-config libwebkit2gtk-4.1-dev
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-node@v5
with:
node-version: 20
cache: npm
cache-dependency-path: crates/fretwire-tauri/ui/package-lock.json
# The crate embeds ./dist at compile time via generate_context! and dist/ isn't in
# git, so the frontend has to exist before clippy can even expand the macro.
- name: Build the frontend
working-directory: crates/fretwire-tauri/ui
run: |
npm ci
npm run build
# The mock backend mirrors `settings::SETTINGS` and the DTO shape by hand, so it goes stale
# silently. These are plain node, no runner, and they caught nothing between 9dc105b and
# 2026-08-24 because nothing ran them.
- name: Test the frontend contract
working-directory: crates/fretwire-tauri/ui
run: npm test
- name: Clippy check
run: cargo clippy --locked --all-targets -p fretwire-tauri -- -D warnings
# fretwire-tauri is out of `default-members`, so the root job's `cargo test` never builds it
# and its DTO tests went unrun. They need dist/, which the frontend build above provides.
- name: Test
run: cargo test --locked --verbose -p fretwire-tauri
mcp:
name: build & test (MCP server)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
# fretwire-mcp is out of `default-members` (it pulls the MCP SDK's tree), so the root job
# never builds it. No system deps: stdio only, pure-Rust USB.
- name: Clippy check
run: cargo clippy --locked --all-targets -p fretwire-mcp -- -D warnings
- name: Test
run: cargo test --locked --verbose -p fretwire-mcp