|
| 1 | +name: Workspace |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: master |
| 6 | + pull_request: |
| 7 | + branches: master |
| 8 | + |
| 9 | +permissions: |
| 10 | + contents: read |
| 11 | + |
| 12 | +jobs: |
| 13 | + clippy: |
| 14 | + name: Clippy |
| 15 | + runs-on: ubuntu-latest |
| 16 | + steps: |
| 17 | + - uses: actions/checkout@v3 |
| 18 | + - uses: dtolnay/rust-toolchain@master |
| 19 | + with: |
| 20 | + toolchain: nightly-2024-06-11 |
| 21 | + components: clippy,rust-src |
| 22 | + - name: Linux (linux_android_with_fallback.rs) |
| 23 | + run: cargo clippy --target x86_64-unknown-linux-gnu |
| 24 | + - name: Linux (linux_android.rs) |
| 25 | + run: cargo clippy --target x86_64-unknown-linux-gnu --features linux_disable_fallback |
| 26 | + - name: macOS (getentropy.rs) |
| 27 | + run: cargo clippy -Zbuild-std --target x86_64-apple-darwin |
| 28 | + - name: Redox (use_file.rs) |
| 29 | + run: cargo clippy -Zbuild-std --target x86_64-unknown-redox |
| 30 | + - name: FreeBSD (getrandom.rs) |
| 31 | + run: cargo clippy -Zbuild-std --target x86_64-unknown-freebsd |
| 32 | + - name: Solaris (solaris.rs) |
| 33 | + run: cargo clippy -Zbuild-std --target x86_64-pc-solaris |
| 34 | + - name: NetBSD (netbsd.rs) |
| 35 | + run: cargo clippy -Zbuild-std --target x86_64-unknown-netbsd |
| 36 | + - name: Fuchsia (fuchsia.rs) |
| 37 | + run: cargo clippy -Zbuild-std --target x86_64-unknown-fuchsia |
| 38 | + - name: iOS (apple-other.rs) |
| 39 | + run: cargo clippy -Zbuild-std --target x86_64-apple-ios |
| 40 | + - name: WASI (wasi.rs) |
| 41 | + run: cargo clippy -Zbuild-std --target wasm32-wasip2 |
| 42 | + - name: Hermit (hermit.rs) |
| 43 | + run: cargo clippy -Zbuild-std --target x86_64-unknown-hermit |
| 44 | + # - name: VxWorks (vxworks.rs) |
| 45 | + # run: cargo clippy -Zbuild-std --target x86_64-wrs-vxworks |
| 46 | + - name: SOLID (solid.rs) |
| 47 | + run: cargo clippy -Zbuild-std --target aarch64-kmc-solid_asp3 |
| 48 | + - name: ESP-IDF (espidf.rs) |
| 49 | + run: cargo clippy -Zbuild-std --target riscv32imc-esp-espidf |
| 50 | + - name: Windows 7 (windows7.rs) |
| 51 | + run: cargo clippy -Zbuild-std --target x86_64-win7-windows-msvc |
| 52 | + - name: Windows (windows.rs) |
| 53 | + run: cargo clippy -Zbuild-std --target x86_64-pc-windows-msvc |
| 54 | + - name: Fortranix SGX (rdrand.rs) |
| 55 | + run: cargo clippy -Zbuild-std --target x86_64-fortanix-unknown-sgx |
| 56 | + - name: Web WASM (js.rs) |
| 57 | + run: cargo clippy -Zbuild-std --target wasm32-unknown-unknown --features js |
| 58 | + |
| 59 | + fmt: |
| 60 | + name: rustfmt |
| 61 | + runs-on: ubuntu-latest |
| 62 | + steps: |
| 63 | + - uses: actions/checkout@v1 |
| 64 | + - uses: dtolnay/rust-toolchain@stable |
| 65 | + with: |
| 66 | + components: rustfmt |
| 67 | + - uses: Swatinem/rust-cache@v2 |
| 68 | + - name: fmt |
| 69 | + run: cargo fmt --all -- --check |
| 70 | + |
| 71 | + check-doc: |
| 72 | + name: rustdoc |
| 73 | + runs-on: ubuntu-latest |
| 74 | + steps: |
| 75 | + - uses: actions/checkout@v3 |
| 76 | + - uses: dtolnay/rust-toolchain@nightly # Needed for doc_auto_cfg |
| 77 | + - uses: Swatinem/rust-cache@v2 |
| 78 | + - name: Generate Docs |
| 79 | + env: |
| 80 | + RUSTDOCFLAGS: "-Dwarnings --cfg docsrs" |
| 81 | + run: cargo doc --no-deps --features custom |
0 commit comments