mirror of
https://github.com/cargo-bins/cargo-binstall.git
synced 2025-04-20 12:38:43 +00:00
Improve CI: All in cargo-zigbuild for linux targets (#816)
This commit is contained in:
parent
9923788f07
commit
e76a4dff62
2 changed files with 23 additions and 11 deletions
7
.github/workflows/release-build.yml
vendored
7
.github/workflows/release-build.yml
vendored
|
@ -21,9 +21,9 @@ jobs:
|
|||
include:
|
||||
- { o: macos-latest, t: x86_64-apple-darwin, r: true }
|
||||
- { o: macos-latest, t: aarch64-apple-darwin }
|
||||
- { o: ubuntu-20.04, t: x86_64-unknown-linux-gnu, r: true }
|
||||
- { o: ubuntu-20.04, t: armv7-unknown-linux-gnueabihf, c: true }
|
||||
- { o: ubuntu-20.04, t: aarch64-unknown-linux-gnu, c: true }
|
||||
- { o: ubuntu-latest, t: x86_64-unknown-linux-gnu, g: 2.17, r: true, c: true }
|
||||
- { o: ubuntu-latest, t: armv7-unknown-linux-gnueabihf, g: 2.17, c: true }
|
||||
- { o: ubuntu-latest, t: aarch64-unknown-linux-gnu, g: 2.17, c: true }
|
||||
- { o: ubuntu-latest, t: x86_64-unknown-linux-musl, r: true, c: true }
|
||||
- { o: ubuntu-latest, t: armv7-unknown-linux-musleabihf, c: true }
|
||||
- { o: ubuntu-latest, t: aarch64-unknown-linux-musl, c: true }
|
||||
|
@ -34,6 +34,7 @@ jobs:
|
|||
runs-on: ${{ matrix.o }}
|
||||
env:
|
||||
CARGO_BUILD_TARGET: ${{ matrix.t }}
|
||||
GLIBC_VERSION: ${{ matrix.g }}
|
||||
JUST_USE_CARGO_ZIGBUILD: ${{ matrix.c }}
|
||||
JUST_FOR_RELEASE: true
|
||||
|
||||
|
|
13
justfile
13
justfile
|
@ -7,6 +7,7 @@ extra-build-args := env_var_or_default("JUST_EXTRA_BUILD_ARGS", "")
|
|||
extra-features := env_var_or_default("JUST_EXTRA_FEATURES", "")
|
||||
default-features := env_var_or_default("JUST_DEFAULT_FEATURES", "")
|
||||
override-features := env_var_or_default("JUST_OVERRIDE_FEATURES", "")
|
||||
glibc-version := env_var_or_default("GLIBC_VERSION", "")
|
||||
|
||||
export BINSTALL_LOG_LEVEL := if env_var_or_default("RUNNER_DEBUG", "0") == "1" { "debug" } else { "info" }
|
||||
|
||||
|
@ -99,7 +100,17 @@ rust-lld := if target-os != "windows" { " -Z gcc-ld=lld" } else { "" }
|
|||
# rust-lld.
|
||||
rustc-icf := if for-release != "" { " -C link-arg=-Wl,--icf=safe" } else { "" }
|
||||
|
||||
cargo-build-args := (if for-release != "" { " --release" } else { "" }) + (if target != target-host { " --target " + target } else if cargo-buildstd != "" { " --target " + target } else { "" }) + (cargo-buildstd) + (if extra-build-args != "" { " " + extra-build-args } else { "" }) + (cargo-no-default-features) + (cargo-split-debuginfo) + (if cargo-features != "" { " --features " + cargo-features } else { "" }) + (win-arm64-ring16)
|
||||
target-glibc-ver-postfix := if glibc-version != "" {
|
||||
if use-cargo-zigbuild != "" {
|
||||
"." + glibc-version
|
||||
} else {
|
||||
""
|
||||
}
|
||||
} else {
|
||||
""
|
||||
}
|
||||
|
||||
cargo-build-args := (if for-release != "" { " --release" } else { "" }) + (" --target ") + (target) + (target-glibc-ver-postfix) + (cargo-buildstd) + (if extra-build-args != "" { " " + extra-build-args } else { "" }) + (cargo-no-default-features) + (cargo-split-debuginfo) + (if cargo-features != "" { " --features " + cargo-features } else { "" }) + (win-arm64-ring16)
|
||||
export RUSTFLAGS := "-Z share-generics " + (rustc-gcclibs) + (rustc-miropt) + (rust-lld) + (rustc-icf)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue