|
| 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 | + build: |
| 16 | + runs-on: ${{ matrix.os }}-latest |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + toolchain: ["beta"] |
| 21 | + include: |
| 22 | + - target: x86_64-unknown-linux-gnu |
| 23 | + os: ubuntu |
| 24 | + - target: x86_64-pc-windows-msvc |
| 25 | + os: windows |
| 26 | + - target: i686-pc-windows-msvc |
| 27 | + os: windows |
| 28 | + - target: aarch64-apple-darwin |
| 29 | + os: macos |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v4 |
| 32 | + |
| 33 | + - name: Install latest ${{ matrix.toolchain }} |
| 34 | + uses: dtolnay/rust-toolchain@stable |
| 35 | + with: |
| 36 | + target: ${{ matrix.target }} |
| 37 | + toolchain: ${{ matrix.toolchain }} |
| 38 | + |
| 39 | + - name: Build |
| 40 | + run: cargo build --target ${{ matrix.target }} |
| 41 | + |
| 42 | + documentation: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + steps: |
| 45 | + - uses: actions/checkout@v4 |
| 46 | + - name: Install latest nightly |
| 47 | + uses: dtolnay/rust-toolchain@stable |
| 48 | + with: |
| 49 | + toolchain: nightly |
| 50 | + - name: Generate documentation |
| 51 | + run: cargo doc --all-features |
| 52 | + - name: Install cargo-deadlinks |
| 53 | + run: cargo install cargo-deadlinks |
| 54 | + - name: Check dead links in doc |
| 55 | + run: cargo deadlinks |
| 56 | + |
| 57 | + clippy: |
| 58 | + runs-on: ${{ matrix.os }}-latest |
| 59 | + strategy: |
| 60 | + matrix: |
| 61 | + include: |
| 62 | + - os: ubuntu |
| 63 | + - os: windows |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v4 |
| 66 | + - name: Install latest nightly |
| 67 | + uses: dtolnay/rust-toolchain@stable |
| 68 | + with: |
| 69 | + toolchain: nightly |
| 70 | + components: clippy |
| 71 | + |
| 72 | + - name: Clippy check |
| 73 | + run: cargo clippy --all-features |
| 74 | + |
| 75 | + fmt: |
| 76 | + runs-on: ${{ matrix.os }}-latest |
| 77 | + strategy: |
| 78 | + matrix: |
| 79 | + include: |
| 80 | + - os: ubuntu |
| 81 | + - os: windows |
| 82 | + steps: |
| 83 | + - uses: actions/checkout@v4 |
| 84 | + - name: Install latest nightly |
| 85 | + uses: dtolnay/rust-toolchain@stable |
| 86 | + with: |
| 87 | + toolchain: nightly |
| 88 | + components: rustfmt |
| 89 | + |
| 90 | + - name: Format check |
| 91 | + run: cargo fmt --all -- --check |
0 commit comments