-
Notifications
You must be signed in to change notification settings - Fork 9
57 lines (47 loc) · 1.23 KB
/
ci.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
46
47
48
49
50
51
52
53
54
55
56
57
name: CI
on:
push:
branches:
- main
pull_request:
merge_group:
jobs:
rustfmt:
runs-on: ubuntu-latest
name: cargo fmt
steps:
- uses: actions/checkout@v4
- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: rustfmt
- name: cargo fmt
run: cargo fmt --all --check
test-stable:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-24.04]
name: cargo clippy + test
steps:
- uses: actions/checkout@v4
- name: install additional linux dependencies
run: |
sudo apt update
sudo apt install llvm liblldb-dev
if: contains(matrix.os, 'ubuntu')
- name: install additional macOS dependencies
run: |
brew install llvm
echo "`brew --prefix llvm`/bin" >> $GITHUB_PATH
if: contains(matrix.os, 'macos')
- name: install stable toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- name: cargo clippy
run: cargo clippy --all-targets -- -D warnings
- name: cargo test
run: cargo test