Lock file maintenance #727
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: CI | |
on: | |
push: | |
branches: | |
- 'main' | |
- 'ci' | |
paths-ignore: | |
- '.github/workflows/devcontainer.yaml' | |
- '.github/workflows/pages.yaml' | |
- '.github/renovate.json' | |
pull_request: | |
merge_group: | |
types: [checks_requested] | |
permissions: | |
contents: read | |
jobs: | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install cargo-cranky | |
run: cargo install --locked cargo-cranky | |
- name: no_std | |
run: cargo cranky --target thumbv7em-none-eabihf --no-default-features | |
- name: std | |
run: cargo cranky --no-default-features -F std | |
- name: no_std + serde | |
run: cargo cranky --target thumbv7em-none-eabihf --no-default-features -F _serde | |
- name: All features | |
run: cargo cranky --all-features | |
- name: Check fuzz tests | |
run: cargo cranky -p fuzz --all-targets | |
- name: Check code generator | |
run: cargo cranky -p codegen | |
min-dependencies: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Use minimal versions Cargo.toml & Cargo.lock | |
run: | | |
mv Cargo.min.toml Cargo.toml | |
mv Cargo.min.lock Cargo.lock | |
- run: cargo check --locked --lib | |
codegen: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- run: rustup toolchain install nightly --profile minimal --component rustfmt | |
- run: cargo run -p codegen | |
- run: git diff --exit-code src/generated/ | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
toolchain: | |
- msrv | |
- beta | |
- nightly | |
include: | |
- os: macos-latest | |
toolchain: msrv | |
- os: windows-latest | |
toolchain: msrv | |
runs-on: ${{ matrix.os }} | |
continue-on-error: ${{ matrix.toolchain == 'nightly' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install toolchain (MSRV) | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
if: ${{ matrix.toolchain == 'msrv' }} | |
- name: Remove rust-toolchain file (non-MSRV) | |
run: rm rust-toolchain* | |
if: ${{ matrix.toolchain != 'msrv' }} | |
- name: Install toolchain (non-MSRV) | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
if: ${{ matrix.toolchain != 'msrv' }} | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Replace symlinks with copies | |
if: ${{ runner.os == 'windows' }} | |
run: | | |
cd tests/logs | |
mv fc-blackbox fc-blackbox~ | |
mv gimbal-ghost gimbal-ghost~ | |
cp -r "$(readlink fc-blackbox~)" fc-blackbox | |
cp -r "$(readlink gimbal-ghost~)" gimbal-ghost | |
rm -r fc-blackbox~ | |
rm -r gimbal-ghost~ | |
- name: Run tests | |
run: cargo nextest run --all-features --profile=ci | |
- name: Run doctests | |
run: cargo test --doc | |
coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: Install nextest | |
uses: taiki-e/install-action@nextest | |
- name: Install llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Generate coverage | |
run: cargo llvm-cov --all-features --lcov --output-path=coverage.lcov --ignore-filename-regex generated nextest --profile=ci --run-ignored=all | |
- name: Upload coverage | |
uses: codecov/codecov-action@v4 | |
with: | |
files: coverage.lcov | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rm rust-toolchain* | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt | |
- name: Check rustfmt | |
run: cargo +nightly fmt --all --check | |
typos: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: crate-ci/typos@master |