Repository navigation
build(linux): the AppImage carries the metainfo, validated in the Rus… #142
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: Rust | |
| # src-tauri gets no other PR gate, because Rust and the packaging data only matter in a release build. | |
| # Path-filtered because the Tauri dependency compile is too heavy for pure-frontend PRs. | |
| on: | |
| pull_request: | |
| branches: [main, prod] | |
| paths: ['src-tauri/**', '.github/workflows/rust.yml'] | |
| push: | |
| branches: [main, prod] | |
| paths: ['src-tauri/**', '.github/workflows/rust.yml'] | |
| defaults: | |
| run: | |
| working-directory: ./src-tauri | |
| jobs: | |
| # Nothing in the release build validates the metainfo, so this job is its only gate. | |
| metainfo: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - run: sudo apt-get update && sudo apt-get install -y appstream | |
| - run: appstreamcli validate --no-net packaging/linux/de.u8array.zplab.metainfo.xml | |
| # rustfmt parses without compiling, so one run covers every matrix platform. | |
| fmt: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| - run: cargo fmt --all --check | |
| clippy-test: | |
| name: clippy-test (${{ matrix.platform }}) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # Windows covers the winspool RAW path (#[cfg(windows)] in print.rs); | |
| # Linux covers the libcups + Secret Service + USB ioctl paths; macOS | |
| # covers the nusb/IOKit USB transport (#[cfg(target_os = "macos")]). | |
| # ubuntu-22.04 matches the release runner in release.yml. | |
| platform: [ubuntu-22.04, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: install dependencies (ubuntu only) | |
| if: startsWith(matrix.platform, 'ubuntu') | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev libcups2-dev libdbus-1-dev | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - uses: swatinem/rust-cache@v2 | |
| with: | |
| workspaces: './src-tauri -> target' | |
| - run: cargo clippy --all-targets -- -D warnings | |
| - run: cargo test |