Ignore Cargo.lock
in root
#7
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 Checks - Rust Tests | |
on: [push, pull_request] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ | |
ubuntu-latest, | |
macos-latest, | |
windows-latest, | |
] | |
toolchain: [ | |
stable, | |
beta, | |
] | |
include: | |
- toolchain: stable | |
check-fmt: true | |
platform: ubuntu-latest | |
- toolchain: stable | |
platform: macos-latest | |
- toolchain: stable | |
platform: windows-latest | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Install Rust ${{ matrix.toolchain }} toolchain | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal --default-toolchain ${{ matrix.toolchain }} | |
rustup override set ${{ matrix.toolchain }} | |
- name: Check formatting on Rust ${{ matrix.toolchain }} | |
if: matrix.check-fmt | |
run: rustup component add rustfmt && cargo fmt --all -- --check | |
- name: Set RUSTFLAGS to deny warnings | |
if: "matrix.toolchain == 'stable'" | |
run: echo "RUSTFLAGS=-D warnings" >> "$GITHUB_ENV" | |
- name: Build on Rust ${{ matrix.toolchain }} | |
run: cargo build --verbose --color always | |
- name: Build documentation on Rust ${{ matrix.toolchain }} | |
run: | | |
cargo doc --release --verbose --color always | |
cargo doc --document-private-items --verbose --color always | |
- name: Check release build on Rust ${{ matrix.toolchain }} | |
run: cargo check --release --verbose --color always | |
- name: Test on Rust ${{ matrix.toolchain }} | |
if: "matrix.platform != 'windows-latest'" | |
run: | | |
cargo test |