-
-
Notifications
You must be signed in to change notification settings - Fork 6
95 lines (75 loc) · 2.18 KB
/
ci.yml
File metadata and controls
95 lines (75 loc) · 2.18 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: CI
env:
CARGO_TERM_COLOR: always
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
NIGHTLY: nightly-2026-04-17
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
style:
name: Style
uses: ruma/ruma/.github/workflows/style.yml@main
msrv:
name: Minimum Supported Rust Version / Check All Features
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Install MSRV toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: "1.89"
- uses: Swatinem/rust-cache@v2
with:
# A stable compiler update should automatically not reuse old caches.
# Add the MSRV as a stable cache key too so bumping it also gets us a
# fresh cache.
shared-key: msrv1.89
- name: Run checks
run: cargo check --all-features
stable:
name: Rust Stable / ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Check All Features
cmd: check --all-features
- name: Run Tests
cmd: test --all-features
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Install rust stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Run checks
run: cargo ${{ matrix.cmd }}
nightly:
name: Rust Nightly / ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
include:
- name: Check Formatting
cmd: fmt --check
components: rustfmt
- name: All Features
cmd: check --all-features
- name: Clippy Default Features
cmd: clippy --all-features --all-targets -- -D warnings
components: clippy
steps:
- name: Checkout repo
uses: actions/checkout@v6
- name: Install rust nightly toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.NIGHTLY }}
components: ${{ matrix.components }}
- uses: Swatinem/rust-cache@v2
- name: Run checks
run: cargo ${{ matrix.cmd }}