-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (35 loc) · 954 Bytes
/
rust.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Rust
on:
workflow_dispatch:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{matrix.os}}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- if: matrix.os == 'ubuntu-latest'
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: libxtst-dev libevdev-dev libxdo-dev
version: 1.0
- name: Add components
run: rustup component add clippy rustfmt
- name: Rustfmt
run: |
cargo fmt -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Build
run: cargo build --all-features --verbose
- name: Test
run: cargo test --all-features --verbose