8
8
- cron : " 32 4 * * 5"
9
9
10
10
jobs :
11
- Test :
12
- strategy :
13
- matrix :
14
- os : [ubuntu-latest, macos-latest, windows-latest]
15
- rust : [stable, beta]
16
- exclude :
17
- - os : macos-latest
18
- rust : beta
19
- - os : windows-latest
20
- rust : beta
21
- runs-on : ${{ matrix.os }}
22
- steps :
23
- - uses : actions/checkout@v4
24
- - uses : dtolnay/rust-toolchain@master
25
- with :
26
- toolchain : ${{ matrix.rust }}
27
- - uses : taiki-e/install-action@v2
28
- with :
29
- tool : cargo-nextest
30
- - uses : Swatinem/rust-cache@v2
31
- - run : cargo build --all-targets --features full
32
- - run : cargo nextest run --all-targets --no-tests=warn --features full
33
-
34
- Package :
35
- strategy :
36
- matrix :
37
- package : [
38
- examples/actix-web-app, fuzzing, rinja, rinja_derive, rinja_derive_standalone,
39
- rinja_parser, testing, testing-alloc, testing-no-std,
40
- ]
11
+ Step-0 :
41
12
runs-on : ubuntu-latest
42
- steps :
43
- - uses : actions/checkout@v4
44
- - uses : dtolnay/rust-toolchain@stable
45
- with :
46
- components : clippy
47
- - uses : taiki-e/install-action@v2
48
- with :
49
- tool : cargo-nextest
50
- - uses : Swatinem/rust-cache@v2
51
- - run : cd ${{ matrix.package }} && cargo nextest run --no-tests=warn
52
- - run : cd ${{ matrix.package }} && cargo clippy --all-targets -- -D warnings
53
13
54
- Docs :
55
- strategy :
56
- matrix :
57
- package : [rinja, rinja_derive, rinja_parser]
58
- runs-on : ubuntu-latest
59
- steps :
60
- - uses : actions/checkout@v4
61
- - uses : dtolnay/rust-toolchain@nightly
62
- - uses : Swatinem/rust-cache@v2
63
- - run : cd ${{ matrix.package }} && cargo doc --all-features --no-deps
64
- env :
65
- RUSTDOCFLAGS : -Z unstable-options --generate-link-to-definition --cfg=docsrs -D warnings
14
+ # # STEP 1: FASTEST #################################################################################
66
15
67
16
Rustfmt :
17
+ needs :
18
+ - Step-0
68
19
runs-on : ubuntu-latest
69
20
steps :
70
21
# No need to test `rinja_derive_standalone`. It has same the `src` folder as `rinja_derive`.
@@ -85,22 +36,32 @@ jobs:
85
36
cd - > /dev/null
86
37
done
87
38
88
- MSRV :
39
+ Docs :
40
+ needs :
41
+ - Step-0
42
+ strategy :
43
+ matrix :
44
+ package : [rinja, rinja_derive, rinja_parser]
89
45
runs-on : ubuntu-latest
90
46
steps :
91
47
- uses : actions/checkout@v4
92
- - uses : dtolnay/rust-toolchain@master
93
- with :
94
- toolchain : " 1.81.0"
95
- - run : cargo check --lib -p rinja --all-features
48
+ - uses : dtolnay/rust-toolchain@nightly
49
+ - uses : Swatinem/rust-cache@v2
50
+ - run : cd ${{ matrix.package }} && cargo doc --all-features --no-deps
51
+ env :
52
+ RUSTDOCFLAGS : -Z unstable-options --generate-link-to-definition --cfg=docsrs -D warnings
96
53
97
54
Audit :
55
+ needs :
56
+ - Step-0
98
57
runs-on : ubuntu-latest
99
58
steps :
100
59
- uses : actions/checkout@v4
101
60
- uses : EmbarkStudios/cargo-deny-action@v2
102
61
103
62
Book :
63
+ needs :
64
+ - Step-0
104
65
runs-on : ubuntu-latest
105
66
steps :
106
67
- uses : actions/checkout@v4
@@ -115,7 +76,29 @@ jobs:
115
76
run : $HOME/bin/mdbook build
116
77
working-directory : book
117
78
79
+ Typos :
80
+ needs :
81
+ - Step-0
82
+ runs-on : ubuntu-latest
83
+ steps :
84
+ - uses : actions/checkout@v4
85
+ - uses : crate-ci/typos@master
86
+
87
+ Jinja2-Assumptions :
88
+ needs :
89
+ - Step-0
90
+ runs-on : ubuntu-latest
91
+ steps :
92
+ - uses : actions/checkout@v4
93
+ - uses : actions/setup-python@v5
94
+ with :
95
+ python-version : ' 3.13'
96
+ - uses : astral-sh/setup-uv@v5
97
+ - run : testing/jinja2-assumptions/test.sh
98
+
118
99
DevSkim :
100
+ needs :
101
+ - Step-0
119
102
name : DevSkim
120
103
runs-on : ubuntu-latest
121
104
permissions :
@@ -134,6 +117,8 @@ jobs:
134
117
sarif_file : devskim-results.sarif
135
118
136
119
CargoSort :
120
+ needs :
121
+ - Step-0
137
122
name : Check order in Cargo.toml
138
123
runs-on : ubuntu-latest
139
124
steps :
@@ -151,7 +136,90 @@ jobs:
151
136
cd - > /dev/null
152
137
done
153
138
139
+ Step-1 :
140
+ runs-on : ubuntu-latest
141
+ needs :
142
+ - Rustfmt
143
+ - Docs
144
+ - Audit
145
+ - Book
146
+ - Typos
147
+ - Jinja2-Assumptions
148
+ - DevSkim
149
+ - CargoSort
150
+
151
+ # # STEP 2: INTERMEDIATE ############################################################################
152
+
153
+ Test :
154
+ needs :
155
+ - Step-1
156
+ strategy :
157
+ matrix :
158
+ os : [ubuntu-latest, macos-latest, windows-latest]
159
+ rust : [stable, beta]
160
+ exclude :
161
+ - os : macos-latest
162
+ rust : beta
163
+ - os : windows-latest
164
+ rust : beta
165
+ runs-on : ${{ matrix.os }}
166
+ steps :
167
+ - uses : actions/checkout@v4
168
+ - uses : dtolnay/rust-toolchain@master
169
+ with :
170
+ toolchain : ${{ matrix.rust }}
171
+ - uses : taiki-e/install-action@v2
172
+ with :
173
+ tool : cargo-nextest
174
+ - uses : Swatinem/rust-cache@v2
175
+ - run : cargo build --all-targets --features full
176
+ - run : cargo nextest run --all-targets --no-tests=warn --features full
177
+
178
+ Package :
179
+ needs :
180
+ - Step-1
181
+ strategy :
182
+ matrix :
183
+ package : [
184
+ examples/actix-web-app, fuzzing, rinja, rinja_derive, rinja_derive_standalone,
185
+ rinja_parser, testing, testing-alloc, testing-no-std,
186
+ ]
187
+ runs-on : ubuntu-latest
188
+ steps :
189
+ - uses : actions/checkout@v4
190
+ - uses : dtolnay/rust-toolchain@stable
191
+ with :
192
+ components : clippy
193
+ - uses : taiki-e/install-action@v2
194
+ with :
195
+ tool : cargo-nextest
196
+ - uses : Swatinem/rust-cache@v2
197
+ - run : cd ${{ matrix.package }} && cargo nextest run --no-tests=warn
198
+ - run : cd ${{ matrix.package }} && cargo clippy --all-targets -- -D warnings
199
+
200
+ MSRV :
201
+ needs :
202
+ - Step-1
203
+ runs-on : ubuntu-latest
204
+ steps :
205
+ - uses : actions/checkout@v4
206
+ - uses : dtolnay/rust-toolchain@master
207
+ with :
208
+ toolchain : " 1.81.0"
209
+ - run : cargo check --lib -p rinja --all-features
210
+
211
+ Step-2 :
212
+ runs-on : ubuntu-latest
213
+ needs :
214
+ - Test
215
+ - Package
216
+ - MSRV
217
+
218
+ # # STEP 3: SLOW ####################################################################################
219
+
154
220
Fuzz :
221
+ needs :
222
+ - Step-2
155
223
strategy :
156
224
matrix :
157
225
fuzz_target :
@@ -162,20 +230,21 @@ jobs:
162
230
runs-on : ubuntu-latest
163
231
steps :
164
232
- uses : actions/checkout@v4
165
- with :
166
- submodules : recursive
233
+ - run : git submodule update --remote
167
234
- uses : dtolnay/rust-toolchain@master
168
235
with :
169
236
toolchain : nightly
170
237
components : rust-src
171
238
- run : curl --location --silent --show-error --fail https://github.com/cargo-bins/cargo-quickinstall/releases/download/cargo-fuzz-0.12.0/cargo-fuzz-0.12.0-x86_64-unknown-linux-gnu.tar.gz | tar -xzvvf - -C $HOME/.cargo/bin
172
239
- uses : Swatinem/rust-cache@v2
173
- - run : cargo fuzz run ${{ matrix.fuzz_target }} --jobs 4 -- -max_total_time=120
240
+ - run : cargo fuzz run ${{ matrix.fuzz_target }} --jobs 4 -- -max_total_time=240
174
241
working-directory : fuzzing
175
242
env :
176
243
RUSTFLAGS : ' -Ctarget-feature=-crt-static'
177
244
178
245
Cluster-Fuzz :
246
+ needs :
247
+ - Step-2
179
248
runs-on : ubuntu-latest
180
249
permissions :
181
250
security-events : write
@@ -205,19 +274,3 @@ jobs:
205
274
with :
206
275
sarif_file : cifuzz-sarif/results.sarif
207
276
checkout_path : cifuzz-sarif
208
-
209
- Typos :
210
- runs-on : ubuntu-latest
211
- steps :
212
- - uses : actions/checkout@v4
213
- - uses : crate-ci/typos@master
214
-
215
- Jinja2-Assumptions :
216
- runs-on : ubuntu-latest
217
- steps :
218
- - uses : actions/checkout@v4
219
- - uses : actions/setup-python@v5
220
- with :
221
- python-version : ' 3.13'
222
- - uses : astral-sh/setup-uv@v5
223
- - run : testing/jinja2-assumptions/test.sh
0 commit comments