Skip to content

Merge pull request #6 from tippfehlr/main #45

Merge pull request #6 from tippfehlr/main

Merge pull request #6 from tippfehlr/main #45

Workflow file for this run

name: Check
on:
push:
branches:
- main
pull_request:
env:
CARGO_TERM_COLOR: always
defaults:
run:
# necessary for Windows
shell: bash
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- run: cargo fmt --check --all
clippy:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
image: ubuntu-latest
- target: x86_64-pc-windows-msvc
image: windows-latest
runs-on: ${{ matrix.image }}
env:
TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@v3
- name: Install dependencies for Ubuntu
if: ${{ contains(matrix.image, 'ubuntu') }}
run: sudo apt-get install -y libdbus-1-dev
- uses: Swatinem/rust-cache@v2
- name: Install rust target
run: rustup target add $TARGET
- name: Run clippy
run: cargo clippy --locked --target $TARGET --all -- -D warnings