-
Notifications
You must be signed in to change notification settings - Fork 5
119 lines (100 loc) · 3.24 KB
/
Copy pathrust-workspace-ci.yml
File metadata and controls
119 lines (100 loc) · 3.24 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Rust Workspace CI
on:
pull_request:
push:
permissions:
contents: read
concurrency:
group: rust-workspace-ci-${{ github.ref }}
cancel-in-progress: true
env:
# GitHub Actions runner Node 20 -> Node 24 deprecation (effective 2026-06-02).
# Forces JS-based actions onto Node 24 ahead of the cutover.
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
docs-sync:
name: docs-sync
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y ripgrep
- name: Check docs/code sync
run: bash scripts/check-doc-sync.sh
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
timeout-minutes: 10
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Cache Cargo build artifacts
uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check
clippy:
name: clippy
runs-on: ubuntu-latest
timeout-minutes: 20
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Install Linux build deps (libdbus for keyring crate)
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
- name: Cache Cargo build artifacts
uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --workspace --all-targets --locked -- -D warnings
cargo-check:
name: cargo-check (workspace)
runs-on: ubuntu-latest
timeout-minutes: 30
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps (libdbus for keyring crate)
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
- name: Cache Cargo build artifacts
uses: Swatinem/rust-cache@v2
- name: Check workspace
# Workspace-wide check keeps every runtime-critical crate covered
# (see docs/guides/ci-cd.md) without a manual matrix that drifts
# from the doc list. Single job + shared cache is also cheaper
# than the prior fan-out.
run: cargo check --locked --all-targets --workspace
smoke-help:
name: smoke-help
runs-on: ubuntu-latest
timeout-minutes: 20
needs: cargo-check
env:
CARGO_TERM_COLOR: always
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux build deps (libdbus for keyring crate)
run: sudo apt-get update && sudo apt-get install -y libdbus-1-dev pkg-config
- name: Cache Cargo build artifacts
uses: Swatinem/rust-cache@v2
- name: Smoke test animus help
run: cargo run --locked -p orchestrator-cli --bin animus -- --help