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
|
|
|
|
|
|
|
|
_FEATURES = minimal default wasm full 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 =
|
2021-11-29 17:30:21 +00:00
|
|
|
_FEATURES_wasm = --features "derive cargo env unicode yaml regex unstable-replace unstable-multicall unstable-grouped"
|
|
|
|
_FEATURES_full = --features "derive cargo env unicode yaml regex unstable-replace unstable-multicall unstable-grouped wrap_help doc"
|
2021-11-17 19:55:28 +00:00
|
|
|
_FEATURES_debug = ${_FEATURES_full} --features debug
|
|
|
|
_FEATURES_release = ${_FEATURES_full} --release
|
|
|
|
|
|
|
|
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-11-23 22:09:31 +00:00
|
|
|
cargo test ${_FEATURES_${@:test-%=%}} --all-targets ${ARGS}
|
2021-11-30 15:49:21 +00:00
|
|
|
cargo test ${_FEATURES_${@:test-%=%}} --doc ${ARGS}
|