forked from k0sti/rust-contextvm-sdk
-
Notifications
You must be signed in to change notification settings - Fork 7
67 lines (61 loc) · 1.91 KB
/
Copy pathci.yml
File metadata and controls
67 lines (61 loc) · 1.91 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
name: CI
# Quality gates for the Rust SDK + FFI workspace.
# Runs on every push/PR to main and on version tags. FFI artifact/release
# packaging lives in ffi.yml.
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
lint:
name: fmt + clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: rustfmt
run: cargo fmt --all -- --check
- name: clippy (all features)
run: cargo clippy --all --all-features --all-targets -- -D warnings
test:
name: check + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: check (all features)
run: cargo check --all --all-features
- name: test (all features)
# Includes the FFI crate. `nak-tests` no-ops when the `nak` CLI is
# absent from PATH (see contextvm-ffi/Cargo.toml).
run: cargo test --all --all-features
- name: test (no default features)
run: cargo test --no-default-features
- name: doc
run: cargo doc --no-deps --all-features
- name: rmcp integration example
run: cargo run --example rmcp_integration_test --features rmcp -- local
msrv:
name: MSRV 1.88
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88
- uses: Swatinem/rust-cache@v2
# Regenerate the lockfile so dependencies resolve to versions that still
# support the declared MSRV (1.88).
- name: Remove lockfile
run: rm -f Cargo.lock
- name: check
run: cargo check --all-features
- name: test
run: cargo test --all-features