Make it build again #41
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
name: CI | |
jobs: | |
deny: | |
name: Deny | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
checks: | |
- advisories | |
- bans licenses sources | |
# Prevent sudden announcement of a new advisory from failing ci: | |
continue-on-error: ${{ matrix.checks == 'advisories' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: Swatinem/rust-cache@v2 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check ${{ matrix.checks }} | |
lints: | |
name: Lints | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install nightly toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy | |
- uses: Swatinem/rust-cache@v2 | |
- name: FMT | |
run: cargo fmt --all -- --check | |
- name: Clippy | |
run: cargo clippy --all-features -Z unstable-options --future-incompat-report -- -D warnings | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install stable toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Test | |
run: cargo test --all-features | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Build | |
run: cargo build --all-features | |
bloat: | |
name: Bloat | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@master | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Run cargo bloat | |
uses: orf/cargo-bloat-action@v1 | |
continue-on-error: true | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
spellcheck: | |
name: Spellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Install cargo-spellcheck | |
uses: taiki-e/install-action@v2 | |
with: | |
tool: cargo-spellcheck | |
- name: Run spellcheck | |
run: cargo spellcheck --code 99 | |
semver: | |
name: Semver check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- uses: Swatinem/rust-cache@v2 | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 |