CI #896
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '30 3 * * 2' | |
name: CI | |
jobs: | |
test: | |
name: run tests | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
toolchain: [stable, 1.64.0] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- name: Build with default features | |
run: cargo build | |
- name: Build with logging and webpki roots | |
run: cargo build --features logging,webpki-roots --no-default-features | |
- name: Run tests | |
run: cargo test | |
clippy: | |
name: run clippy lints | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: clippy | |
- name: run clippy lints | |
run: cargo clippy --features logging | |
fmt: | |
name: run rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt | |
- name: run rustfmt | |
run: cargo fmt --all -- --check | |
docs: | |
name: build docs | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup mdBook | |
uses: peaceiris/actions-mdbook@v1 | |
with: | |
mdbook-version: '0.4.4' | |
- name: Setup toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
- name: Build | |
run: cargo build | |
- name: Ensure that docs can be built | |
run: cd docs && mdbook build | |
- name: Generate usage string | |
run: cargo run -- --help > docs/src/usage-actual.txt | |
- name: Ensure that usage string is up to date | |
run: diff docs/src/usage{,-actual}.txt |