rustfmt to reformat imports #347
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: rustls-pemfile | |
on: | |
push: | |
pull_request: | |
merge_group: | |
schedule: | |
- cron: '0 18 * * *' | |
jobs: | |
rustfmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: rustfmt | |
- uses: actions/checkout@v4 | |
- run: cargo fmt --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
- uses: actions/checkout@v4 | |
- run: cargo clippy --locked --all-features --all-targets | |
rustdoc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/checkout@v4 | |
- run: cargo doc --locked --all-features | |
build: | |
name: "Build and test" | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# test a bunch of toolchains on ubuntu | |
rust: | |
- stable | |
- beta | |
- nightly | |
os: [ubuntu-latest] | |
# but only stable on macos/windows (slower platforms) | |
include: | |
- os: macos-latest | |
rust: stable | |
- os: windows-latest | |
rust: stable | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
- name: Install ${{ matrix.rust }} toolchain | |
uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.rust }} | |
targets: x86_64-unknown-none | |
- name: cargo test (debug) | |
run: cargo test --locked | |
env: | |
RUST_BACKTRACE: 1 | |
RUSTFLAGS: "-D warnings" | |
- name: cargo test (release) | |
run: cargo test --locked --release | |
env: | |
RUSTFLAGS: "-D warnings" | |
# this target does _not_ include the libstd crate in its sysroot | |
# it will catch unwanted usage of libstd in _dependencies_ | |
- name: cargo build no-std mode | |
run: cargo build --locked --no-default-features --target x86_64-unknown-none | |
env: | |
RUSTFLAGS: "-D warnings" | |
semver: | |
name: Check semver compatibility | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Check semver | |
uses: obi1kenobi/cargo-semver-checks-action@v2 |