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
name: CI
on:
push:
branches:
pull_request:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
# The interop tests skip when `git` is not on PATH so a bare dev box can
# still run `cargo test`; in CI a missing git must fail instead of passing
# vacuously.
PUREGIT_REQUIRE_GIT: "1"
jobs:
test:
name: Test & lint (${{ matrix.os }}, ${{ matrix.build.name }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
# Several feature surfaces ship in the crate. Build & test each on every
# PR so none rots: the std default, the no_std core (compile-checked —
# the test harness itself needs std), and the full surface (server +
# both network transports). The flags live on the matrix entry to keep
# the steps shell-portable across Linux/macOS/Windows runners.
build:
- name: default
flags: ""
test: true
- name: full
flags: "--features full"
test: true
- name: no-std
flags: "--no-default-features"
test: false
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets ${{ matrix.build.flags }} -- -D warnings
- name: Build
run: cargo build --all-targets ${{ matrix.build.flags }}
- name: Test
if: ${{ matrix.build.test }}
run: cargo test ${{ matrix.build.flags }}
- name: Doc
run: cargo doc --no-deps ${{ matrix.build.flags }}
env:
RUSTDOCFLAGS: -D warnings