|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ master ] |
| 6 | + pull_request: |
| 7 | + branches: [ master ] |
| 8 | + |
| 9 | +env: |
| 10 | + CARGO_TERM_COLOR: always |
| 11 | + RUSTDOCFLAGS: "--deny warnings" |
| 12 | + RUSTFLAGS: "--deny warnings" |
| 13 | + |
| 14 | +jobs: |
| 15 | + test: |
| 16 | + runs-on: ${{ matrix.os }} |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + include: |
| 21 | + - os: ubuntu-latest |
| 22 | + target: x86_64-unknown-linux-gnu |
| 23 | + - os: windows-latest |
| 24 | + target: x86_64-pc-windows-msvc |
| 25 | + steps: |
| 26 | + - uses: actions/checkout@v6 |
| 27 | + - name: Install latest stable |
| 28 | + uses: dtolnay/rust-toolchain@stable |
| 29 | + with: |
| 30 | + toolchain: ${{ matrix.toolchain }} |
| 31 | + target: ${{ matrix.target }} |
| 32 | + - name: Build |
| 33 | + run: cargo build --target "${{ matrix.target }}" |
| 34 | + - name: Test |
| 35 | + run: cargo test --target "${{ matrix.target }}" |
| 36 | + |
| 37 | + documentation: |
| 38 | + runs-on: ubuntu-latest |
| 39 | + steps: |
| 40 | + - uses: actions/checkout@v6 |
| 41 | + - name: Install latest nightly |
| 42 | + uses: dtolnay/rust-toolchain@nightly |
| 43 | + - name: Generate documentation |
| 44 | + run: cargo doc --all-features |
| 45 | + - name: Install cargo-deadlinks |
| 46 | + run: cargo install cargo-deadlinks |
| 47 | + - name: Check dead links in doc |
| 48 | + run: cargo deadlinks |
| 49 | + |
| 50 | + clippy: |
| 51 | + runs-on: ubuntu-latest |
| 52 | + steps: |
| 53 | + - uses: actions/checkout@v6 |
| 54 | + - name: Install latest nightly |
| 55 | + uses: dtolnay/rust-toolchain@nightly |
| 56 | + with: |
| 57 | + components: clippy |
| 58 | + - name: Clippy check |
| 59 | + run: cargo clippy --all-features |
| 60 | + |
| 61 | + hack: |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v6 |
| 65 | + - name: Install latest nightly |
| 66 | + uses: dtolnay/rust-toolchain@nightly |
| 67 | + - name: cargo install cargo-hack |
| 68 | + uses: taiki-e/install-action@cargo-hack |
| 69 | + - name: cargo hack |
| 70 | + run: cargo hack --feature-powerset check |
| 71 | + |
| 72 | + fmt: |
| 73 | + runs-on: ubuntu-latest |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v6 |
| 76 | + - name: Install latest nightly |
| 77 | + uses: dtolnay/rust-toolchain@nightly |
| 78 | + with: |
| 79 | + components: rustfmt |
| 80 | + - name: Format check |
| 81 | + run: cargo fmt --all -- --check |
0 commit comments