Skip to content

Fix an infinite loop with auto allotment #7906

Fix an infinite loop with auto allotment

Fix an infinite loop with auto allotment #7906

Workflow file for this run

name: Linting
on:
push:
branches: [develop, staging, "2.0"]
paths:
- ".cargo/config.toml"
- ".github/workflows/lint.yml"
- ".github/actions/**"
- "**.rs" # Include all rust files
- "**Cargo.toml" # Include all Cargo.toml files
- "**Cargo.lock" # Include all Cargo.lock files
- "!**/bindings/**" # Exclude all bindings
pull_request:
branches: [develop, staging, "2.0"]
paths:
- ".cargo/config.toml"
- ".github/workflows/lint.yml"
- ".github/actions/**"
- "**.rs" # Include all rust files
- "**Cargo.toml" # Include all Cargo.toml files
- "**Cargo.lock" # Include all Cargo.lock files
- "!**/bindings/**" # Exclude all bindings
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_INCREMENTAL: 0
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout the Source Code
uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
toolchain: beta
components: clippy
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Required Dependencies
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
# # A first run without features to detect feature related issues.
# - name: Run Clippy
# uses: actions-rs/clippy-check@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# args: --all-targets -- --deny warnings
# name: Clippy Results for the Rust Core
# # The second run will continue from where the first left off.
# - name: Run Clippy
# uses: actions-rs/clippy-check@v1
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# args: --all-features --all-targets -- --deny warnings
# name: Clippy Results for the Rust Core
check-unused-deps:
name: Check Unused Dependencies
runs-on: ubuntu-latest
steps:
- name: Checkout the Source Code
uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
install: cargo-udeps
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install Required Dependencies
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Run Cargo Udeps
run: cargo ci-udeps
check-format:
name: Check Format
runs-on: ubuntu-latest
steps:
- name: Checkout the Source Code
uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
components: rustfmt
- name: Install cargo-license-template
run: cargo install --force cargo-license-template
- name: Run Cargo Fmt
run: cargo ci-fmt
- name: Run cargo-license-template
run: cargo ci-license
check-docs:
name: Check Documentation
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: -D warnings
steps:
- name: Checkout the Source Code
uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
components: rustfmt
- name: Install Required Dependencies
run: |
sudo apt-get update
sudo apt-get install libudev-dev libusb-1.0-0-dev
- name: Run cargo-doc
run: cargo ci-doc
audit:
name: Perform Security Audit
runs-on: ubuntu-latest
steps:
- name: Checkout the Source Code
uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
toolchain: nightly
install: cargo-audit
- name: Run Cargo Audit
run: cargo ci-audit
no_std:
name: Check `no_std` compatability
runs-on: ubuntu-latest
steps:
- name: Checkout the Source Code
uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
with:
targets: riscv64gc-unknown-none-elf
- name: Check
run: cargo ci-check-nostd
types:
name: Check types-only compilation
runs-on: ubuntu-latest
steps:
- name: Checkout the Source Code
uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/setup-rust
- name: Check
run: cargo ci-check-types