release: 3.22.2 #954
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: Check project | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| jobs: | |
| clippy: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - kind: default-features | |
| features: default | |
| - kind: full-features | |
| features: full | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v3 | |
| - name: Fix apt mirrors and install dependencies | |
| run: | | |
| # Fix broken apt mirrors | |
| sudo sed -i 's/archive.ubuntu.com/security.ubuntu.com/g' /etc/apt/sources.list | |
| sudo sed -i 's/azure.archive.ubuntu.com/security.ubuntu.com/g' /etc/apt/sources.list | |
| sudo apt-get update | |
| # Install required dependencies | |
| sudo apt-get install -y libfontconfig1-dev libfreetype-dev libpng-dev | |
| - name: Install stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy | |
| - name: Cache dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run clippy | |
| env: | |
| RUSTFLAGS: -D warnings | |
| run: cargo clippy --workspace --features ${{ matrix.features }} --all-targets --no-deps | |
| rustfmt: | |
| name: Format | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v3 | |
| - name: Install nightly toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt | |
| toolchain: nightly | |
| - name: Check code formatting | |
| run: cargo fmt --all -- --check |