Skip to content

New version (maybe 0.2.0) #92

New version (maybe 0.2.0)

New version (maybe 0.2.0) #92

Workflow file for this run

name: Rust CI
on:
push:
branches: [main]
pull_request:
branches: ["*"]
env:
CARGO_TERM_COLOR: always
jobs:
test:
strategy:
fail-fast: true
matrix:
# 1.78 is the MSRV for the crate
rust: ['nightly', 'beta', 'stable', '1.78']
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Install ${{matrix.rust}} toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{matrix.rust}}
- name: Build
if: matrix.rust != 'nightly'
run: cargo build --all-targets
- name: Build with 'nightly' feature
if: matrix.rust == 'nightly'
run: cargo build --all-targets --features nightly
- name: Test
if: matrix.rust != 'nightly'
run: cargo test --all-targets
- name: Test with 'nightly' feature
if: matrix.rust == 'nightly'
run: cargo test --all-targets --features nightly
format:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Check format
run: cargo fmt -- --check
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Lint
run: cargo clippy --all-features
miri:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
- name: Install nightly toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- name: Run miri tests
run: cargo miri test