| 1 | on: |
| 2 | push: |
| 3 | branches: |
| 4 | - main |
| 5 | pull_request: |
| 6 | |
| 7 | name: lints |
| 8 | |
| 9 | jobs: |
| 10 | rustfmt: |
| 11 | name: rustfmt |
| 12 | runs-on: ubuntu-latest |
| 13 | steps: |
| 14 | - name: Checkout sources |
| 15 | uses: actions/checkout@v2 |
| 16 | |
| 17 | - name: Install nightly toolchain |
| 18 | uses: actions-rs/toolchain@v1 |
| 19 | with: |
| 20 | profile: minimal |
| 21 | toolchain: nightly |
| 22 | override: true |
| 23 | components: rustfmt |
| 24 | |
| 25 | - name: Run cargo fmt |
| 26 | uses: actions-rs/cargo@v1 |
| 27 | with: |
| 28 | command: fmt |
| 29 | args: --all -- --check |
| 30 | clippy: |
| 31 | name: clippy |
| 32 | runs-on: ubuntu-latest |
| 33 | strategy: |
| 34 | matrix: |
| 35 | features: |
| 36 | - |
| 37 | - --features unstable-512-bit-simd |
| 38 | - --features serde |
| 39 | steps: |
| 40 | - name: Checkout sources |
| 41 | uses: actions/checkout@v2 |
| 42 | |
| 43 | - name: Install nightly toolchain |
| 44 | uses: actions-rs/toolchain@v1 |
| 45 | with: |
| 46 | profile: minimal |
| 47 | toolchain: nightly |
| 48 | override: true |
| 49 | components: clippy |
| 50 | |
| 51 | - name: Run cargo clippy |
| 52 | uses: actions-rs/cargo@v1 |
| 53 | with: |
| 54 | command: clippy |
| 55 | args: ${{ matrix.features }} -- -D warnings |