mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-05-06 20:20:03 +00:00
Split features and build args handling in build (#257)
This commit is contained in:
parent
47fd7c14a6
commit
ac995798ef
2 changed files with 13 additions and 5 deletions
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
|
@ -28,15 +28,15 @@ jobs:
|
||||||
include:
|
include:
|
||||||
- target: x86_64-unknown-linux-gnu
|
- target: x86_64-unknown-linux-gnu
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
debug_build_args: --no-default-features --features rustls,pkg-config
|
debug_features: [ rustls, pkg-config ]
|
||||||
- target: x86_64-apple-darwin
|
- target: x86_64-apple-darwin
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
- target: aarch64-apple-darwin
|
- target: aarch64-apple-darwin
|
||||||
os: macos-latest
|
os: macos-latest
|
||||||
- target: x86_64-pc-windows-msvc
|
- target: x86_64-pc-windows-msvc
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
debug_build_args: --no-default-features --features native-tls
|
debug_features: [ native-tls ]
|
||||||
release_build_args: --no-default-features --features static,zlib-ng,native-tls,fancy-no-backtrace
|
release_features: [ static, zlib-ng, native-tls, fancy-no-backtrace ]
|
||||||
- target: x86_64-unknown-linux-musl
|
- target: x86_64-unknown-linux-musl
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
- target: armv7-unknown-linux-musleabihf
|
- target: armv7-unknown-linux-musleabihf
|
||||||
|
|
|
@ -2,17 +2,25 @@ if $for_release then {
|
||||||
output: "release",
|
output: "release",
|
||||||
profile: "release",
|
profile: "release",
|
||||||
args: ($matrix.release_build_args // ""),
|
args: ($matrix.release_build_args // ""),
|
||||||
|
features: ($matrix.release_features // []),
|
||||||
} else {
|
} else {
|
||||||
output: "debug",
|
output: "debug",
|
||||||
profile: "dev",
|
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
|
} 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),
|
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),
|
CTOOL: (if ($matrix."use-cross" // false) then "cross" else "cargo" end),
|
||||||
COUTPUT: .output,
|
COUTPUT: .output,
|
||||||
CARGS: "--target \($matrix.target) --profile \(.profile) \(.args)",
|
CARGS: "--target \($matrix.target) --profile \(.profile) \(.features) \(.args)",
|
||||||
}
|
}
|
||||||
|
|
|
|
||||||
to_entries[] | "\(.key)=\(.value)"
|
to_entries[] | "\(.key)=\(.value)"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue