|
68 | 68 | shared-key: "desktop"
|
69 | 69 | save-if: ${{ github.ref == 'refs/heads/master' }}
|
70 | 70 |
|
71 |
| - - name: Check formatting |
72 |
| - if: runner.os == 'Linux' |
73 |
| - run: cargo fmt --all -- --check |
74 |
| - |
75 |
| - - name: Check clippy |
76 |
| - # not critical on other platforms, and slows down Windows |
77 |
| - if: runner.os == 'Linux' |
78 |
| - # Don't fail the build for clippy on nightly, since we get a lot of false-positives |
79 |
| - run: cargo clippy --all --all-features --tests ${{ (matrix.rust_version != 'nightly' && '-- -D warnings') || '' }} |
80 |
| - |
81 |
| - - name: Check licensing and duplicates in used crates |
82 |
| - if: ${{ runner.os == 'Linux' && matrix.rust_version == 'stable' }} |
83 |
| - uses: EmbarkStudios/cargo-deny-action@v1 |
84 |
| - |
85 |
| - - name: Check documentation |
86 |
| - if: runner.os == 'Linux' |
87 |
| - run: cargo doc --no-deps --all-features |
88 |
| - env: |
89 |
| - RUSTDOCFLAGS: -D warnings |
90 |
| - |
91 | 71 | - name: Install cargo nextest
|
92 | 72 | uses: taiki-e/install-action@v2
|
93 | 73 | with:
|
@@ -116,6 +96,47 @@ jobs:
|
116 | 96 | tests*/**/*.actual*.png
|
117 | 97 | tests*/**/*.difference*.png
|
118 | 98 |
|
| 99 | + lints: |
| 100 | + needs: changes |
| 101 | + if: needs.changes.outputs.should_run== 'true' |
| 102 | + name: Lints with Rust ${{ matrix.rust_version }} |
| 103 | + runs-on: ubuntu-22.04 |
| 104 | + continue-on-error: ${{ matrix.rust_version == 'nightly' || matrix.rust_version == 'beta' }} |
| 105 | + strategy: |
| 106 | + fail-fast: false |
| 107 | + matrix: |
| 108 | + rust_version: [stable, beta, nightly] |
| 109 | + |
| 110 | + steps: |
| 111 | + - uses: actions/checkout@v4 |
| 112 | + |
| 113 | + - name: Install Rust toolchain |
| 114 | + uses: dtolnay/rust-toolchain@stable |
| 115 | + with: |
| 116 | + toolchain: ${{ matrix.rust_version }} |
| 117 | + components: rustfmt, clippy |
| 118 | + |
| 119 | + - name: Install Linux dependencies |
| 120 | + run: | |
| 121 | + sudo apt-get update |
| 122 | + sudo apt install -y libasound2-dev libxcb-shape0-dev libxcb-xfixes0-dev libgtk-3-dev mesa-vulkan-drivers libpango1.0-dev |
| 123 | +
|
| 124 | + - name: Check formatting |
| 125 | + run: cargo fmt --all -- --check |
| 126 | + |
| 127 | + - name: Check clippy |
| 128 | + # Don't fail the build for clippy on nightly, since we get a lot of false-positives |
| 129 | + run: cargo clippy --all --all-features --tests ${{ (matrix.rust_version != 'nightly' && '-- -D warnings') || '' }} |
| 130 | + |
| 131 | + - name: Check licensing and duplicates in used crates |
| 132 | + if: ${{ matrix.rust_version == 'stable' }} |
| 133 | + uses: EmbarkStudios/cargo-deny-action@v1 |
| 134 | + |
| 135 | + - name: Check documentation |
| 136 | + run: cargo doc --no-deps --all-features |
| 137 | + env: |
| 138 | + RUSTDOCFLAGS: -D warnings |
| 139 | + |
119 | 140 | check-required:
|
120 | 141 | needs: changes
|
121 | 142 | if: needs.changes.outputs.should_run == 'false'
|
|
0 commit comments