name: CI on: push: branches: [main, master] pull_request: env: CARGO_TERM_COLOR: always RUSTFLAGS: -D warnings jobs: # Fast gate: the dependency-light shared model. No system deps, runs in # seconds — fails the PR early on a model regression before the heavy engine # build even starts. model: name: sigil-model (fmt + clippy + test) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - run: cargo fmt --all -- --check - run: cargo fmt --manifest-path sigil-gui/Cargo.toml -- --check - run: cargo clippy -p sigil-model --all-targets - run: cargo test -p sigil-model # The engine + launcher need nannou/cpal/wgpu system headers to compile. # No GPU/display on the runner, so we build + clippy but do not run the # live/render binaries (only `sigil-model` has runnable tests). build: name: engine + launcher (clippy + build) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: components: clippy - uses: Swatinem/rust-cache@v2 - name: Install system deps (cpal/ALSA, nannou/winit/wgpu) run: | sudo apt-get update sudo apt-get install -y --no-install-recommends \ libasound2-dev libudev-dev pkg-config \ libxkbcommon-dev libwayland-dev libxcursor-dev libxrandr-dev \ libxi-dev libx11-dev libgl1-mesa-dev - run: cargo clippy --workspace --all-targets - run: cargo build --workspace # The launcher is its own workspace (see the root Cargo.toml). - run: cargo clippy --manifest-path sigil-gui/Cargo.toml --all-targets - run: cargo test --manifest-path sigil-gui/Cargo.toml # Engine analysis tests are CPU-only (no GPU/display) — safe to run here. - run: cargo test -p audio-visualizer --lib # sigil-vocals' tests cover the STFT and chunking; ONNX Runtime is only # loaded when a model runs, so none is needed here. - run: cargo test -p sigil-vocals # Mirrors the documented Windows cross-build flow for `sigil` / `sigil-gui`. windows-cross: name: windows cross-build (x86_64-pc-windows-gnu) runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: dtolnay/rust-toolchain@stable with: targets: x86_64-pc-windows-gnu - uses: Swatinem/rust-cache@v2 - name: Install mingw-w64 run: | sudo apt-get update sudo apt-get install -y --no-install-recommends gcc-mingw-w64-x86-64 - name: Cross-build the launcher run: cargo build --manifest-path sigil-gui/Cargo.toml --target-dir target --release --target x86_64-pc-windows-gnu - name: Cross-build sigil-vocals run: cargo build -p sigil-vocals --release --target x86_64-pc-windows-gnu