mirror of
https://github.com/apple/pkl.git
synced 2026-04-29 03:37:12 +02:00
Bump pkl.impl.ghactions to 1.0.1 (#1358)
This commit is contained in:
7
.github/jobs/BuildJavaExecutableJob.pkl
vendored
7
.github/jobs/BuildJavaExecutableJob.pkl
vendored
@@ -1,7 +1,6 @@
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/actions/Common.pkl"
|
||||
import "@gha/catalog.pkl"
|
||||
|
||||
// Keep this in sync with projects that build java executables
|
||||
local projects: List<String> = List("pkl-doc", "pkl-cli", "pkl-codegen-java", "pkl-codegen-kotlin")
|
||||
@@ -17,13 +16,13 @@ local command =
|
||||
}.join(" ")
|
||||
|
||||
steps {
|
||||
new Common.Checkout {}
|
||||
catalog.`actions/checkout@v6`
|
||||
new {
|
||||
name = "gradle build java executables"
|
||||
shell = "bash"
|
||||
run = command
|
||||
}
|
||||
new Artifact.Upload {
|
||||
(catalog.`actions/upload-artifact@v5`) {
|
||||
name = "Upload executable artifacts"
|
||||
with {
|
||||
name = "executable-java"
|
||||
|
||||
16
.github/jobs/BuildNativeJob.pkl
vendored
16
.github/jobs/BuildNativeJob.pkl
vendored
@@ -1,7 +1,7 @@
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/Context.pkl"
|
||||
import "@gha/catalog.pkl"
|
||||
import "@gha/context.pkl"
|
||||
|
||||
/// Whether to link to musl. Otherwise, links to glibc.
|
||||
musl: Boolean(implies(module.os == "linux")) = false
|
||||
@@ -12,7 +12,7 @@ project: String
|
||||
extraGradleArgs {
|
||||
when (os == "macOS" && arch == "amd64") {
|
||||
"-Dpkl.targetArch=\(module.arch)"
|
||||
"-Dpkl.native--native-compiler-path=\(Context.github.workspace)/.github/scripts/cc_macos_amd64.sh"
|
||||
"-Dpkl.native--native-compiler-path=\(context.github.workspace)/.github/scripts/cc_macos_amd64.sh"
|
||||
}
|
||||
when (musl) {
|
||||
"-Dpkl.musl=true"
|
||||
@@ -48,7 +48,7 @@ steps {
|
||||
shell = "bash"
|
||||
run = "./gradlew \(module.gradleArgs) \(project):buildNative"
|
||||
}
|
||||
new Artifact.Upload {
|
||||
(catalog.`actions/upload-artifact@v5`) {
|
||||
name = "Upload executable artifacts"
|
||||
with {
|
||||
name =
|
||||
@@ -62,3 +62,11 @@ steps {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fixed job {
|
||||
when (os == "linux" && !musl) {
|
||||
container {
|
||||
image = "redhat/ubi8:8.10"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
7
.github/jobs/DeployJob.pkl
vendored
7
.github/jobs/DeployJob.pkl
vendored
@@ -1,7 +1,6 @@
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/actions/Common.pkl"
|
||||
import "@gha/catalog.pkl"
|
||||
import "@gha/Workflow.pkl"
|
||||
import "@pkl.impl.ghactions/helpers.pkl"
|
||||
|
||||
@@ -14,8 +13,8 @@ arch = "amd64"
|
||||
os = "linux"
|
||||
|
||||
steps {
|
||||
new Common.Checkout {}
|
||||
new Artifact.Download {
|
||||
catalog.`actions/checkout@v6`
|
||||
(catalog.`actions/download-artifact@v5`) {
|
||||
with {
|
||||
pattern = "executable-**"
|
||||
`merge-multiple` = true
|
||||
|
||||
14
.github/jobs/GithubRelease.pkl
vendored
14
.github/jobs/GithubRelease.pkl
vendored
@@ -2,8 +2,8 @@ module GithubRelease
|
||||
|
||||
extends "PklJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/Context.pkl"
|
||||
import "@gha/catalog.pkl"
|
||||
import "@gha/context.pkl"
|
||||
|
||||
fixed job {
|
||||
`runs-on` = "ubuntu-latest"
|
||||
@@ -12,7 +12,7 @@ fixed job {
|
||||
}
|
||||
needs = "deploy-release"
|
||||
steps {
|
||||
new Artifact.Download {
|
||||
(catalog.`actions/download-artifact@v5`) {
|
||||
with {
|
||||
pattern = "executable-**"
|
||||
`merge-multiple` = true
|
||||
@@ -21,10 +21,10 @@ fixed job {
|
||||
new {
|
||||
name = "Publish release on GitHub"
|
||||
env {
|
||||
["GH_TOKEN"] = Context.github.token
|
||||
["TAG_NAME"] = Context.github.refName
|
||||
["GIT_SHA"] = Context.github.sha
|
||||
["GH_REPO"] = Context.github.repository
|
||||
["GH_TOKEN"] = context.github.token
|
||||
["TAG_NAME"] = context.github.refName
|
||||
["GIT_SHA"] = context.github.sha
|
||||
["GH_REPO"] = context.github.repository
|
||||
}
|
||||
// language=bash
|
||||
run =
|
||||
|
||||
11
.github/jobs/GradleJob.pkl
vendored
11
.github/jobs/GradleJob.pkl
vendored
@@ -2,9 +2,8 @@ abstract module GradleJob
|
||||
|
||||
extends "PklJob.pkl"
|
||||
|
||||
import "@gha/actions/Common.pkl"
|
||||
import "@gha/actions/Setup.pkl"
|
||||
import "@gha/Workflow.pkl"
|
||||
import "@gha/catalog.pkl"
|
||||
|
||||
/// Whether this is a release build or not.
|
||||
isRelease: Boolean = false
|
||||
@@ -21,9 +20,9 @@ nightlyMacOS: Boolean(implies(os == "macOS")) = false
|
||||
|
||||
extraGradleArgs: Listing<String>
|
||||
|
||||
steps: Listing<*Workflow.Step | Workflow.TypedStep>
|
||||
steps: Listing<Workflow.Step>
|
||||
|
||||
preSteps: Listing<*Workflow.Step | Workflow.TypedStep>
|
||||
preSteps: Listing<Workflow.Step>
|
||||
|
||||
/// The fetch depth to use when doing a git checkout.
|
||||
fetchDepth: Int?
|
||||
@@ -73,14 +72,14 @@ fixed job {
|
||||
steps {
|
||||
...preSteps
|
||||
// full checkout (needed for spotless)
|
||||
new Common.Checkout {
|
||||
(catalog.`actions/checkout@v6`) {
|
||||
when (fetchDepth != null) {
|
||||
with {
|
||||
`fetch-depth` = fetchDepth
|
||||
}
|
||||
}
|
||||
}
|
||||
new Setup.Java {
|
||||
(catalog.`actions/setup-java@v5`) {
|
||||
with {
|
||||
`java-version` = "21"
|
||||
distribution = "temurin"
|
||||
|
||||
Reference in New Issue
Block a user