Skip to content

Add CI steps for unstable features #342

Add CI steps for unstable features

Add CI steps for unstable features #342

Workflow file for this run

name: CI
on:
pull_request:
workflow_dispatch:
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo check --all-features
check-unstable:
name: Check (Unstable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: RUST_FLAGS="--cfg unstable" cargo check --all-features
test:
name: Test Suite
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v4
- name: Install libudev
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --features=ascii,binary --workspace --verbose
test-unstable:
name: Test Suite (Unstable)
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macOS-latest ]
steps:
- uses: actions/checkout@v4
- name: Install libudev
if: runner.os == 'Linux'
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@nightly
- uses: Swatinem/rust-cache@v2
- run: RUST_FLAGS="--cfg unstable" cargo +nightly test --all-features --workspace --verbose
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --all-features
clippy-unstable:
name: Clippy (Unstable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: RUST_FLAGS="--cfg unstable" cargo clippy --all-features
spelling:
name: Spell Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm install @cspell/dict-rust
- uses: streetsidesoftware/cspell-action@v6
with:
incremental_files_only: false
doc:
name: Rustdoc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-docs
- uses: Swatinem/rust-cache@v2
- run: cargo doc --no-deps --all-features
doc-unstable:
name: Rustdoc (Unstable)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: |
sudo apt update
sudo apt install libudev-dev
- uses: dtolnay/rust-toolchain@nightly
with:
components: rust-docs
- uses: Swatinem/rust-cache@v2
- run: RUSTDOCFLAGS="--cfg unstable" cargo doc --no-deps --all-features