14
14
merge_group :
15
15
16
16
env :
17
- CARGO_TERM_COLOR : always
18
- CARGO_INCREMENTAL : ' 0'
19
- CARGO_PROFILE_DEV_DEBUG : ' 0'
17
+ # CARGO_TERM_COLOR: always
18
+ # CARGO_INCREMENTAL: '0'
19
+ # CARGO_PROFILE_DEV_DEBUG: '0'
20
20
RUST_TOOLCHAIN_VERSION : " 1.80.1"
21
- RUSTFLAGS : " -D warnings"
22
- RUSTDOCFLAGS : " -D warnings"
21
+ # RUSTFLAGS: "-D warnings"
22
+ # RUSTDOCFLAGS: "-D warnings"
23
23
RUST_LOG : " info"
24
24
25
25
jobs :
26
- # Identify unused dependencies
27
- run_udeps :
28
- name : Run Cargo Udeps
29
- runs-on : ubuntu-latest
30
- env :
31
- RUSTC_BOOTSTRAP : 1
32
- steps :
33
- - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
34
- - uses : dtolnay/rust-toolchain@master
35
- with :
36
- toolchain : ${{ env.RUST_TOOLCHAIN_VERSION }}
37
- - uses : Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
38
- with :
39
- key : udeps
40
- -
run :
cargo install --locked [email protected]
41
- - run : cargo udeps --all-targets
42
-
43
- run_cargodeny :
44
- name : Run Cargo Deny
45
- runs-on : ubuntu-latest
46
- strategy :
47
- matrix :
48
- checks :
49
- - advisories
50
- - bans licenses sources
51
-
52
- # Prevent sudden announcement of a new advisory from failing ci:
53
- continue-on-error : ${{ matrix.checks == 'advisories' }}
54
-
55
- steps :
56
- - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
57
- - uses : EmbarkStudios/cargo-deny-action@3f4a782664881cf5725d0ffd23969fcce89fd868 # v1.6.3
58
- with :
59
- command : check ${{ matrix.checks }}
60
-
61
- run_rustfmt :
62
- name : Run Rustfmt
63
- runs-on : ubuntu-latest
64
- steps :
65
- - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
66
- - uses : dtolnay/rust-toolchain@master
67
- with :
68
- toolchain : ${{ env.RUST_TOOLCHAIN_VERSION }}
69
- components : rustfmt
70
- - uses : Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
71
- with :
72
- key : fmt
73
- - run : cargo fmt --all -- --check
74
-
75
- run_clippy :
76
- name : Run Clippy
77
- runs-on : ubuntu-latest
78
- steps :
79
- - name : Install host dependencies
80
- run : |
81
- sudo apt-get update
82
- sudo apt-get install protobuf-compiler krb5-user libkrb5-dev libclang-dev liblzma-dev libssl-dev pkg-config
83
- - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
84
- with :
85
- submodules : recursive
86
- - uses : dtolnay/rust-toolchain@master
87
- with :
88
- toolchain : ${{ env.RUST_TOOLCHAIN_VERSION }}
89
- components : clippy
90
- - uses : Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
91
- with :
92
- key : clippy
93
- - name : Run clippy action to produce annotations
94
- # NOTE (@Techassi): This action might get a new release sonn, because it
95
- # currently uses Node 16, which is deprecated in the next few months by
96
- # GitHub. See https://github.com/giraffate/clippy-action/pull/87
97
- uses : giraffate/clippy-action@13b9d32482f25d29ead141b79e7e04e7900281e0 # v1.0.1
98
- env :
99
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
100
- if : env.GITHUB_TOKEN != null && github.event.pull_request.draft == false
101
- with :
102
- clippy_flags : --all-targets -- -D warnings
103
- reporter : ' github-pr-review'
104
- github_token : ${{ secrets.GITHUB_TOKEN }}
105
- - name : Run clippy manually without annotations
106
- env :
107
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
108
- if : env.GITHUB_TOKEN == null
109
- run : cargo clippy --color never -q --all-targets -- -D warnings
110
-
111
- run_rustdoc :
112
- name : Run RustDoc
113
- runs-on : ubuntu-latest
114
- steps :
115
- - uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
116
- - uses : dtolnay/rust-toolchain@master
117
- with :
118
- toolchain : ${{ env.RUST_TOOLCHAIN_VERSION }}
119
- components : rustfmt
120
- - uses : Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
121
- with :
122
- key : doc
123
- - run : cargo doc --document-private-items
124
-
125
26
run_tests :
126
27
name : Run Cargo Tests
127
- needs :
128
- - run_cargodeny
129
- - run_clippy
130
- - run_rustfmt
131
- - run_rustdoc
132
28
runs-on : ubuntu-latest
133
29
steps :
134
30
- uses : actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4.1.5
@@ -139,13 +35,3 @@ jobs:
139
35
with :
140
36
key : test
141
37
- run : cargo test
142
-
143
- tests_passed :
144
- name : All tests passed
145
- needs :
146
- - run_udeps
147
- - run_tests
148
- runs-on : ubuntu-latest
149
- steps :
150
- - name : log
151
- run : echo All tests have passed!
0 commit comments