Skip to content

Merge pull request #31 from gifnksm/bump-msrv #61

Merge pull request #31 from gifnksm/bump-msrv

Merge pull request #31 from gifnksm/bump-msrv #61

Workflow file for this run

name: Rust CI
on: push
env:
CARGO_TERM_COLOR: always
jobs:
rustfmt_check:
name: Rustfmt Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- name: rustfmt-check
run: cargo fmt --all --check
clippy_check:
name: Clippy Check
runs-on: ubuntu-latest
strategy:
matrix:
feature_flags:
- "--workspace --all-features"
- "--workspace --no-default-features"
- "-p polynomial --no-default-features --features=std"
- "-p polynomial --no-default-features --features=libm"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: clippy
- uses: giraffate/clippy-action@v1
with:
reporter: 'github-pr-review'
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: -- -Dwarnings
security_audit:
name: Security Audit
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/audit@v1
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.74.0
feature_flags:
- "--workspace --all-features"
- "--workspace --no-default-features"
- "-p polynomial --no-default-features --features=std"
- "-p polynomial --no-default-features --features=libm"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: cargo test
run: cargo test --all-targets ${{ matrix.feature_flags }}
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- 1.74.0
feature_flags:
- "--workspace --all-features"
- "--workspace --no-default-features"
- "-p polynomial --no-default-features --features=std"
- "-p polynomial --no-default-features --features=libm"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ matrix.rust }}
- name: cargo build
run: cargo build --all-targets ${{ matrix.feature_flags}}
coverage:
name: Code coverage
runs-on: ubuntu-latest
strategy:
matrix:
feature_flags:
- "--workspace --all-features"
- "--workspace --no-default-features"
- "-p polynomial --no-default-features --features=std"
- "-p polynomial --no-default-features --features=libm"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
toolchain: stable
components: llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov ${{ matrix.feature_flags }} --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true