fix: number the preset listing by position, not by its stored key #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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: clippy (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 | |
| - name: Clippy check | |
| run: cargo clippy --locked --all-targets -p fretwire-tauri -- -D warnings |