-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.08 KB
/
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
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
name: Rust
jobs:
fmt:
runs-on: ubuntu-latest
steps:
- name: Install packages
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: rustfmt
run: cargo fmt -- --check
build_and_test:
name: Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- if: matrix.os == 'ubuntu-latest'
run: sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: cargo test (stable)
run: cargo test --verbose
- uses: dtolnay/rust-toolchain@beta
- name: cargo test (beta)
run: cargo test --verbose
- uses: dtolnay/rust-toolchain@nightly
- name: cargo test (nightly)
run: cargo test --verbose