2021-11-17 13:55:28 -06:00
|
|
|
# CI Steps
|
|
|
|
#
|
|
|
|
# Considerations
|
|
|
|
# - Easy to debug: show the command being run
|
|
|
|
# - Leverage CI features: Only run individual steps so we can use features like reporting elapsed time per step
|
|
|
|
|
2021-11-23 16:10:32 -06:00
|
|
|
ARGS?=--workspace
|
2021-11-17 13:55:28 -06:00
|
|
|
TOOLCHAIN_TARGET ?=
|
|
|
|
ifneq (${TOOLCHAIN_TARGET},)
|
|
|
|
ARGS+=--target ${TOOLCHAIN_TARGET}
|
|
|
|
endif
|
|
|
|
|
2024-10-23 13:54:45 +00:00
|
|
|
STABLE?=1.82
|
2022-02-23 09:03:18 -06:00
|
|
|
|
2021-12-07 21:18:35 -06:00
|
|
|
_FEATURES = minimal default wasm full debug release
|
2021-11-23 15:59:56 -06:00
|
|
|
_FEATURES_minimal = --no-default-features --features "std"
|
2021-11-17 13:55:28 -06:00
|
|
|
_FEATURES_default =
|
2023-03-28 00:26:18 -05:00
|
|
|
_FEATURES_wasm = --no-default-features --features "std help usage error-context suggestions" --features "deprecated derive cargo env unicode string"
|
2024-08-07 10:30:00 -05:00
|
|
|
_FEATURES_full = --features "deprecated derive cargo env unicode string wrap_help unstable-ext"
|
2022-07-22 09:19:14 -05:00
|
|
|
_FEATURES_next = ${_FEATURES_full} --features unstable-v5
|
2022-09-02 20:11:11 +02:00
|
|
|
_FEATURES_debug = ${_FEATURES_full} --features debug --features clap_complete/debug
|
2021-11-17 13:55:28 -06:00
|
|
|
_FEATURES_release = ${_FEATURES_full} --release
|
|
|
|
|
2023-01-03 09:16:48 -06:00
|
|
|
check-wasm:
|
|
|
|
cargo check ${_FEATURES_${@:check-%=%}} ${ARGS}
|
|
|
|
|
2021-11-17 13:55:28 -06:00
|
|
|
check-%:
|
2021-11-18 11:52:09 -06:00
|
|
|
cargo check ${_FEATURES_${@:check-%=%}} --all-targets ${ARGS}
|
2021-11-17 13:55:28 -06:00
|
|
|
|
|
|
|
build-%:
|
2021-11-23 16:09:31 -06:00
|
|
|
cargo test ${_FEATURES_${@:build-%=%}} --all-targets --no-run ${ARGS}
|
2021-11-17 13:55:28 -06:00
|
|
|
|
|
|
|
test-%:
|
2021-12-07 08:24:13 -06:00
|
|
|
cargo test ${_FEATURES_${@:test-%=%}} ${ARGS}
|
2021-12-07 21:18:35 -06:00
|
|
|
|
|
|
|
clippy-%:
|
2022-02-15 12:36:19 -06:00
|
|
|
cargo clippy ${_FEATURES_${@:clippy-%=%}} ${ARGS} --all-targets -- -D warnings -A deprecated
|
2022-02-23 09:03:18 -06:00
|
|
|
|
2022-04-26 22:01:44 +08:00
|
|
|
test-ui-%:
|
2024-08-28 14:02:23 -05:00
|
|
|
cargo +${STABLE} test --test derive_ui --features derive,unstable-derive-ui-tests ${_FEATURES_${@:test-ui-%=%}}
|
2022-06-03 11:01:53 -05:00
|
|
|
|
|
|
|
doc:
|
|
|
|
cargo doc --workspace --all-features --no-deps --document-private-items
|