forked from open-telemetry/otel-arrow
-
Notifications
You must be signed in to change notification settings - Fork 0
215 lines (204 loc) · 7.32 KB
/
rust-ci.yml
File metadata and controls
215 lines (204 loc) · 7.32 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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
name: Rust-CI
permissions:
contents: read
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test_and_coverage:
strategy:
fail-fast: false
matrix:
folder:
- otap-dataflow
- beaubourg
- otel-arrow-rust
- experimental/query_abstraction
- experimental/syslog-cef-receivers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # latest on /master branch as of 2025-04-02
with:
toolchain: stable
- name: install cargo-llvm-cov
uses: taiki-e/install-action@5075451c95db43b063f20f0c8fef04c04d5bf0ba # cargo-llvm-cov
- name: Run tests with coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
working-directory: ./rust/${{ matrix.folder }}
- name: Upload to codecov.io
uses: codecov/codecov-action@ad3126e916f78f00edff4ed0317cf185271ccc2d # v5.4.2
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true
fmt:
strategy:
fail-fast: false
matrix:
folder:
- otap-dataflow
- beaubourg
- otel-arrow-rust
- experimental/query_abstraction
- experimental/syslog-cef-receivers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # latest on /master branch as of 2025-04-02
with:
toolchain: nightly
components: rustfmt
- name: cargo fmt ${{ matrix.folder }}
run: cargo fmt --all -- --check
working-directory: ./rust/${{ matrix.folder }}
clippy:
strategy:
fail-fast: false
matrix:
folder:
- otap-dataflow
- beaubourg
- otel-arrow-rust
- experimental/query_abstraction
- experimental/syslog-cef-receivers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # latest on /master branch as of 2025-04-02
with:
toolchain: stable
components: clippy
- name: cargo clippy ${{ matrix.folder }}
# To not block initial checkin of CI, removing build break on warnings for now
# TODO: re-enable '-- -D warnings' when we have fixed all clippy warnings
run: cargo clippy --all-targets --all-features
working-directory: ./rust/${{ matrix.folder }}
deny:
strategy:
fail-fast: false
matrix:
folder:
- otap-dataflow
- beaubourg
- otel-arrow-rust
- experimental/query_abstraction
- experimental/syslog-cef-receivers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # latest on /master branch as of 2025-04-02
with:
toolchain: stable
- name: advisories
if: '!cancelled()'
uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
with:
command: check advisories
manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml
- name: licenses
if: '!cancelled()'
uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
with:
command: check licenses
manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml
- name: bans
if: '!cancelled()'
uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
with:
command: check bans
manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml
- name: sources
if: '!cancelled()'
uses: EmbarkStudios/cargo-deny-action@34899fc7ba81ca6268d5947a7a16b4649013fea1 # v2.0.11
with:
command: check sources
manifest-path: ./rust/${{ matrix.folder }}/Cargo.toml
bench:
strategy:
fail-fast: false
matrix:
folder:
- otap-dataflow
- beaubourg
- otel-arrow-rust
- experimental/query_abstraction
- experimental/syslog-cef-receivers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # latest on /master branch as of 2025-04-02
with:
toolchain: stable
- name: cargo bench ${{ matrix.folder }}
run: cargo bench
working-directory: ./rust/${{ matrix.folder }}
docs:
strategy:
fail-fast: false
matrix:
folder:
- otap-dataflow
- beaubourg
- otel-arrow-rust
- experimental/query_abstraction
- experimental/syslog-cef-receivers
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # latest on /master branch as of 2025-04-02
with:
toolchain: stable
- name: cargo doc ${{ matrix.folder }}
run: cargo doc --no-deps
working-directory: ./rust/${{ matrix.folder }}
structure_check:
strategy:
fail-fast: false
matrix:
# Only otap-dataflow has a structure check
folder: [otap-dataflow]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: true
- uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3.0.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: dtolnay/rust-toolchain@56f84321dbccf38fb67ce29ab63e4754056677e0 # latest on /master branch as of 2025-04-02
with:
toolchain: stable
- name: cargo xtask ${{ matrix.folder }}
run: cargo xtask structure-check
working-directory: ./rust/${{ matrix.folder }}