• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# CI Steps
2#
3# Considerations
4# - Easy to debug: show the command being run
5# - Leverage CI features: Only run individual steps so we can use features like reporting elapsed time per step
6
7ARGS?=--workspace
8TOOLCHAIN_TARGET ?=
9ifneq (${TOOLCHAIN_TARGET},)
10  ARGS+=--target ${TOOLCHAIN_TARGET}
11endif
12
13MSRV?=1.64.0
14
15_FEATURES = minimal default wasm full debug release
16_FEATURES_minimal = --no-default-features --features "std"
17_FEATURES_default =
18_FEATURES_wasm = --no-default-features --features "std help usage error-context suggestions" --features "deprecated derive cargo env unicode string unstable-replace"
19_FEATURES_full = --features "deprecated derive cargo env unicode string unstable-replace wrap_help"
20_FEATURES_next = ${_FEATURES_full} --features unstable-v5
21_FEATURES_debug = ${_FEATURES_full} --features debug --features clap_complete/debug
22_FEATURES_release = ${_FEATURES_full} --release
23
24check-wasm:
25	cargo check ${_FEATURES_${@:check-%=%}} ${ARGS}
26
27check-%:
28	cargo check ${_FEATURES_${@:check-%=%}} --all-targets ${ARGS}
29
30build-%:
31	cargo test ${_FEATURES_${@:build-%=%}} --all-targets --no-run ${ARGS}
32
33test-%:
34	cargo test ${_FEATURES_${@:test-%=%}} ${ARGS}
35
36clippy-%:
37	cargo clippy ${_FEATURES_${@:clippy-%=%}} ${ARGS} --all-targets -- -D warnings -A deprecated
38
39test-ui-%:
40	cargo +${MSRV} test --test derive_ui --features derive ${_FEATURES_${@:test-ui-%=%}}
41
42doc:
43	cargo doc --workspace --all-features --no-deps --document-private-items
44