Repository navigation
75 lines (57 loc) · 2.12 KB
/
Copy pathci.yml
File metadata and controls
75 lines (57 loc) · 2.12 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
69
70
71
72
73
74
75
name: CI
on:
push:
branches: [main, dev]
pull_request:
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
test:
name: Build and test
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
# The launcher links libc, libm, libgcc_s and libudev and opens
# everything else at run time, so libudev's headers and a toolchain are
# the whole build environment. gilrs finds libudev through pkg-config.
- name: Install libudev
run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends libudev-dev
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build
run: cargo build --workspace --locked --all-targets
- name: Test
run: cargo test --workspace --locked
clippy:
name: Clippy
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Install libudev
run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends libudev-dev
# Pinned, not @stable: every six-week release adds lints, and with
# -D warnings that turns a toolchain bump into a red main on a commit
# that changed nothing. Bumped deliberately, as its own commit.
# Its own job so it keeps its own cache; sharing one with the @stable
# build would invalidate every artifact on both sides.
- uses: dtolnay/rust-toolchain@1.99.0
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --workspace --locked --all-targets
msrv:
name: Minimum supported Rust version
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v5
- name: Install libudev
run: sudo apt-get update && sudo apt-get install --yes --no-install-recommends libudev-dev
# Cargo.toml promises 1.90; this is what keeps that promise true.
# The floor is wgpu-hal's ordered-float, reached through iced.
- uses: dtolnay/rust-toolchain@1.90.0
- uses: Swatinem/rust-cache@v2
- name: Check
run: cargo check --workspace --locked