Bump cargo version #1106
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: Rust | |
on: [push, pull_request] | |
jobs: | |
rustfmt-clippy: | |
name: Format and Clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install stable | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
components: clippy, rustfmt | |
- name: Run rustfmt | |
run: | | |
cargo fmt --all -- --check | |
- name: Run clippy | |
uses: actions-rs-plus/clippy-check@v2.0.0 | |
with: | |
args: --all -- -D warnings --verbose | |
coverage: | |
needs: arch-test | |
name: Code coverage | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
- name: Install grcov | |
env: | |
LINK: https://github.com/mozilla/grcov/releases/download | |
GRCOV_VERSION: 0.8.7 | |
run: | | |
curl -L "$LINK/v$GRCOV_VERSION/grcov-x86_64-unknown-linux-gnu.tar.bz2" | | |
tar xj -C $HOME/.cargo/bin | |
- name: Set up MinGW | |
uses: egor-tensin/setup-mingw@v2 | |
with: | |
platform: x64 | |
cc: false | |
- name: Run grcov | |
id: coverage | |
run: bash coverage.sh | |
- name: Codecov upload | |
uses: codecov/codecov-action@v3 | |
with: | |
files: coverage.lcov | |
arch-test: | |
needs: rustfmt-clippy | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-12] | |
toolchain: [nightly, stable] | |
include: | |
- toolchain: nightly-gnu | |
os: windows-latest | |
- toolchain: stable-gnu | |
os: windows-latest | |
name: ${{matrix.os}}-${{matrix.toolchain}} | |
runs-on: ${{matrix.os}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install ${{matrix.toolchain}} | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: ${{matrix.toolchain}} | |
- name: Build | |
run: | | |
cargo build --verbose | |
- name: Run tests | |
run: | | |
cargo test --verbose | |