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: rust
on:
push:
branches:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
# fmt and clippy are byte-identical work on every OS - there is no cfg(unix)
# or cfg(windows) in the tree - and clippy's check-only artifacts do not seed
# the codegen build that `cargo test` needs. Running them once, here, avoids
# paying a second full pass over the dependency tree on the macOS runner.
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all --check
# Lint levels come from [lints] in Cargo.toml, not from flags here.
- name: Clippy
run: cargo clippy --all-targets --all-features
test-linux:
name: test (ubuntu-latest)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-targets --all-features
test-macos:
name: test (macos-latest)
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo test --all-targets --all-features
msrv:
name: msrv (1.88)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
# If this breaks, the MSRV in Cargo.toml is wrong - do not paper over it
# by bumping the toolchain here. It has moved once already: `ignore`
# 0.4.30 raised the real floor to 1.88 while open-agent-sdk still asks
# for 1.85, and declares no `rust-version`, so the first sign was a
# compile error in a dependency.
- uses: dtolnay/rust-toolchain@1.88.0
- uses: Swatinem/rust-cache@v2
# No --all-targets: MSRV is a property of [dependencies]. Whether the dev
# dependencies build on 1.85 has no consumer.
- run: cargo check