Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/index.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ local gradleCheckJobs: PklJobs = new {

local buildNativeJobs: Mapping<String, BuildNativeJob> = new {
for (_dist in List("release", "snapshot")) {
for (_project in List("pkl-cli", "pkl-doc")) {
for (_project in List("pkl-cli", "pkl-doc", "libpkl")) {
for (_arch in List("amd64", "aarch64")) {
for (_os in List("macOS", "linux")) {
["\(_project)-\(_os)-\(_arch)-\(_dist)"] {
arch = _arch
os = _os
isRelease = _dist == "release"
project = _project
buildDir = if (_project == "libpkl") "libpkl/build/native-libs/**/*" else "\(_project)*/build/executable/**/*"
}
}
}
Expand All @@ -78,12 +79,14 @@ local buildNativeJobs: Mapping<String, BuildNativeJob> = new {
musl = true
isRelease = _dist == "release"
project = _project
buildDir = if (_project == "libpkl") "libpkl/build/native-libs/**/*" else "\(_project)*/build/executable/**/*"
}
["\(_project)-windows-amd64-\(_dist)"] {
arch = "amd64"
os = "windows"
isRelease = _dist == "release"
project = _project
buildDir = if (_project == "libpkl") "libpkl/build/native-libs/**/*" else "\(_project)*/build/executable/**/*"
}
}
}
Expand Down
5 changes: 4 additions & 1 deletion .github/jobs/BuildNativeJob.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ musl: Boolean(implies(module.os == "linux")) = false
/// The Gradle project under which to generate the executable
project: String

/// Path pattern for artifact uploads (glob passed to actions/upload-artifact)
buildDir: String = "\(project)*/build/executable/**/*"

extraGradleArgs {
when (os == "macOS" && arch == "amd64") {
"-Dpkl.targetArch=\(module.arch)"
Expand Down Expand Up @@ -59,7 +62,7 @@ steps {
"executable-\(project)-\(module.os)-\(module.arch)"
// Need to insert a wildcard to make actions/upload-artifact preserve the folder hierarchy.
// See https://github.com/actions/upload-artifact/issues/206
path = "\(project)*/build/executable/**/*"
path = module.buildDir
}
}
}
Expand Down
Loading
Loading