v0.9.1 #148
Workflow file for this run
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: ci | |
on: [push, pull_request] | |
jobs: | |
lints: | |
name: Rustfmt and clippy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install rust (stable) | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy, rustfmt | |
- name: Run rustfmt | |
run: cargo fmt --check | |
- name: Run clippy | |
run: cargo clippy --all-features -- -D warnings | |
docs: | |
name: Build docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install rust (nightly) | |
uses: dtolnay/rust-toolchain@nightly | |
- name: Generate docs | |
run: cargo doc --no-deps --all-features | |
build_and_test: | |
name: Build and test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: [stable, beta, nightly] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install rust (${{ matrix.rust }}) | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
- name: Check default features | |
run: cargo check --examples --tests | |
- name: Check no default features | |
run: cargo check --examples --tests --no-default-features | |
- name: Check `rustls-tls` feature | |
run: cargo check --examples --tests --no-default-features --features rustls-tls | |
- name: Check `default-tls` and `rustls-tls` feature | |
run: cargo check --examples --tests --features rustls-tls | |
- name: Tests | |
run: cargo test --all-features | |
- name: Check minimal versions | |
if: matrix.rust == 'nightly' | |
run: cargo clean; cargo update -Z minimal-versions; cargo check --no-default-features --features rustls-tls | |
MSRV: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Get MSRV from package metadata | |
id: msrv | |
run: cargo metadata --no-deps --format-version 1 | jq -r '"version=" + (.packages[] | select(.name == "modio")).rust_version' >> $GITHUB_OUTPUT | |
- name: Install rust (${{ steps.msrv.outputs.version }}) | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ steps.msrv.outputs.version }} | |
- run: cargo check --all-features |