2021-11-17 19:55:28 +00: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 22:10:32 +00:00
|
|
|
ARGS?=--workspace
|
2021-11-17 19:55:28 +00:00
|
|
|
TOOLCHAIN_TARGET ?=
|
|
|
|
ifneq (${TOOLCHAIN_TARGET},)
|
|
|
|
ARGS+=--target ${TOOLCHAIN_TARGET}
|
|
|
|
endif
|
|
|
|
|
2023-01-09 18:29:41 +00:00
|
|
|
MSRV?=1.64.0
|
2022-02-23 15:03:18 +00:00
|
|
|
|
2021-12-08 03:18:35 +00:00
|
|
|
_FEATURES = minimal default wasm full debug release
|
2021-11-23 21:59:56 +00:00
|
|
|
_FEATURES_minimal = --no-default-features --features "std"
|
2021-11-17 19:55:28 +00:00
|
|
|
_FEATURES_default =
|
2023-01-13 03:36:02 +00:00
|
|
|
_FEATURES_wasm = --no-default-features --features "std help usage error-context suggestions" --features "deprecated derive cargo env unicode string unstable-replace"
|
|
|
|
_FEATURES_full = --features "deprecated derive cargo env unicode string unstable-replace wrap_help"
|
2022-07-22 14:19:14 +00:00
|
|
|
_FEATURES_next = ${_FEATURES_full} --features unstable-v5
|
2022-09-02 18:11:11 +00:00
|
|
|
_FEATURES_debug = ${_FEATURES_full} --features debug --features clap_complete/debug
|
2021-11-17 19:55:28 +00:00
|
|
|
_FEATURES_release = ${_FEATURES_full} --release
|
|
|
|
|
2023-01-03 15:16:48 +00:00
|
|
|
check-wasm:
|
|
|
|
cargo check ${_FEATURES_${@:check-%=%}} ${ARGS}
|
|
|
|
|
2021-11-17 19:55:28 +00:00
|
|
|
check-%:
|
2021-11-18 17:52:09 +00:00
|
|
|
cargo check ${_FEATURES_${@:check-%=%}} --all-targets ${ARGS}
|
2021-11-17 19:55:28 +00:00
|
|
|
|
|
|
|
build-%:
|
2021-11-23 22:09:31 +00:00
|
|
|
cargo test ${_FEATURES_${@:build-%=%}} --all-targets --no-run ${ARGS}
|
2021-11-17 19:55:28 +00:00
|
|
|
|
|
|
|
test-%:
|
2021-12-07 14:24:13 +00:00
|
|
|
cargo test ${_FEATURES_${@:test-%=%}} ${ARGS}
|
2021-12-08 03:18:35 +00:00
|
|
|
|
|
|
|
clippy-%:
|
2022-02-15 18:36:19 +00:00
|
|
|
cargo clippy ${_FEATURES_${@:clippy-%=%}} ${ARGS} --all-targets -- -D warnings -A deprecated
|
2022-02-23 15:03:18 +00:00
|
|
|
|
2022-04-26 14:01:44 +00:00
|
|
|
test-ui-%:
|
|
|
|
cargo +${MSRV} test --test derive_ui --features derive ${_FEATURES_${@:test-ui-%=%}}
|
2022-06-03 16:01:53 +00:00
|
|
|
|
|
|
|
doc:
|
|
|
|
cargo doc --workspace --all-features --no-deps --document-private-items
|