-
-
Notifications
You must be signed in to change notification settings - Fork 200
68 lines (62 loc) · 1.48 KB
/
Copy pathbuild.yml
File metadata and controls
68 lines (62 loc) · 1.48 KB
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
58
59
60
61
62
63
64
65
66
67
68
name: Build
on:
pull_request:
paths:
- '**.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
push:
branches:
- main
paths:
- '**.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
merge_group:
paths:
- '**.rs'
- '**/Cargo.toml'
- 'Cargo.lock'
env:
CARGO_TERM_COLOR: always
jobs:
build-check-clippy-test:
name: Build, Check, Clippy, & Test
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-C linker=clang -C link-arg=-fuse-ld=mold"
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
build-essential \
git \
pkg-config \
mold \
clang \
libdbus-1-dev \
libudev-dev \
libxkbcommon-dev \
libfontconfig1-dev \
libasound2-dev \
libx11-xcb-dev
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Check
run: cargo check --locked --profile ci
- name: Clippy
run: cargo clippy --locked --profile ci --workspace --all-targets -- -D warnings
- uses: taiki-e/install-action@v2
with:
tool: cargo-nextest
- name: Test
run: cargo nextest run --locked --profile ci --workspace --all-targets