Skip to content

Commit 2de1d5b

Browse files
authored
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.
1 parent 81a4e68 commit 2de1d5b

File tree

9 files changed

+199
-2
lines changed

9 files changed

+199
-2
lines changed

.github/index.pkl

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,27 @@ release {
196196
}
197197
} |> toWorkflowJobs
198198
}
199+
200+
output {
201+
files {
202+
[[true]] {
203+
renderer {
204+
converters {
205+
["jobs"] = (it: Mapping<String, Workflow.Job>) ->
206+
it
207+
.toMap()
208+
.mapValues((name, job) ->
209+
if (name.contains("linux") && !name.contains("alpine"))
210+
job
211+
.toMap()
212+
.put("container", new Dynamic {
213+
image = "redhat/ubi8:8.10"
214+
})
215+
else
216+
job
217+
)
218+
}
219+
}
220+
}
221+
}
222+
}

.github/jobs/BuildNativeJob.pkl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,30 @@ extraGradleArgs {
1919
}
2020
}
2121

22+
preSteps {
23+
when (os == "linux" && !musl) {
24+
new {
25+
name = "Install deps"
26+
run = "dnf install -y git binutils gcc glibc-devel zlib-devel libstdc++-static glibc-langpack-en"
27+
}
28+
}
29+
}
30+
2231
steps {
2332
when (musl) {
2433
new {
2534
name = "Install musl and zlib"
2635
run = read("../scripts/install_musl.sh").text
2736
}
2837
}
38+
// workaround for https://github.com/actions/checkout/issues/1048
39+
when (os == "linux" && !musl) {
40+
new {
41+
name = "Fix git ownership"
42+
// language=bash
43+
run = "git status || git config --system --add safe.directory $GITHUB_WORKSPACE"
44+
}
45+
}
2946
new {
3047
name = "gradle buildNative"
3148
shell = "bash"

.github/jobs/GradleJob.pkl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ extraGradleArgs: Listing<String>
2323

2424
steps: Listing<*Workflow.Step | Workflow.TypedStep>
2525

26+
preSteps: Listing<*Workflow.Step | Workflow.TypedStep>
27+
2628
/// The fetch depth to use when doing a git checkout.
2729
fetchDepth: Int?
2830

@@ -69,6 +71,7 @@ fixed job {
6971
}
7072
}
7173
steps {
74+
...preSteps
7275
// full checkout (needed for spotless)
7376
new Common.Checkout {
7477
when (fetchDepth != null) {

.github/workflows/build.yml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/main.yml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/prb.yml

Lines changed: 24 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)