Skip to content

set msrv

set msrv #33

Workflow file for this run

name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings -Aunknown-lints"
RUSTDOCFLAGS: "-Dwarnings -Aunknown-lints"
jobs:
get_msrv:
runs-on: ubuntu-latest
outputs:
rust_version: ${{ steps.setenv.outputs.rust_version }}
steps:
- uses: actions/checkout@v4
- id: setenv
run: echo "rust_version=$(sed --regexp-extended --quiet 's/rust-version = "(.*)"/\1/p' Cargo.toml)" | tee -a $GITHUB_OUTPUT
build:
needs: get_msrv
strategy:
matrix:
channel:
- stable
- beta
- nightly
- ${{ needs.get_msrv.outputs.rust_version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust Toolchain
run: rustup update ${{ matrix.channel }} && rustup default ${{ matrix.channel }} && rustup component add clippy && cargo +stable install cargo-llvm-cov && cargo +stable install cargo-hack --locked
- name: Build
run: cargo hack --feature-powerset build --verbose
- name: Run tests
run: cargo hack --feature-powerset test --verbose
- name: Coverage
run: cargo hack --feature-powerset llvm-cov test --text --verbose
- name: Build docs
run: cargo hack --feature-powerset doc --verbose
- name: Run clippy
run: cargo hack --feature-powerset clippy --verbose