This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
ci: add checks for default features #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
RUST_VERSION: "1.75" | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust ${{ env.RUST_VERSION }} | |
run: rustup install ${{ env.RUST_VERSION }} | |
- name: Set Rust ${{ env.RUST_VERSION }} as default | |
run: rustup default ${{ env.RUST_VERSION }} | |
- name: Check with default features | |
run: cargo check --config 'build.rustflags = ["-Dwarnings"]' | |
- name: Check with all features | |
run: cargo check --config 'build.rustflags = ["-Dwarnings"]' --all-features | |
- name: Install Clippy | |
run: rustup component add clippy | |
- name: Run Clippy with default features | |
run: cargo clippy --config 'build.rustflags = ["-Dwarnings"]' | |
- name: Run Clippy with all features | |
run: cargo clippy --config 'build.rustflags = ["-Dwarnings"]' --all-features |