on:
pull_request:
push:
branches:
- main
tags:
- "*"
schedule:
- cron: '22 2 * * *'
name: Continuous integration
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
check:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with:
toolchain: stable
- run: rustup component add rustfmt
- name: rustfmt check
run: cargo fmt --all -- --check
- name: cargo doc
run: cargo doc --all-features --document-private-items --no-deps
env:
RUSTDOCFLAGS: -D warnings
clippy-lint:
name: Clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with:
persist-credentials: false
- name: install pinned toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with:
toolchain: 1.97.1
components: clippy
- name: cargo clippy --all-features
run: cargo clippy --all-features --all-targets -- -D warnings
- name: cargo clippy --no-default-features
run: cargo clippy --all-targets --no-default-features -- -D warnings
test-stable:
name: cargo test stable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with:
persist-credentials: false
- name: install stable toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with:
toolchain: stable
- name: cargo test
run: cargo test --all-targets --all-features
check-no-std:
name: cargo check no std
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with:
persist-credentials: false
- name: install stable toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with:
toolchain: stable
- name: cargo check
run: cargo check --manifest-path=Cargo.toml --no-default-features
check-wasm:
name: cargo check wasm
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 with:
persist-credentials: false
- name: install stable toolchain
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 with:
toolchain: stable
- run: rustup target add wasm32-unknown-unknown
- name: cargo check wasm target
run: cargo check --manifest-path=Cargo.toml --target wasm32-unknown-unknown