-
Notifications
You must be signed in to change notification settings - Fork 11
102 lines (78 loc) · 2.07 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: CI
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '0 0 1 * *' # Monthly
jobs:
build:
strategy:
fail-fast: false
matrix:
label:
- Linux
- Windows
- macOS
rust:
# Should be 1.17.0, but the cargo registry broke backwards compatibility:
# https://github.com/rust-lang/cargo/issues/14237
#
# It's possible to build on 1.17.0 by removing all serde dependencies and features.
- 1.19.0
- stable
- beta
include:
- label: Linux
os: ubuntu-24.04
- label: Windows
os: windows-2022
- label: macOS
os: macOS-14
name: test - ${{ matrix.rust }} - ${{ matrix.label }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: cargo build
- name: Test
run: cargo test
- name: Build (serde_support)
if: matrix.rust != '1.19.0'
run: cargo build --features serde_support
- name: Test (serde_support)
if: matrix.rust != '1.19.0'
run: cargo test --features serde_support
- name: Build (serde_support_test)
if: matrix.rust != '1.19.0'
run: cargo build --features serde_support_test
- name: Test (serde_support_test)
if: matrix.rust != '1.19.0'
run: cargo test --features serde_support_test
clippy:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Run clippy
run: cargo clippy --all --all-targets
rustfmt:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
with:
show-progress: false
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Run rustfmt
run: cargo fmt --all -- --check