You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.0 KiB
YAML

name: Rust
on:
push:
tags: ["[0-9]+.[0-9]+.[0-9]+*"]
env:
CARGO_TERM_COLOR: always
# Linters inspired from here: https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
jobs:
rust:
name: ${{ matrix.os }}-latest
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu
- os: macos
- os: windows
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: fmt
run: cargo fmt --all -- --check
- name: build
if: matrix.os != 'windows' || github.event_name != 'pull_request'
run: cargo build --verbose
- name: clippy
if: matrix.os != 'windows' || github.event_name != 'pull_request'
#run: cargo clippy -- -D warnings
run: cargo clippy --
- name: test
if: matrix.os != 'windows' || github.event_name != 'pull_request'
run: cargo test --verbose -- --nocapture