ci #545
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: | |
pull_request: | |
push: | |
branches: | |
- master | |
- main | |
- staging | |
- trying | |
schedule: | |
- cron: '00 04 * * *' | |
jobs: | |
test: | |
name: test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [ubuntu-stable, ubuntu-beta, ubuntu-nightly, macos-stable, win-gnu-stable, win-msvc-stable] | |
include: | |
- build: ubuntu-stable | |
os: ubuntu-latest | |
rust: stable | |
- build: ubuntu-beta | |
os: ubuntu-latest | |
rust: beta | |
- build: ubuntu-nightly | |
os: ubuntu-latest | |
rust: nightly | |
- build: macos-stable | |
os: macOS-latest | |
rust: stable | |
- build: win-gnu-stable | |
os: windows-latest | |
rust: stable-x86_64-gnu | |
- build: win-msvc-stable | |
os: windows-latest | |
rust: stable | |
steps: | |
- name: checkout_repository | |
uses: actions/checkout@v4 | |
- name: install_rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: ${{ matrix.rust }} | |
override: true | |
profile: minimal | |
- name: build_all | |
run: cargo build --verbose --all | |
- name: test_all | |
run: cargo test --verbose --all | |
rustfmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout_repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: install_rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
profile: minimal | |
- name: install_rustfmt | |
run: rustup component add rustfmt | |
- name: check_formatting | |
run: | | |
cargo fmt -- --check | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: checkout_repo | |
uses: actions/checkout@v4 | |
- name: install_rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
profile: minimal | |
components: clippy | |
- name: check_clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all-features --all-targets --workspace | |
msrv: | |
name: msrv | |
runs-on: ubuntu-latest | |
continue-on-error: true | |
steps: | |
- name: checkout_repo | |
uses: actions/checkout@v4 | |
- name: install_rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
profile: minimal | |
- name: install_cargo_msrv | |
run: cargo install cargo-msrv | |
- name: version_of_cargo_msrv | |
run: cargo msrv --version # as of writing: 0.7.0 (required for --verify) | |
- name: run_cargo_msrv | |
run: cargo msrv --verify --output-format json --ignore-lockfile |