name: CI on: push: branches: [main] pull_request: env: CARGO_TERM_COLOR: always jobs: gate: name: Gate (Linux) runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable with: # Pinned: the MSRV the workspace declares. toolchain: "1.96" components: rustfmt, clippy - uses: Swatinem/rust-cache@v2.9.1 # libmpv for pstr-player. - name: Install libmpv run: | sudo apt-get update sudo apt-get install -y libmpv-dev - run: cargo fmt --all -- --check - run: cargo clippy --workspace --all-targets -- -D warnings - run: cargo test --workspace --locked # The Windows artifacts are cross-compiled from Linux with mingw-w64 — see # scripts/build-windows.sh — so this checks the target that actually ships. # It is a compile check, not a test run: nothing here executes a Windows # binary. libmpv is not linked at build time by anything but `-l mpv`, which # is why the import library out of the mpv-dev archive is all it needs. windows-cross: name: Gate (Windows cross) runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v7 - uses: dtolnay/rust-toolchain@stable with: toolchain: "1.96" components: clippy targets: x86_64-pc-windows-gnu - uses: Swatinem/rust-cache@v2.9.1 - name: Install the cross toolchain run: | sudo apt-get update sudo apt-get install -y mingw-w64 p7zip-full - name: Fetch libmpv's Windows development files env: GITHUB_TOKEN: ${{ github.token }} run: scripts/build-windows.sh --fetch-mpv mpv - name: clippy (x86_64-pc-windows-gnu) run: | RUSTFLAGS="-L native=$PWD/dist/mpv-dev" \ cargo clippy --workspace --all-targets \ --target x86_64-pc-windows-gnu -- -D warnings