| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
permissions: |
| 9 |
contents: read |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
on: |
| 14 |
push: |
| 15 |
branches: [main] |
| 16 |
pull_request: |
| 17 |
|
| 18 |
|
| 19 |
concurrency: |
| 20 |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
| 21 |
cancel-in-progress: true |
| 22 |
name: check |
| 23 |
jobs: |
| 24 |
fmt: |
| 25 |
runs-on: ubuntu-latest |
| 26 |
name: stable / fmt |
| 27 |
steps: |
| 28 |
- uses: actions/checkout@v4 |
| 29 |
with: |
| 30 |
submodules: true |
| 31 |
- name: Install stable |
| 32 |
uses: dtolnay/rust-toolchain@stable |
| 33 |
with: |
| 34 |
components: rustfmt |
| 35 |
- name: cargo fmt --check |
| 36 |
run: cargo fmt --check |
| 37 |
clippy: |
| 38 |
runs-on: ubuntu-latest |
| 39 |
name: ${{ matrix.toolchain }} / clippy |
| 40 |
permissions: |
| 41 |
contents: read |
| 42 |
checks: write |
| 43 |
strategy: |
| 44 |
fail-fast: false |
| 45 |
matrix: |
| 46 |
|
| 47 |
toolchain: [stable, beta] |
| 48 |
steps: |
| 49 |
- uses: actions/checkout@v4 |
| 50 |
with: |
| 51 |
submodules: true |
| 52 |
- name: Install ${{ matrix.toolchain }} |
| 53 |
uses: dtolnay/rust-toolchain@master |
| 54 |
with: |
| 55 |
toolchain: ${{ matrix.toolchain }} |
| 56 |
components: clippy |
| 57 |
- name: cargo clippy |
| 58 |
uses: giraffate/clippy-action@v1 |
| 59 |
with: |
| 60 |
reporter: 'github-pr-check' |
| 61 |
github_token: ${{ secrets.GITHUB_TOKEN }} |
| 62 |
doc: |
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
runs-on: ubuntu-latest |
| 67 |
name: nightly / doc |
| 68 |
steps: |
| 69 |
- uses: actions/checkout@v4 |
| 70 |
with: |
| 71 |
submodules: true |
| 72 |
- name: Install nightly |
| 73 |
uses: dtolnay/rust-toolchain@nightly |
| 74 |
- name: cargo doc |
| 75 |
run: cargo doc --no-deps --all-features |
| 76 |
env: |
| 77 |
RUSTDOCFLAGS: --cfg docsrs |
| 78 |
hack: |
| 79 |
|
| 80 |
|
| 81 |
runs-on: ubuntu-latest |
| 82 |
name: ubuntu / stable / features |
| 83 |
steps: |
| 84 |
- uses: actions/checkout@v4 |
| 85 |
with: |
| 86 |
submodules: true |
| 87 |
- name: Install stable |
| 88 |
uses: dtolnay/rust-toolchain@stable |
| 89 |
- name: cargo install cargo-hack |
| 90 |
uses: taiki-e/install-action@cargo-hack |
| 91 |
|
| 92 |
|
| 93 |
- name: cargo hack |
| 94 |
run: cargo hack --feature-powerset check |
| 95 |
msrv: |
| 96 |
|
| 97 |
runs-on: ubuntu-latest |
| 98 |
|
| 99 |
|
| 100 |
strategy: |
| 101 |
matrix: |
| 102 |
msrv: ["1.40.0"] |
| 103 |
name: ubuntu / ${{ matrix.msrv }} |
| 104 |
steps: |
| 105 |
- uses: actions/checkout@v4 |
| 106 |
with: |
| 107 |
submodules: true |
| 108 |
- name: Install ${{ matrix.msrv }} |
| 109 |
uses: dtolnay/rust-toolchain@master |
| 110 |
with: |
| 111 |
toolchain: ${{ matrix.msrv }} |
| 112 |
- name: cargo +${{ matrix.msrv }} check |
| 113 |
run: cargo check |