2022-10-19 21:46:06 +00:00
|
|
|
name: Check Rust
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2023-07-14 10:54:16 +00:00
|
|
|
branches-ignore:
|
|
|
|
- gh-readonly-queue/**
|
2022-10-19 21:46:06 +00:00
|
|
|
pull_request:
|
2023-07-14 09:46:22 +00:00
|
|
|
merge_group:
|
2022-10-19 21:46:06 +00:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
rustdoc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-08-23 15:35:28 +00:00
|
|
|
- name: Cache Rust dependencies
|
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-10-19 21:46:06 +00:00
|
|
|
- name: Run Rustdoc
|
|
|
|
run: |
|
|
|
|
RUSTDOCFLAGS=-Dwarnings DDNET_TEST_NO_LINK=1 cargo doc
|
|
|
|
|
|
|
|
rustfmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Run Rustfmt
|
|
|
|
run:
|
|
|
|
cargo fmt -- --check
|
|
|
|
|
|
|
|
cargo-deny:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
checks:
|
|
|
|
- advisories
|
|
|
|
- bans licenses sources
|
|
|
|
|
|
|
|
continue-on-error: ${{ matrix.checks == 'advisories' }}
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2023-08-23 15:35:28 +00:00
|
|
|
- name: Cache Rust dependencies
|
|
|
|
uses: Swatinem/rust-cache@v2
|
2022-10-19 21:46:06 +00:00
|
|
|
- uses: EmbarkStudios/cargo-deny-action@v1
|
|
|
|
with:
|
|
|
|
command: check ${{ matrix.checks }}
|