Initial falcon_supported_kernels example #27
Workflow file for this run
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
name: checks | |
env: | |
CARGO_TERM_COLOR: always | |
on: | |
push: | |
branches: [ main ] # this should be blocked entirely! | |
pull_request: | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
name: stable / fmt | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- name: cargo fmt --check | |
run: cargo fmt --check | |
clippy: | |
runs-on: ubuntu-latest | |
name: ${{ matrix.toolchain }} / clippy | |
permissions: | |
contents: read | |
checks: write | |
strategy: | |
fail-fast: false | |
matrix: | |
toolchain: [stable, beta] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install ${{ matrix.toolchain }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
components: clippy | |
- name: cargo clippy | |
# Run clippy with all warnings treated as errors | |
# TODO: Run pedantic | |
run: cargo clippy -- -Dwarnings -Aclippy::single-match-else -Adeprecated | |
doc: | |
runs-on: ubuntu-latest | |
name: nightly / doc | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install nightly | |
uses: dtolnay/rust-toolchain@nightly | |
- name: cargo doc | |
run: cargo doc --no-deps --all-features | |
env: | |
RUSTDOCFLAGS: --cfg docsrs | |
hack: | |
# Provides some checks for mixed versions of dependencies. | |
runs-on: ubuntu-latest | |
name: ubuntu / stable / features | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: cargo install cargo-hack | |
uses: taiki-e/install-action@cargo-hack | |
- name: cargo hack | |
run: cargo hack --feature-powerset check | |
msrv: | |
runs-on: ubuntu-latest | |
# we use a matrix here just because env can't be used in job names | |
# https://docs.github.com/en/actions/learn-github-actions/contexts#context-availability | |
strategy: | |
matrix: | |
msrv: [1.63.0] | |
name: ubuntu / ${{ matrix.msrv }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: true | |
- name: Install ${{ matrix.msrv }} | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.msrv }} | |
- name: cargo +${{ matrix.msrv }} check | |
run: cargo check | |
outdated: | |
name: Outdated | |
runs-on: ubuntu-latest | |
if: github.event_name != 'pull_request' | |
steps: | |
- uses: actions/checkout@v3 | |
- run: cargo outdated --exit-code 1 | |
block-fixup: | |
name: Block fixup commits | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Block Fixup Commit Merge | |
# https://github.com/13rac1/block-fixup-merge-action | |
uses: 13rac1/block-fixup-merge-action@v2.0.0 | |
udeps: | |
name: Check for unused dependencies | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install nightly | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Run cargo-udeps | |
run: | | |
cargo install --git https://github.com/est31/cargo-udeps --locked | |
cargo udeps --all-features --all-targets | |
cargo-sort: | |
name: Run cargo sort | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Install cargo sort | |
run: cargo install cargo-sort | |
- name: Cargo sort | |
run: cargo sort -w . --check | |
cargo-fmt: | |
name: Run cargo fmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install nightly | |
uses: dtolnay/rust-toolchain@nightly | |
with: | |
components: rustfmt | |
- name: Cargo fmt --version | |
run: cargo fmt --version | |
- name: Cargo fmt | |
run: cargo fmt -- --check | |
cargo-audit: | |
name: Run cargo audit | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
- name: Cargo audit | |
run: cargo audit | |
shellcheck: | |
name: Shellcheck | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run ShellCheck | |
uses: ludeeus/action-shellcheck@master | |
typos: | |
name: Spell Check with Typos | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: crate-ci/typos@v1.16.0 | |
continue-on-error: true | |
- run: exit 0 |