Build linux executables that link to glibc 2.17 (#1352)

Fixes an unintentional breakage in 0.30.1 that bumped the required glibc to 2.34.
This commit is contained in:
Daniel Chao
2025-12-05 15:24:27 -08:00
committed by GitHub
parent 81a4e687b4
commit 2de1d5b9d2
9 changed files with 199 additions and 2 deletions

View File

@@ -19,6 +19,15 @@ extraGradleArgs {
}
}
preSteps {
when (os == "linux" && !musl) {
new {
name = "Install deps"
run = "dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en"
}
}
}
steps {
when (musl) {
new {
@@ -26,6 +35,14 @@ steps {
run = read("../scripts/install_musl.sh").text
}
}
// workaround for https://github.com/actions/checkout/issues/1048
when (os == "linux" && !musl) {
new {
name = "Fix git ownership"
// language=bash
run = "git status || git config --system --add safe.directory $GITHUB_WORKSPACE"
}
}
new {
name = "gradle buildNative"
shell = "bash"

View File

@@ -23,6 +23,8 @@ extraGradleArgs: Listing<String>
steps: Listing<*Workflow.Step | Workflow.TypedStep>
preSteps: Listing<*Workflow.Step | Workflow.TypedStep>
/// The fetch depth to use when doing a git checkout.
fetchDepth: Int?
@@ -69,6 +71,7 @@ fixed job {
}
}
steps {
...preSteps
// full checkout (needed for spotless)
new Common.Checkout {
when (fetchDepth != null) {