Skip to content

no_std fixes

no_std fixes #7

Workflow file for this run

name: CI
on:
push:
paths:
- ".github/workflows/ci.yml"
- "**/*.rs"
- "**/Cargo.toml"
pull_request:
paths:
- ".github/workflows/ci.yml"
- "**/*.rs"
- "**/Cargo.toml"
permissions:
contents: read
env:
RUSTFLAGS: -Dwarnings
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
pre_ci:
uses: dtolnay/.github/.github/workflows/pre_ci.yml@master
test:
name: Rust ${{matrix.name}}
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: stable/std
rust: stable
features: ""
- name: nightly/std
rust: nightly
features: ""
- name: nightly/core
rust: nightly
features: "--no-default-features"
- name: nightly/alloc
rust: nightly
features: "--no-default-features --features alloc"
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace ${{matrix.features}}
env:
RUSTFLAGS: ${{matrix.rustflags}} ${{env.RUSTFLAGS}}
msrv:
name: Rust MSRV
needs: pre_ci
if: needs.pre_ci.outputs.continue
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.70.0 # MSRV
- uses: Swatinem/rust-cache@v2
- run: cargo check --workspace --tests
clippy:
name: Clippy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace -- -Dclippy::all
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
timeout-minutes: 45
steps:
- uses: actions/checkout@v3
- name: Install rustfmt with nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- run: cargo fmt --all -- --check
check-licenses:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check Rust Licenses
uses: EmbarkStudios/cargo-deny-action@v1