Split features and build args handling in build (#257)

This commit is contained in:
Félix Saparelli 2022-07-30 17:27:49 +12:00 committed by GitHub
parent 47fd7c14a6
commit ac995798ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 5 deletions

View file

@ -2,17 +2,25 @@ if $for_release then {
output: "release",
profile: "release",
args: ($matrix.release_build_args // ""),
features: ($matrix.release_features // []),
} else {
output: "debug",
profile: "dev",
args: ($matrix.debug_build_args // "--no-default-features --features rustls,fancy-with-backtrace"),
args: ($matrix.debug_build_args // ""),
features: ($matrix.debug_features // ["rustls", "fancy-with-backtrace"]),
} end
|
.features = (
if (.features | length > 0)
then "--no-default-features --features \(.features | join(","))"
else "" end
)
|
{
CBIN: (if ($matrix.target | test("windows")) then "cargo-binstall.exe" else "cargo-binstall" end),
CTOOL: (if ($matrix."use-cross" // false) then "cross" else "cargo" end),
COUTPUT: .output,
CARGS: "--target \($matrix.target) --profile \(.profile) \(.args)",
CARGS: "--target \($matrix.target) --profile \(.profile) \(.features) \(.args)",
}
|
to_entries[] | "\(.key)=\(.value)"