@@ -184,34 +184,36 @@ unit-tests:
184
184
unit-tests-flaky :
185
185
cargo test -p gix --features async-network-client-async-std
186
186
187
- # Depend on this to pre-generate metadata , and/or use it inside a recipe as `"$({{ j }} dbg)"`
187
+ # Extract cargo metadata, excluding dependencies , and query it
188
188
[private ]
189
- dbg :
190
- set -eu; \
191
- target_dir=" $(cargo metadata --format-version 1 | jq -r .target_directory)" ; \
192
- test -n " $target_dir" ; \
193
- echo " $target_dir/debug"
189
+ query-meta jq -query :
190
+ meta=" $(cargo metadata --format-version 1 --no-deps)" && \
191
+ printf ' %s\n' " $meta" | jq --exit-status --raw-output -- {{ quote (jq-query) }}
192
+
193
+ # Get the path to the directory where debug binaries are created during builds
194
+ [private ]
195
+ dbg : (query-meta ' .target_directory + "/debug"' )
194
196
195
197
# Run journey tests (`max`)
196
- journey-tests : dbg
198
+ journey-tests :
197
199
cargo build --features http-client-curl-rustls
198
200
cargo build -p gix-testtools --bin jtt
199
201
dbg=" $({{ j }} dbg)" && tests/ journey.sh " $dbg/ein" " $dbg/gix" " $dbg/jtt" max
200
202
201
203
# Run journey tests (`max-pure`)
202
- journey-tests-pure : dbg
204
+ journey-tests-pure :
203
205
cargo build --no-default-features --features max-pure
204
206
cargo build -p gix-testtools --bin jtt
205
207
dbg=" $({{ j }} dbg)" && tests/ journey.sh " $dbg/ein" " $dbg/gix" " $dbg/jtt" max-pure
206
208
207
209
# Run journey tests (`small`)
208
- journey-tests-small : dbg
210
+ journey-tests-small :
209
211
cargo build --no-default-features --features small
210
212
cargo build -p gix-testtools
211
213
dbg=" $({{ j }} dbg)" && tests/ journey.sh " $dbg/ein" " $dbg/gix" " $dbg/jtt" small
212
214
213
215
# Run journey tests (`lean-async`)
214
- journey-tests-async : dbg
216
+ journey-tests-async :
215
217
cargo build --no-default-features --features lean-async
216
218
cargo build -p gix-testtools
217
219
dbg=" $({{ j }} dbg)" && tests/ journey.sh " $dbg/ein" " $dbg/gix" " $dbg/jtt" async
@@ -238,16 +240,25 @@ cross-test-android: (cross-test 'armv7-linux-androideabi' '--no-default-features
238
240
check-size :
239
241
etc/ check-package-size.sh
240
242
241
- # This assumes the current default toolchain is the Minimal Supported Rust Version and checks
242
- # against it. This is run on CI in `msrv.yml`, after the MSRV toolchain is installed and set as
243
- # default, and after dependencies in `Cargo.lock` are downgraded to the latest MSRV-compatible
244
- # versions. Only if those or similar steps are done first does this work to validate the MSRV.
245
- #
246
- # Check the MSRV, *if* the toolchain is set and `Cargo.lock` is downgraded (used on CI)
247
- ci-check-msrv :
248
- rustc --version
249
- cargo build --locked -p gix
250
- cargo build --locked -p gix --no-default-features --features async-network-client,max-performance
243
+ # Report the Minimum Supported Rust Version (the `rust-version` of `gix`) in X.Y.Z form
244
+ msrv : (query-meta '''
245
+ .packages[]
246
+ | select(.name == " gix" )
247
+ | .rust_version
248
+ | sub(" (?<xy>^[0-9]+[.][0-9]+$)" ; " \( .xy).0" )
249
+ ''' )
250
+
251
+ # Regenerate the MSRV badge SVG
252
+ msrv-badge:
253
+ msrv="$({{ j }} msrv)" && \
254
+ sed "s/{MSRV}/$msrv/g" etc/msrv-badge.template.svg >etc/msrv-badge.svg
255
+
256
+ # Check if `gix` and its dependencies, as currently locked, build with `rust-version`
257
+ check-rust-version rust-version:
258
+ rustc +{{ rust-version }} --version
259
+ cargo +{{ rust-version }} build --locked -p gix
260
+ cargo +{{ rust-version }} build --locked -p gix \
261
+ --no-default-features --features async-network-client,max-performance
251
262
252
263
# Enter a nix-shell able to build on macOS
253
264
nix-shell-macos:
0 commit comments