mirror of
https://github.com/apple/pkl.git
synced 2026-01-11 22:30:54 +01:00
Switch to GitHub Actions (#1315)
This switches our builds over to GitHub Actions! TODO: * Add macOS/amd64 native-image builds; this isn't working right now * Patch musl with security patches * Add benchmark jobs over time As part of this build, PRBs will now only run `./gradlew check` on Linux, but other jobs can be run using slash commands, e.g. `[windows]` to run `./gradle check` on Windows.
This commit is contained in:
@@ -1,172 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
// File gets rendered to .circleci/config.yml via git hook.
|
||||
amends "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.circleci@1.2.1#/PklCI.pkl"
|
||||
|
||||
import "jobs/BuildNativeJob.pkl"
|
||||
import "jobs/DeployJob.pkl"
|
||||
import "jobs/GradleCheckJob.pkl"
|
||||
import "jobs/SimpleGradleJob.pkl"
|
||||
|
||||
local prbJobs: Listing<String> = gradleCheckJobs.keys.toListing()
|
||||
|
||||
local buildAndTestJobs = (prbJobs) {
|
||||
"bench"
|
||||
"gradle-compatibility"
|
||||
...buildNativeJobs.keys.filter((it) -> it.endsWith("snapshot"))
|
||||
}
|
||||
|
||||
local releaseJobs = (prbJobs) {
|
||||
"bench"
|
||||
"gradle-compatibility"
|
||||
...buildNativeJobs.keys.filter((it) -> it.endsWith("release"))
|
||||
}
|
||||
|
||||
prb {
|
||||
jobs = prbJobs
|
||||
}
|
||||
|
||||
main {
|
||||
jobs {
|
||||
...buildAndTestJobs
|
||||
new {
|
||||
["deploy-snapshot"] {
|
||||
requires = buildAndTestJobs
|
||||
context = "pkl-maven-release"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
release {
|
||||
jobs {
|
||||
...releaseJobs
|
||||
// do GitHub release first because we can overwrite the tag.
|
||||
// publishing to Maven Central is final.
|
||||
new {
|
||||
["github-release"] {
|
||||
requires = releaseJobs
|
||||
context = "pkl-github-release"
|
||||
}
|
||||
}
|
||||
new {
|
||||
["deploy-release"] {
|
||||
requires { "github-release" }
|
||||
context = "pkl-maven-release"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
releaseBranch {
|
||||
jobs = releaseJobs
|
||||
}
|
||||
|
||||
triggerDocsBuild = "both"
|
||||
|
||||
triggerPackageDocsBuild = "release"
|
||||
|
||||
local buildNativeJobs: Mapping<String, BuildNativeJob> = new {
|
||||
for (_dist in List("release", "snapshot")) {
|
||||
for (_project in List("pkl-cli", "pkl-doc")) {
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
["\(_project)-linux-alpine-amd64-\(_dist)"] {
|
||||
arch = "amd64"
|
||||
os = "linux"
|
||||
musl = true
|
||||
isRelease = _dist == "release"
|
||||
project = _project
|
||||
}
|
||||
["\(_project)-windows-amd64-\(_dist)"] {
|
||||
arch = "amd64"
|
||||
os = "windows"
|
||||
isRelease = _dist == "release"
|
||||
project = _project
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local gradleCheckJobs: Mapping<String, GradleCheckJob> = new {
|
||||
["gradle-check"] {
|
||||
javaVersion = "21.0"
|
||||
isRelease = false
|
||||
os = "linux"
|
||||
}
|
||||
["gradle-check-windows"] {
|
||||
javaVersion = "21.0"
|
||||
isRelease = false
|
||||
os = "windows"
|
||||
}
|
||||
}
|
||||
|
||||
jobs {
|
||||
for (jobName, job in buildNativeJobs) {
|
||||
[jobName] = job.job
|
||||
}
|
||||
for (jobName, job in gradleCheckJobs) {
|
||||
[jobName] = job.job
|
||||
}
|
||||
["bench"] = new SimpleGradleJob { command = "bench:jmh" }.job
|
||||
["gradle-compatibility"] =
|
||||
new SimpleGradleJob {
|
||||
name = "gradle compatibility"
|
||||
command =
|
||||
#"""
|
||||
:pkl-gradle:build \
|
||||
:pkl-gradle:compatibilityTestReleases
|
||||
"""#
|
||||
}.job
|
||||
["deploy-snapshot"] = new DeployJob { command = "publishToSonatype" }.job
|
||||
["deploy-release"] =
|
||||
new DeployJob {
|
||||
isRelease = true
|
||||
command = "publishToSonatype closeAndReleaseSonatypeStagingRepository"
|
||||
}.job
|
||||
["github-release"] {
|
||||
docker {
|
||||
new { image = "maniator/gh:v2.40.1" }
|
||||
}
|
||||
steps {
|
||||
new AttachWorkspaceStep { at = "." }
|
||||
new RunStep {
|
||||
name = "Publish release on GitHub"
|
||||
command =
|
||||
#"""
|
||||
# exclude build_artifacts.txt from publish
|
||||
rm -f */build/executable/*.build_artifacts.txt
|
||||
find */build/executable/* -type d | xargs rm -rf
|
||||
gh release create "${CIRCLE_TAG}" \
|
||||
--title "${CIRCLE_TAG}" \
|
||||
--target "${CIRCLE_SHA1}" \
|
||||
--verify-tag \
|
||||
--notes "Release notes: https://pkl-lang.org/main/current/release-notes/changelog.html#release-${CIRCLE_TAG}" \
|
||||
--repo "${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}" \
|
||||
*/build/executable/*
|
||||
"""#
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
1637
.circleci/config.yml
1637
.circleci/config.yml
File diff suppressed because it is too large
Load Diff
@@ -1,202 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
/// Builds the native `pkl` CLI
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.7.0#/Config.pkl"
|
||||
|
||||
/// The architecture to use
|
||||
arch: "amd64" | "aarch64"
|
||||
|
||||
/// Whether to link to musl. Otherwise, links to glibc.
|
||||
musl: Boolean = false
|
||||
|
||||
/// The Gradle project under which to generate the executable
|
||||
project: String
|
||||
|
||||
javaVersion = "21.0"
|
||||
|
||||
extraGradleArgs {
|
||||
when (os == "macOS" && arch == "amd64") {
|
||||
"-Dpkl.targetArch=\(arch)"
|
||||
}
|
||||
when (musl) {
|
||||
"-Dpkl.musl=true"
|
||||
}
|
||||
}
|
||||
|
||||
local setupLinuxEnvironment: Config.RunStep =
|
||||
let (muslVersion = "1.2.2")
|
||||
let (zlibVersion = "1.2.13")
|
||||
new {
|
||||
name = "Set up environment"
|
||||
shell = "#!/bin/bash -exo pipefail"
|
||||
command =
|
||||
new Listing {
|
||||
#"""
|
||||
sed -ie '/\[ol8_codeready_builder\]/,/^$/s/enabled=0/enabled=1/g' /etc/yum.repos.d/oracle-linux-ol8.repo \
|
||||
&& microdnf -y install util-linux tree coreutils-single findutils curl tar gzip git zlib-devel gcc-c++ make openssl glibc-langpack-en libstdc++-static \
|
||||
&& microdnf clean all \
|
||||
&& rm -rf /var/cache/dnf
|
||||
|
||||
# install jdk
|
||||
curl -Lf \
|
||||
https://github.com/adoptium/temurin\#(module.majorJdkVersion)-binaries/releases/download/\#(module
|
||||
.jdkGitHubReleaseName)/OpenJDK\#(module.majorJdkVersion)U-jdk_\#(if (arch == "amd64")
|
||||
"x64"
|
||||
else
|
||||
"aarch64")_linux_hotspot_\#(module.jdkVersionAlt).tar.gz -o /tmp/jdk.tar.gz
|
||||
|
||||
mkdir /jdk \
|
||||
&& cd /jdk \
|
||||
&& cat /tmp/jdk.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
mkdir -p ~/staticdeps/bin
|
||||
|
||||
cp /usr/lib/gcc/\#(if (arch == "amd64") "x86_64" else "aarch64")-redhat-linux/8/libstdc++.a ~/staticdeps
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
curl -Lf https://github.com/madler/zlib/releases/download/v\#(zlibVersion)/zlib-\#(zlibVersion).tar.gz -o /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p /tmp/dep_zlib-\#(zlibVersion) \
|
||||
&& cd /tmp/dep_zlib-\#(zlibVersion) \
|
||||
&& cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC . \
|
||||
&& echo "zlib-\#(zlibVersion): configure..." && ./configure --static --prefix="$HOME"/staticdeps > /dev/null \
|
||||
&& echo "zlib-\#(zlibVersion): make..." && make -s -j4 \
|
||||
&& echo "zlib-\#(zlibVersion): make install..." && make -s install \
|
||||
&& rm -rf /tmp/dep_zlib-\#(zlibVersion)
|
||||
fi
|
||||
"""#
|
||||
// don't need musl on aarch because GraalVM only supports musl builds on x86
|
||||
when (arch == "amd64") {
|
||||
#"""
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
curl -Lf https://musl.libc.org/releases/musl-\#(muslVersion).tar.gz -o /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p /tmp/dep_musl-\#(muslVersion) \
|
||||
&& cd /tmp/dep_musl-\#(muslVersion) \
|
||||
&& cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC . \
|
||||
&& echo "musl-\#(muslVersion): configure..." && ./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null \
|
||||
&& echo "musl-\#(muslVersion): make..." && make -s -j4 \
|
||||
&& echo "musl-\#(muslVersion): make install..." && make -s install \
|
||||
&& rm -rf /tmp/dep_musl-\#(muslVersion)
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
"""#
|
||||
}
|
||||
}.join("\n\n")
|
||||
}
|
||||
|
||||
local setupMacEnvironment: Config.RunStep = new {
|
||||
name = "Set up environment"
|
||||
shell = "#!/bin/bash -exo pipefail"
|
||||
command =
|
||||
#"""
|
||||
# install jdk
|
||||
curl -Lf \
|
||||
https://github.com/adoptium/temurin\#(module.majorJdkVersion)-binaries/releases/download/\#(module
|
||||
.jdkGitHubReleaseName)/OpenJDK\#(module.majorJdkVersion)U-jdk_\#(if (arch == "amd64")
|
||||
"x64"
|
||||
else
|
||||
"aarch64")_mac_hotspot_\#(module.jdkVersionAlt).tar.gz -o /tmp/jdk.tar.gz
|
||||
|
||||
mkdir $HOME/jdk \
|
||||
&& cd $HOME/jdk \
|
||||
&& cat /tmp/jdk.tar.gz | tar --strip-components=1 -xzC .
|
||||
"""#
|
||||
}
|
||||
|
||||
steps {
|
||||
when (os == "linux") {
|
||||
new Config.RestoreCacheStep {
|
||||
name = "Restore static deps from cache"
|
||||
key = "staticdeps-\(arch)"
|
||||
}
|
||||
setupLinuxEnvironment
|
||||
new Config.SaveCacheStep {
|
||||
name = "Save statics deps to cache"
|
||||
key = "staticdeps-\(arch)"
|
||||
paths {
|
||||
"~/staticdeps"
|
||||
}
|
||||
}
|
||||
}
|
||||
when (os == "macOS") {
|
||||
when (arch == "amd64") {
|
||||
new Config.RunStep {
|
||||
name = "Installing Rosetta 2"
|
||||
command =
|
||||
"""
|
||||
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
|
||||
"""
|
||||
}
|
||||
}
|
||||
setupMacEnvironment
|
||||
}
|
||||
new Config.RunStep {
|
||||
name = "gradle buildNative"
|
||||
when (module.os == "windows") {
|
||||
shell = "bash.exe"
|
||||
}
|
||||
command =
|
||||
#"""
|
||||
export PATH=~/staticdeps/bin:$PATH
|
||||
./gradlew \#(module.gradleArgs) \#(project):buildNative
|
||||
"""#
|
||||
}
|
||||
new Config.PersistToWorkspaceStep {
|
||||
root = "."
|
||||
paths {
|
||||
"\(project)/build/executable/"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
job {
|
||||
when (os == "macOS") {
|
||||
macos {
|
||||
xcode = "16.4.0"
|
||||
}
|
||||
resource_class = "m4pro.large"
|
||||
environment {
|
||||
["JAVA_HOME"] = "/Users/distiller/jdk/Contents/Home"
|
||||
}
|
||||
}
|
||||
when (os == "linux") {
|
||||
docker = new Listing<Config.DockerImage> {
|
||||
new {
|
||||
image = if (arch == "aarch64") "arm64v8/oraclelinux:8-slim" else "oraclelinux:8-slim"
|
||||
}
|
||||
}
|
||||
environment {
|
||||
["JAVA_HOME"] = "/jdk"
|
||||
}
|
||||
resource_class = if (arch == "aarch64") "arm.xlarge" else "xlarge"
|
||||
}
|
||||
when (os == "windows") {
|
||||
machine {
|
||||
image = "windows-server-2022-gui:current"
|
||||
}
|
||||
resource_class = "windows.large"
|
||||
environment {
|
||||
["JAVA_HOME"] = "/jdk"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.7.0#/Config.pkl"
|
||||
|
||||
local self = this
|
||||
|
||||
javaVersion = "21.0"
|
||||
|
||||
command: String
|
||||
|
||||
os = "linux"
|
||||
|
||||
steps {
|
||||
new Config.AttachWorkspaceStep { at = "." }
|
||||
new Config.RunStep {
|
||||
command = "./gradlew \(self.gradleArgs) \(module.command)"
|
||||
}
|
||||
// add Java executables to workspace so they get published as a GitHub release
|
||||
new Config.PersistToWorkspaceStep {
|
||||
root = "."
|
||||
paths {
|
||||
"pkl-cli/build/executable/"
|
||||
"pkl-doc/build/executable/"
|
||||
"pkl-codegen-java/build/executable/"
|
||||
"pkl-codegen-kotlin/build/executable/"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.7.0#/Config.pkl"
|
||||
|
||||
steps {
|
||||
new Config.RunStep {
|
||||
name = "gradle check"
|
||||
command = "./gradlew \(module.gradleArgs) check"
|
||||
}
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
abstract module GradleJob
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.7.0#/Config.pkl"
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/pkl.experimental.uri@1.0.3#/URI.pkl"
|
||||
|
||||
/// Whether this is a release build or not.
|
||||
isRelease: Boolean = false
|
||||
|
||||
/// The OS to run on
|
||||
os: "macOS" | "linux" | "windows"
|
||||
|
||||
/// The version of Java to use.
|
||||
javaVersion: "17.0" | "21.0"
|
||||
|
||||
fixed javaVersionFull = if (javaVersion == "17.0") "17.0.9+9" else "21.0.5+11"
|
||||
|
||||
fixed jdkVersionAlt = javaVersionFull.replaceLast("+", "_")
|
||||
|
||||
fixed majorJdkVersion = javaVersionFull.split(".").first
|
||||
|
||||
fixed jdkGitHubReleaseName =
|
||||
let (ver =
|
||||
// 17.0.9+9 is missing some binaries (see https://github.com/adoptium/adoptium-support/issues/994)
|
||||
if (javaVersionFull == "17.0.9+9" && os == "windows")
|
||||
"jdk-17.0.9+9.1"
|
||||
else
|
||||
"jdk-\(javaVersionFull)"
|
||||
)
|
||||
URI.encodeComponent(ver)
|
||||
|
||||
fixed gradleArgs =
|
||||
new Listing {
|
||||
"--info"
|
||||
"--stacktrace"
|
||||
"-DtestReportsDir=${HOME}/test-results"
|
||||
"-DpklMultiJdkTesting=true"
|
||||
when (isRelease) {
|
||||
"-DreleaseBuild=true"
|
||||
}
|
||||
...extraGradleArgs
|
||||
}.join(" ")
|
||||
|
||||
extraGradleArgs: Listing<String>
|
||||
|
||||
steps: Listing<Config.Step>
|
||||
|
||||
job: Config.Job = new {
|
||||
environment {
|
||||
["LANG"] = "en_US.UTF-8"
|
||||
when (os == "windows") {
|
||||
["JAVA_HOME"] = "/jdk"
|
||||
}
|
||||
}
|
||||
when (os == "linux") {
|
||||
docker {
|
||||
new {
|
||||
image = "cimg/openjdk:\(javaVersion)"
|
||||
}
|
||||
}
|
||||
resource_class = "2xlarge"
|
||||
}
|
||||
when (os == "windows") {
|
||||
machine {
|
||||
image = "windows-server-2022-gui:current"
|
||||
}
|
||||
resource_class = "windows.large"
|
||||
}
|
||||
steps {
|
||||
"checkout"
|
||||
when (os == "windows") {
|
||||
new Config.RunStep {
|
||||
name = "Set up environment"
|
||||
shell = "bash.exe"
|
||||
command =
|
||||
#"""
|
||||
# install jdk
|
||||
curl -Lf \
|
||||
https://github.com/adoptium/temurin\#(majorJdkVersion)-binaries/releases/download/\#(jdkGitHubReleaseName)/OpenJDK\#(majorJdkVersion)U-jdk_x64_windows_hotspot_\#(jdkVersionAlt).zip -o /tmp/jdk.zip
|
||||
|
||||
unzip /tmp/jdk.zip -d /tmp/jdk \
|
||||
&& cd /tmp/jdk/jdk-* \
|
||||
&& mkdir /jdk \
|
||||
&& cp -r . /jdk
|
||||
"""#
|
||||
}
|
||||
}
|
||||
...module.steps
|
||||
new Config.StoreTestResults {
|
||||
path = "~/test-results"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Copyright © 2024 Apple Inc. and the Pkl project authors. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// https://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//===----------------------------------------------------------------------===//
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "package://pkg.pkl-lang.org/pkl-pantry/com.circleci.v2@1.7.0#/Config.pkl"
|
||||
|
||||
name: String = command
|
||||
|
||||
command: String
|
||||
|
||||
os = "linux"
|
||||
|
||||
javaVersion = "21.0"
|
||||
|
||||
steps {
|
||||
new Config.RunStep {
|
||||
name = module.name
|
||||
command =
|
||||
"""
|
||||
./gradlew \(module.gradleArgs) \(module.command)
|
||||
"""
|
||||
}
|
||||
}
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@@ -1,5 +1,6 @@
|
||||
# linguist-generated would suppress files in diffs
|
||||
**/src/test/files/** linguist-vendored
|
||||
.github/workflows/* linguist-generated
|
||||
|
||||
/docs/** linguist-documentation
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
files=`git diff --cached --name-status`
|
||||
|
||||
if [[ $files =~ .circleci/config.pkl ]]; then
|
||||
pkl eval .circleci/config.pkl -o .circleci/config.yml
|
||||
git add .circleci/config.yml
|
||||
if [[ $files =~ .github/* ]]; then
|
||||
pkl eval --project-dir .github/ -m .github .github/index.pkl
|
||||
git add .github/workflows/
|
||||
fi
|
||||
|
||||
10
.github/PklProject
vendored
Normal file
10
.github/PklProject
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
amends "pkl:Project"
|
||||
|
||||
dependencies {
|
||||
["pkl.impl.ghactions"] {
|
||||
uri = "package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@0.6.1"
|
||||
}
|
||||
["gha"] {
|
||||
uri = "package://pkg.pkl-lang.org/github.com/stefma/pkl-gha/com.github.action@0.0.6"
|
||||
}
|
||||
}
|
||||
19
.github/PklProject.deps.json
vendored
Normal file
19
.github/PklProject.deps.json
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://pkg.pkl-lang.org/github.com/stefma/pkl-gha/com.github.action@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://pkg.pkl-lang.org/github.com/stefma/pkl-gha/com.github.action@0.0.6",
|
||||
"checksums": {
|
||||
"sha256": "84365239996740252a91abab084d443aa3a3438f375b667ac16cb765461c1555"
|
||||
}
|
||||
},
|
||||
"package://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://pkg.pkl-lang.org/pkl-project-commons/pkl.impl.ghactions@0.6.1",
|
||||
"checksums": {
|
||||
"sha256": "8a1e36a92f2fd779b1439ad04dae4a088c787141ff9d4d11031e570a807170a2"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
179
.github/index.pkl
vendored
Normal file
179
.github/index.pkl
vendored
Normal file
@@ -0,0 +1,179 @@
|
||||
amends "@pkl.impl.ghactions/PklCI.pkl"
|
||||
|
||||
import "@gha/Workflow.pkl"
|
||||
|
||||
import "jobs/BuildNativeJob.pkl"
|
||||
import "jobs/DeployJob.pkl"
|
||||
import "jobs/GithubRelease.pkl"
|
||||
import "jobs/GradleJob.pkl"
|
||||
import "jobs/PklJob.pkl"
|
||||
import "jobs/SimpleGradleJob.pkl"
|
||||
import "jobs/BuildJavaExecutableJob.pkl"
|
||||
|
||||
triggerDocsBuild = "both"
|
||||
|
||||
testReports {
|
||||
junit {
|
||||
"**/build/test-results/**/*.xml"
|
||||
}
|
||||
html {
|
||||
"**/build/reports/tests/**/*"
|
||||
}
|
||||
}
|
||||
|
||||
local baseGradleCheck: SimpleGradleJob = new {
|
||||
isRelease = false
|
||||
command = "check"
|
||||
fetchDepth = 0
|
||||
}
|
||||
|
||||
local gradleCheck = (baseGradleCheck) {
|
||||
os = "linux"
|
||||
}
|
||||
|
||||
local gradleCheckWindows = (baseGradleCheck) {
|
||||
os = "windows"
|
||||
}
|
||||
|
||||
local typealias PklJobs = Mapping<String, PklJob>
|
||||
|
||||
local toWorkflowJobs: (PklJobs) -> Workflow.Jobs = (it) -> new Workflow.Jobs {
|
||||
for (k, v in it) {
|
||||
[k] = v.job
|
||||
}
|
||||
}
|
||||
|
||||
local gradleCheckJobs: PklJobs = new {
|
||||
["gradle-check"] = gradleCheck
|
||||
["gradle-check-windows"] = gradleCheckWindows
|
||||
}
|
||||
|
||||
local buildNativeJobs: Mapping<String, BuildNativeJob> = new {
|
||||
for (_dist in List("release", "snapshot")) {
|
||||
for (_project in List("pkl-cli", "pkl-doc")) {
|
||||
for (_arch in List("amd64", "aarch64")) {
|
||||
for (_os in List("macOS", "linux")) {
|
||||
// TODO re-enable macOS/amd64 builds
|
||||
when (!(_os == "macOS" && _arch == "amd64")) {
|
||||
["\(_project)-\(_os)-\(_arch)-\(_dist)"] {
|
||||
arch = _arch
|
||||
os = _os
|
||||
isRelease = _dist == "release"
|
||||
project = _project
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
["\(_project)-alpine-linux-amd64-\(_dist)"] {
|
||||
arch = "amd64"
|
||||
os = "linux"
|
||||
musl = true
|
||||
isRelease = _dist == "release"
|
||||
project = _project
|
||||
}
|
||||
["\(_project)-windows-amd64-\(_dist)"] {
|
||||
arch = "amd64"
|
||||
os = "windows"
|
||||
isRelease = _dist == "release"
|
||||
project = _project
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
local buildNativeSnapshots = buildNativeJobs.toMap().filter((key, _) -> key.endsWith("snapshot"))
|
||||
|
||||
local buildNativeReleases = buildNativeJobs.toMap().filter((key, _) -> key.endsWith("release"))
|
||||
|
||||
local benchmarkJob: SimpleGradleJob = new { command = "bench:jmh" }
|
||||
|
||||
local gradleCompatibilityJob: SimpleGradleJob = new {
|
||||
command = ":pkl-gradle:build :pkl-gradle:compatibilityTestReleases"
|
||||
}
|
||||
|
||||
local buildJavaExecutableJob: BuildJavaExecutableJob = new {}
|
||||
|
||||
local buildAndTestJobs: PklJobs = new {
|
||||
...gradleCheckJobs
|
||||
["bench"] = benchmarkJob
|
||||
["gradle-compatibility"] = gradleCompatibilityJob
|
||||
["java-executables-snapshot"] = (buildJavaExecutableJob) { isRelease = false }
|
||||
...buildNativeSnapshots
|
||||
}
|
||||
|
||||
local releaseJobs: PklJobs = new {
|
||||
...gradleCheckJobs
|
||||
["bench"] = benchmarkJob
|
||||
["gradle-compatibility"] = gradleCompatibilityJob
|
||||
["java-executables-release"] = (buildJavaExecutableJob) { isRelease = true }
|
||||
...buildNativeReleases
|
||||
}
|
||||
|
||||
// By default, just run ./gradlew check on linux.
|
||||
// Trigger other checks based on GitHub PR description. Examples:
|
||||
//
|
||||
// * [windows] -- Test on Windows
|
||||
// * [native] -- Test all native builds
|
||||
// * [native-pkl-cli] -- Test all pkl-cli os/arch pairs
|
||||
// * [native-pkl-cli-macos] -- Test pkl-cli on macOS
|
||||
prb {
|
||||
local prbJobs: Mapping<String, GradleJob> = new {
|
||||
["gradle-check"] = gradleCheck
|
||||
["gradle-check-windows"] = (gradleCheckWindows) {
|
||||
`if` = "contains(github.event.pull_request.body, '[windows]')"
|
||||
}
|
||||
for (jobName, job in buildNativeSnapshots) {
|
||||
[jobName] = (job) {
|
||||
local tags = new Listing {
|
||||
"[native]"
|
||||
"[native-\(job.project)]"
|
||||
"[native-\(job.project)-\(job.os)]"
|
||||
"[native-\(job.project)-\(job.os)-\(job.arch)]"
|
||||
"[native-\(job.project)-\(job.os)-\(job.arch)]"
|
||||
when (job.musl) {
|
||||
"[native-\(job.project)-alpine-\(job.os)-\(job.arch)]"
|
||||
}
|
||||
}
|
||||
`if` =
|
||||
tags.toList().map((it) -> "contains(github.event.pull_request.body, '\(it)')").join(" || ")
|
||||
}
|
||||
}
|
||||
}
|
||||
local prbJobs2 = (prbJobs) {
|
||||
[[true]] {
|
||||
// better SLA when not running on nightly
|
||||
nightlyMacOS = false
|
||||
}
|
||||
}
|
||||
jobs = prbJobs2 |> toWorkflowJobs
|
||||
}
|
||||
|
||||
build {
|
||||
jobs = buildAndTestJobs |> toWorkflowJobs
|
||||
}
|
||||
|
||||
main {
|
||||
jobs =
|
||||
(buildAndTestJobs) {
|
||||
["deploy-snapshot"] = (new DeployJob { command = "publishToSonatype" }) {
|
||||
needs = buildAndTestJobs.keys.toListing()
|
||||
}
|
||||
} |> toWorkflowJobs
|
||||
}
|
||||
|
||||
releaseBranch {
|
||||
jobs = releaseJobs |> toWorkflowJobs
|
||||
}
|
||||
|
||||
release {
|
||||
jobs = (releaseJobs) {
|
||||
["deploy-release"] = (
|
||||
new DeployJob { command = "publishToSonatype closeAndReleaseSonatypeStagingRepository" }
|
||||
) {
|
||||
needs = releaseJobs.keys.toListing()
|
||||
}
|
||||
["github-release"] = (new GithubRelease {}) {
|
||||
needs = "deploy-release"
|
||||
}
|
||||
} |> toWorkflowJobs
|
||||
}
|
||||
33
.github/jobs/BuildJavaExecutableJob.pkl
vendored
Normal file
33
.github/jobs/BuildJavaExecutableJob.pkl
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/actions/Common.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")
|
||||
|
||||
local command =
|
||||
new Listing<String> {
|
||||
"./gradlew"
|
||||
module.gradleArgs
|
||||
for (project in projects) {
|
||||
// NOTE: `build` doesn't build native executables
|
||||
"\(project):build"
|
||||
}
|
||||
}.join("\n")
|
||||
|
||||
steps {
|
||||
new Common.Checkout {}
|
||||
new {
|
||||
name = "gradle build java executables"
|
||||
shell = "bash"
|
||||
run = command
|
||||
}
|
||||
new Artifact.Upload {
|
||||
name = "Upload executable artifacts"
|
||||
with {
|
||||
name = "executable-java"
|
||||
path = "*/build/executable/**/*"
|
||||
}
|
||||
}
|
||||
}
|
||||
47
.github/jobs/BuildNativeJob.pkl
vendored
Normal file
47
.github/jobs/BuildNativeJob.pkl
vendored
Normal file
@@ -0,0 +1,47 @@
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
|
||||
/// Whether to link to musl. Otherwise, links to glibc.
|
||||
musl: Boolean(implies(module.os == "linux")) = false
|
||||
|
||||
/// The Gradle project under which to generate the executable
|
||||
project: String
|
||||
|
||||
extraGradleArgs {
|
||||
when (os == "macOS" && arch == "amd64") {
|
||||
"-Dpkl.targetArch=\(module.arch)"
|
||||
}
|
||||
when (musl) {
|
||||
"-Dpkl.musl=true"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
steps {
|
||||
when (musl) {
|
||||
new {
|
||||
name = "Install musl and zlib"
|
||||
run = read("../scripts/install_musl.sh").text
|
||||
}
|
||||
}
|
||||
new {
|
||||
name = "gradle buildNative"
|
||||
shell = "bash"
|
||||
run =
|
||||
"""
|
||||
./gradlew \(module.gradleArgs) \(project):buildNative
|
||||
"""
|
||||
}
|
||||
new Artifact.Upload {
|
||||
name = "Upload executable artifacts"
|
||||
with {
|
||||
name =
|
||||
if (musl)
|
||||
"executable-\(project)-alpine-\(module.os)-\(module.arch)"
|
||||
else
|
||||
"executable-\(project)-\(module.os)-\(module.arch)"
|
||||
path = "\(project)/build/executable/**/*"
|
||||
}
|
||||
}
|
||||
}
|
||||
31
.github/jobs/DeployJob.pkl
vendored
Normal file
31
.github/jobs/DeployJob.pkl
vendored
Normal file
@@ -0,0 +1,31 @@
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/actions/Common.pkl"
|
||||
import "@gha/Workflow.pkl"
|
||||
import "@pkl.impl.ghactions/helpers.pkl"
|
||||
|
||||
local self = this
|
||||
|
||||
command: String
|
||||
|
||||
arch = "amd64"
|
||||
|
||||
os = "linux"
|
||||
|
||||
steps {
|
||||
new Common.Checkout {}
|
||||
new Artifact.Download {
|
||||
with {
|
||||
pattern = "executable-**"
|
||||
}
|
||||
}
|
||||
new Workflow.Step {
|
||||
run = "./gradlew \(self.gradleArgs) \(module.command)"
|
||||
}
|
||||
|> helpers.withMavenPublishSecrets
|
||||
}
|
||||
|
||||
fixed job {
|
||||
environment = "maven-release"
|
||||
}
|
||||
43
.github/jobs/GithubRelease.pkl
vendored
Normal file
43
.github/jobs/GithubRelease.pkl
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
module GithubRelease
|
||||
|
||||
extends "PklJob.pkl"
|
||||
|
||||
import "@gha/actions/Artifact.pkl"
|
||||
import "@gha/Context.pkl"
|
||||
|
||||
fixed job {
|
||||
`runs-on` = "ubuntu-latest"
|
||||
permissions {
|
||||
contents = "write"
|
||||
}
|
||||
needs = "deploy-release"
|
||||
steps {
|
||||
new Artifact.Download {
|
||||
with {
|
||||
pattern = "executable-**"
|
||||
}
|
||||
}
|
||||
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
|
||||
}
|
||||
// language=bash
|
||||
run =
|
||||
#"""
|
||||
# exclude build_artifacts.txt from publish
|
||||
rm -f */build/executable/*.build_artifacts.txt
|
||||
find */build/executable/* -type d | xargs rm -rf
|
||||
gh release create ${TAG_NAME} \
|
||||
--title "${TAG_NAME}" \
|
||||
--target "${GIT_SHA}" \
|
||||
--verify-tag \
|
||||
--notes "Release notes: https://pkl-lang.org/main/current/release-notes/changelog.html#release-${TAG_NAME}" \
|
||||
*/build/executable/*
|
||||
"""#
|
||||
}
|
||||
}
|
||||
}
|
||||
93
.github/jobs/GradleJob.pkl
vendored
Normal file
93
.github/jobs/GradleJob.pkl
vendored
Normal file
@@ -0,0 +1,93 @@
|
||||
abstract module GradleJob
|
||||
|
||||
extends "PklJob.pkl"
|
||||
|
||||
import "@gha/actions/Common.pkl"
|
||||
import "@gha/actions/Setup.pkl"
|
||||
import "@gha/Workflow.pkl"
|
||||
|
||||
/// Whether this is a release build or not.
|
||||
isRelease: Boolean = false
|
||||
|
||||
/// The architecture to use
|
||||
arch: "amd64" | "aarch64" = "amd64"
|
||||
|
||||
/// The OS to run on.
|
||||
os: "macOS" | "linux" | "windows" = "linux"
|
||||
|
||||
// TODO flip this to `true` when nightly macOS is available
|
||||
/// Whether to run on nightly macOS.
|
||||
nightlyMacOS: Boolean(implies(os == "macOS")) = false
|
||||
|
||||
extraGradleArgs: Listing<String>
|
||||
|
||||
steps: Listing<*Workflow.Step | Workflow.TypedStep>
|
||||
|
||||
/// The fetch depth to use when doing a git checkout.
|
||||
fetchDepth: Int?
|
||||
|
||||
fixed gradleArgs =
|
||||
new Listing {
|
||||
"--info"
|
||||
"--stacktrace"
|
||||
"-DpklMultiJdkTesting=true"
|
||||
when (isRelease) {
|
||||
"-DreleaseBuild=true"
|
||||
}
|
||||
...extraGradleArgs
|
||||
}.join(" ")
|
||||
|
||||
fixed job {
|
||||
env {
|
||||
["LANG"] = "en_US.UTF-8"
|
||||
when (os == "windows") {
|
||||
["JAVA_HOME"] = "/jdk"
|
||||
}
|
||||
}
|
||||
when (os == "macOS") {
|
||||
`if` =
|
||||
let (cond = "github.repository_owner == 'apple'")
|
||||
if (super.`if` != null)
|
||||
"(\(super.`if`)) && \(cond)"
|
||||
else
|
||||
cond
|
||||
}
|
||||
`runs-on` =
|
||||
if (os == "linux" && arch == "amd64")
|
||||
"ubuntu-latest"
|
||||
else if (os == "linux" && arch == "aarch64")
|
||||
"ubuntu-24.04-arm"
|
||||
else if (os == "windows")
|
||||
"windows-latest"
|
||||
else
|
||||
new Listing {
|
||||
"self-hosted"
|
||||
"macos"
|
||||
when (nightlyMacOS) {
|
||||
"nightly"
|
||||
}
|
||||
}
|
||||
steps {
|
||||
// full checkout (needed for spotless)
|
||||
new Common.Checkout {
|
||||
when (fetchDepth != null) {
|
||||
with {
|
||||
`fetch-depth` = fetchDepth
|
||||
}
|
||||
}
|
||||
}
|
||||
new Setup.Java {
|
||||
with {
|
||||
`java-version` = "21"
|
||||
distribution = "temurin"
|
||||
cache = "gradle"
|
||||
architecture =
|
||||
if (arch == "amd64")
|
||||
"x64"
|
||||
else
|
||||
"aarch64"
|
||||
}
|
||||
}
|
||||
...module.steps
|
||||
}
|
||||
}
|
||||
29
.github/jobs/PklJob.pkl
vendored
Normal file
29
.github/jobs/PklJob.pkl
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
abstract module PklJob
|
||||
|
||||
import "@gha/Workflow.pkl"
|
||||
|
||||
/// Identify any jobs that must complete successfully before this job will run.
|
||||
///
|
||||
/// It can be a string or array of strings.
|
||||
/// If a job fails or is skipped, all jobs that need it are skipped unless the jobs use a conditional expression that
|
||||
/// causes the job to continue.
|
||||
/// If a run contains a series of jobs that need each other, a failure or skip applies to all jobs in the dependency
|
||||
/// chain from the point of failure or skip onwards. If you would like a job to run even if a job it is dependent on
|
||||
/// did not succeed, use the `always()` conditional expression in `jobs.<job_id>.if`.
|
||||
///
|
||||
/// See: <https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax#jobsjob_idneeds>
|
||||
needs: (String | *Listing<String>)?
|
||||
|
||||
/// A conditional to prevent a job from running unless a condition is met.
|
||||
///
|
||||
/// You can use any supported context and expression to create a conditional.
|
||||
/// For more information on which contexts are supported in this key, see
|
||||
/// [Contexts reference](https://docs.github.com/en/actions/reference/workflows-and-actions/contexts#context-availability).
|
||||
@SourceCode { language = "GithubExpressionLanguage" }
|
||||
`if`: String?
|
||||
|
||||
/// The underlying workflow job
|
||||
fixed job: Workflow.Job = new {
|
||||
`if` = module.`if`
|
||||
needs = module.needs
|
||||
}
|
||||
18
.github/jobs/SimpleGradleJob.pkl
vendored
Normal file
18
.github/jobs/SimpleGradleJob.pkl
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
extends "GradleJob.pkl"
|
||||
|
||||
name: String = command
|
||||
|
||||
command: String
|
||||
|
||||
os = "linux"
|
||||
|
||||
steps {
|
||||
new {
|
||||
name = module.name
|
||||
shell = "bash"
|
||||
run =
|
||||
"""
|
||||
./gradlew \(module.gradleArgs) \(module.command)
|
||||
"""
|
||||
}
|
||||
}
|
||||
71
.github/scripts/install_musl.sh
vendored
Normal file
71
.github/scripts/install_musl.sh
vendored
Normal file
@@ -0,0 +1,71 @@
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
695
.github/workflows/build.yml
generated
vendored
Normal file
695
.github/workflows/build.yml
generated
vendored
Normal file
@@ -0,0 +1,695 @@
|
||||
# Do not modify!
|
||||
# This file was generated from a template using https://github.com/StefMa/pkl-gha
|
||||
|
||||
name: Build
|
||||
'on':
|
||||
push:
|
||||
branches-ignore:
|
||||
- main
|
||||
- release/*
|
||||
tags-ignore:
|
||||
- '**'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
gradle-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-check-windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check-windows
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check-windows
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
bench:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: bench:jmh
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true bench:jmh
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-bench
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-bench
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-compatibility:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-compatibility
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-compatibility
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
java-executables-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- uses: actions/checkout@v5
|
||||
- name: gradle build java executables
|
||||
shell: bash
|
||||
run: |-
|
||||
./gradlew
|
||||
--info --stacktrace -DpklMultiJdkTesting=true
|
||||
pkl-doc:build
|
||||
pkl-cli:build
|
||||
pkl-codegen-java:build
|
||||
pkl-codegen-kotlin:build
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-java
|
||||
path: '*/build/executable/**/*'
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-java-executables-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-java-executables-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-macOS-aarch64-snapshot:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-macOS-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-aarch64-snapshot:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-alpine-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-alpine-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-windows-amd64-snapshot:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-windows-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-macOS-aarch64-snapshot:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-macOS-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-aarch64-snapshot:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-alpine-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-alpine-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-windows-amd64-snapshot:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-windows-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
publish-test-results:
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-snapshot
|
||||
- pkl-cli-linux-amd64-snapshot
|
||||
- pkl-cli-macOS-aarch64-snapshot
|
||||
- pkl-cli-linux-aarch64-snapshot
|
||||
- pkl-cli-alpine-linux-amd64-snapshot
|
||||
- pkl-cli-windows-amd64-snapshot
|
||||
- pkl-doc-linux-amd64-snapshot
|
||||
- pkl-doc-macOS-aarch64-snapshot
|
||||
- pkl-doc-linux-aarch64-snapshot
|
||||
- pkl-doc-alpine-linux-amd64-snapshot
|
||||
- pkl-doc-windows-amd64-snapshot
|
||||
permissions:
|
||||
checks: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: test-results-xml-*
|
||||
- name: Publish test results
|
||||
if: '!cancelled()'
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
comment_mode: 'off'
|
||||
files: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-publish-test-results
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
786
.github/workflows/main.yml
generated
vendored
Normal file
786
.github/workflows/main.yml
generated
vendored
Normal file
@@ -0,0 +1,786 @@
|
||||
# Do not modify!
|
||||
# This file was generated from a template using https://github.com/StefMa/pkl-gha
|
||||
|
||||
name: Build (main)
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags-ignore:
|
||||
- '**'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
gradle-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-check-windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check-windows
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check-windows
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
bench:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: bench:jmh
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true bench:jmh
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-bench
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-bench
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-compatibility:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-compatibility
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-compatibility
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
java-executables-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- uses: actions/checkout@v5
|
||||
- name: gradle build java executables
|
||||
shell: bash
|
||||
run: |-
|
||||
./gradlew
|
||||
--info --stacktrace -DpklMultiJdkTesting=true
|
||||
pkl-doc:build
|
||||
pkl-cli:build
|
||||
pkl-codegen-java:build
|
||||
pkl-codegen-kotlin:build
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-java
|
||||
path: '*/build/executable/**/*'
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-java-executables-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-java-executables-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-macOS-aarch64-snapshot:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-macOS-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-aarch64-snapshot:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-alpine-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-alpine-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-windows-amd64-snapshot:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-windows-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-macOS-aarch64-snapshot:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-macOS-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-aarch64-snapshot:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-alpine-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-alpine-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-windows-amd64-snapshot:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-windows-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
deploy-snapshot:
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-snapshot
|
||||
- pkl-cli-linux-amd64-snapshot
|
||||
- pkl-cli-macOS-aarch64-snapshot
|
||||
- pkl-cli-linux-aarch64-snapshot
|
||||
- pkl-cli-alpine-linux-amd64-snapshot
|
||||
- pkl-cli-windows-amd64-snapshot
|
||||
- pkl-doc-linux-amd64-snapshot
|
||||
- pkl-doc-macOS-aarch64-snapshot
|
||||
- pkl-doc-linux-aarch64-snapshot
|
||||
- pkl-doc-alpine-linux-amd64-snapshot
|
||||
- pkl-doc-windows-amd64-snapshot
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
environment: maven-release
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: executable-**
|
||||
- env:
|
||||
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }}
|
||||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
|
||||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
|
||||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
|
||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true publishToSonatype
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-deploy-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-deploy-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
publish-test-results:
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-snapshot
|
||||
- pkl-cli-linux-amd64-snapshot
|
||||
- pkl-cli-macOS-aarch64-snapshot
|
||||
- pkl-cli-linux-aarch64-snapshot
|
||||
- pkl-cli-alpine-linux-amd64-snapshot
|
||||
- pkl-cli-windows-amd64-snapshot
|
||||
- pkl-doc-linux-amd64-snapshot
|
||||
- pkl-doc-macOS-aarch64-snapshot
|
||||
- pkl-doc-linux-aarch64-snapshot
|
||||
- pkl-doc-alpine-linux-amd64-snapshot
|
||||
- pkl-doc-windows-amd64-snapshot
|
||||
- deploy-snapshot
|
||||
permissions:
|
||||
checks: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: test-results-xml-*
|
||||
- name: Publish test results
|
||||
if: '!cancelled()'
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
comment_mode: 'off'
|
||||
files: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-publish-test-results
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
trigger-downstream-builds:
|
||||
if: github.repository_owner == 'apple'
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-snapshot
|
||||
- pkl-cli-linux-amd64-snapshot
|
||||
- pkl-cli-macOS-aarch64-snapshot
|
||||
- pkl-cli-linux-aarch64-snapshot
|
||||
- pkl-cli-alpine-linux-amd64-snapshot
|
||||
- pkl-cli-windows-amd64-snapshot
|
||||
- pkl-doc-linux-amd64-snapshot
|
||||
- pkl-doc-macOS-aarch64-snapshot
|
||||
- pkl-doc-linux-aarch64-snapshot
|
||||
- pkl-doc-alpine-linux-amd64-snapshot
|
||||
- pkl-doc-windows-amd64-snapshot
|
||||
- deploy-snapshot
|
||||
- publish-test-results
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create app token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ secrets.PKL_CI_CLIENT_ID }}
|
||||
private-key: ${{ secrets.PKL_CI }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
- name: Trigger pkl-lang.org build
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: |-
|
||||
gh workflow run \
|
||||
--repo apple/pkl-lang.org \
|
||||
--ref main \
|
||||
--field source_run="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
main.yml
|
||||
587
.github/workflows/prb.yml
generated
vendored
Normal file
587
.github/workflows/prb.yml
generated
vendored
Normal file
@@ -0,0 +1,587 @@
|
||||
# Do not modify!
|
||||
# This file was generated from a template using https://github.com/StefMa/pkl-gha
|
||||
|
||||
name: Pull Request
|
||||
'on':
|
||||
pull_request: {}
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
gradle-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-check-windows:
|
||||
if: contains(github.event.pull_request.body, '[windows]')
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check-windows
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check-windows
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-amd64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-cli]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux-amd64]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux-amd64]')
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-macOS-aarch64-snapshot:
|
||||
if: (contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-cli]') || contains(github.event.pull_request.body, '[native-pkl-cli-macOS]') || contains(github.event.pull_request.body, '[native-pkl-cli-macOS-aarch64]') || contains(github.event.pull_request.body, '[native-pkl-cli-macOS-aarch64]')) && github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-macOS-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-aarch64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-cli]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux-aarch64]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux-aarch64]')
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-alpine-linux-amd64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-cli]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux-amd64]') || contains(github.event.pull_request.body, '[native-pkl-cli-linux-amd64]') || contains(github.event.pull_request.body, '[native-pkl-cli-alpine-linux-amd64]')
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-alpine-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-windows-amd64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-cli]') || contains(github.event.pull_request.body, '[native-pkl-cli-windows]') || contains(github.event.pull_request.body, '[native-pkl-cli-windows-amd64]') || contains(github.event.pull_request.body, '[native-pkl-cli-windows-amd64]')
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-windows-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-amd64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-doc]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux-amd64]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux-amd64]')
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-macOS-aarch64-snapshot:
|
||||
if: (contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-doc]') || contains(github.event.pull_request.body, '[native-pkl-doc-macOS]') || contains(github.event.pull_request.body, '[native-pkl-doc-macOS-aarch64]') || contains(github.event.pull_request.body, '[native-pkl-doc-macOS-aarch64]')) && github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-macOS-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-aarch64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-doc]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux-aarch64]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux-aarch64]')
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-alpine-linux-amd64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-doc]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux-amd64]') || contains(github.event.pull_request.body, '[native-pkl-doc-linux-amd64]') || contains(github.event.pull_request.body, '[native-pkl-doc-alpine-linux-amd64]')
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-alpine-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-windows-amd64-snapshot:
|
||||
if: contains(github.event.pull_request.body, '[native]') || contains(github.event.pull_request.body, '[native-pkl-doc]') || contains(github.event.pull_request.body, '[native-pkl-doc-windows]') || contains(github.event.pull_request.body, '[native-pkl-doc-windows-amd64]') || contains(github.event.pull_request.body, '[native-pkl-doc-windows-amd64]')
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-windows-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
if-no-files-found: ignore
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
upload-event-file:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Upload event file
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-event-file
|
||||
path: ${{ github.event_path }}
|
||||
731
.github/workflows/release-branch.yml
generated
vendored
Normal file
731
.github/workflows/release-branch.yml
generated
vendored
Normal file
@@ -0,0 +1,731 @@
|
||||
# Do not modify!
|
||||
# This file was generated from a template using https://github.com/StefMa/pkl-gha
|
||||
|
||||
name: Build (release branch)
|
||||
'on':
|
||||
push:
|
||||
branches:
|
||||
- release/*
|
||||
tags-ignore:
|
||||
- '**'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
gradle-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-check-windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check-windows
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check-windows
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
bench:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: bench:jmh
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true bench:jmh
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-bench
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-bench
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-compatibility:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-compatibility
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-compatibility
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
java-executables-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- uses: actions/checkout@v5
|
||||
- name: gradle build java executables
|
||||
shell: bash
|
||||
run: |-
|
||||
./gradlew
|
||||
--info --stacktrace -DpklMultiJdkTesting=true
|
||||
pkl-doc:build
|
||||
pkl-cli:build
|
||||
pkl-codegen-java:build
|
||||
pkl-codegen-kotlin:build
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-java
|
||||
path: '*/build/executable/**/*'
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-java-executables-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-java-executables-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-macOS-aarch64-snapshot:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-macOS-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-aarch64-snapshot:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-alpine-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-alpine-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-windows-amd64-snapshot:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-windows-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-macOS-aarch64-snapshot:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-macOS-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-macOS-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-aarch64-snapshot:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-aarch64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-alpine-linux-amd64-snapshot:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-alpine-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-alpine-linux-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-windows-amd64-snapshot:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-windows-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-windows-amd64-snapshot
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
publish-test-results:
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-snapshot
|
||||
- pkl-cli-linux-amd64-snapshot
|
||||
- pkl-cli-macOS-aarch64-snapshot
|
||||
- pkl-cli-linux-aarch64-snapshot
|
||||
- pkl-cli-alpine-linux-amd64-snapshot
|
||||
- pkl-cli-windows-amd64-snapshot
|
||||
- pkl-doc-linux-amd64-snapshot
|
||||
- pkl-doc-macOS-aarch64-snapshot
|
||||
- pkl-doc-linux-aarch64-snapshot
|
||||
- pkl-doc-alpine-linux-amd64-snapshot
|
||||
- pkl-doc-windows-amd64-snapshot
|
||||
permissions:
|
||||
checks: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: test-results-xml-*
|
||||
- name: Publish test results
|
||||
if: '!cancelled()'
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
comment_mode: 'off'
|
||||
files: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-publish-test-results
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
trigger-downstream-builds:
|
||||
if: github.repository_owner == 'apple'
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-snapshot
|
||||
- pkl-cli-linux-amd64-snapshot
|
||||
- pkl-cli-macOS-aarch64-snapshot
|
||||
- pkl-cli-linux-aarch64-snapshot
|
||||
- pkl-cli-alpine-linux-amd64-snapshot
|
||||
- pkl-cli-windows-amd64-snapshot
|
||||
- pkl-doc-linux-amd64-snapshot
|
||||
- pkl-doc-macOS-aarch64-snapshot
|
||||
- pkl-doc-linux-aarch64-snapshot
|
||||
- pkl-doc-alpine-linux-amd64-snapshot
|
||||
- pkl-doc-windows-amd64-snapshot
|
||||
- publish-test-results
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create app token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ secrets.PKL_CI_CLIENT_ID }}
|
||||
private-key: ${{ secrets.PKL_CI }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
- name: Trigger pkl-lang.org build
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: |-
|
||||
gh workflow run \
|
||||
--repo apple/pkl-lang.org \
|
||||
--ref main \
|
||||
--field source_run="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
main.yml
|
||||
826
.github/workflows/release.yml
generated
vendored
Normal file
826
.github/workflows/release.yml
generated
vendored
Normal file
@@ -0,0 +1,826 @@
|
||||
# Do not modify!
|
||||
# This file was generated from a template using https://github.com/StefMa/pkl-gha
|
||||
|
||||
name: Release
|
||||
'on':
|
||||
push:
|
||||
branches-ignore:
|
||||
- '**'
|
||||
tags:
|
||||
- '**'
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: false
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
gradle-check:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-check-windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: check
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true check
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-check-windows
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-check-windows
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
bench:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: bench:jmh
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true bench:jmh
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-bench
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-bench
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
gradle-compatibility:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true :pkl-gradle:build :pkl-gradle:compatibilityTestReleases
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-gradle-compatibility
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-gradle-compatibility
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
java-executables-release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- uses: actions/checkout@v5
|
||||
- name: gradle build java executables
|
||||
shell: bash
|
||||
run: |-
|
||||
./gradlew
|
||||
--info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true
|
||||
pkl-doc:build
|
||||
pkl-cli:build
|
||||
pkl-codegen-java:build
|
||||
pkl-codegen-kotlin:build
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-java
|
||||
path: '*/build/executable/**/*'
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-java-executables-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-java-executables-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-amd64-release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-amd64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-amd64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-macOS-aarch64-release:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-macOS-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-macOS-aarch64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-macOS-aarch64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-linux-aarch64-release:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-linux-aarch64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-linux-aarch64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-linux-aarch64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-alpine-linux-amd64-release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.musl=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-alpine-linux-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-alpine-linux-amd64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-alpine-linux-amd64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-cli-windows-amd64-release:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-cli-windows-amd64
|
||||
path: pkl-cli/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-cli-windows-amd64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-cli-windows-amd64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-amd64-release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-amd64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-amd64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-macOS-aarch64-release:
|
||||
if: github.repository_owner == 'apple'
|
||||
runs-on:
|
||||
- self-hosted
|
||||
- macos
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-macOS-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-macOS-aarch64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-macOS-aarch64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-linux-aarch64-release:
|
||||
runs-on: ubuntu-24.04-arm
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: aarch64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-linux-aarch64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-linux-aarch64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-linux-aarch64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-alpine-linux-amd64-release:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: Install musl and zlib
|
||||
run: |
|
||||
set -e
|
||||
mkdir -p ~/staticdeps/
|
||||
|
||||
ZLIB_VERSION="1.2.13"
|
||||
MUSL_VERSION="1.2.5"
|
||||
|
||||
# install zlib
|
||||
if [[ ! -f ~/staticdeps/include/zlib.h ]]; then
|
||||
# Download zlib tarball and signature
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz" -o /tmp/zlib.tar.gz
|
||||
curl -Lf "https://github.com/madler/zlib/releases/download/v${ZLIB_VERSION}/zlib-${ZLIB_VERSION}.tar.gz.asc" -o /tmp/zlib.tar.gz.asc
|
||||
|
||||
# Import zlib GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 5ED46A6721D365587791E2AA783FCD8E58BCAFBA
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying zlib GPG signature..."
|
||||
gpg --verify /tmp/zlib.tar.gz.asc /tmp/zlib.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
cd "/tmp/dep_zlib-${ZLIB_VERSION}"
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: configure..."
|
||||
./configure --static --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "zlib-${ZLIB_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf /tmp/dep_zlib-${ZLIB_VERSION}
|
||||
fi
|
||||
|
||||
# install musl
|
||||
if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then
|
||||
# Download musl tarball and signature
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz" -o /tmp/musl.tar.gz
|
||||
curl -Lf "https://musl.libc.org/releases/musl-${MUSL_VERSION}.tar.gz.asc" -o /tmp/musl.tar.gz.asc
|
||||
|
||||
# Import musl GPG key
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 836489290BB6B70F99FFDA0556BCDB593020450F
|
||||
|
||||
# Verify GPG signature
|
||||
echo "Verifying musl GPG signature..."
|
||||
gpg --verify /tmp/musl.tar.gz.asc /tmp/musl.tar.gz
|
||||
|
||||
mkdir -p "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
cd "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# shellcheck disable=SC2002
|
||||
cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC .
|
||||
|
||||
echo "musl-${MUSL_VERSION}: configure..."
|
||||
./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make..."
|
||||
make -s -j4
|
||||
|
||||
echo "musl-${MUSL_VERSION}: make install..."
|
||||
make -s install
|
||||
|
||||
rm -rf "/tmp/dep_musl-${MUSL_VERSION}"
|
||||
|
||||
# native-image expects to find an executable at this path.
|
||||
ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc
|
||||
fi
|
||||
|
||||
echo "${HOME}/staticdeps/bin" >> "$GITHUB_PATH"
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.musl=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-alpine-linux-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-alpine-linux-amd64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-alpine-linux-amd64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
pkl-doc-windows-amd64-release:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
JAVA_HOME: /jdk
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- name: gradle buildNative
|
||||
shell: bash
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative
|
||||
- name: Upload executable artifacts
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: executable-pkl-doc-windows-amd64
|
||||
path: pkl-doc/build/executable/**/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-pkl-doc-windows-amd64-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-pkl-doc-windows-amd64-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
deploy-release:
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-release
|
||||
- pkl-cli-linux-amd64-release
|
||||
- pkl-cli-macOS-aarch64-release
|
||||
- pkl-cli-linux-aarch64-release
|
||||
- pkl-cli-alpine-linux-amd64-release
|
||||
- pkl-cli-windows-amd64-release
|
||||
- pkl-doc-linux-amd64-release
|
||||
- pkl-doc-macOS-aarch64-release
|
||||
- pkl-doc-linux-aarch64-release
|
||||
- pkl-doc-alpine-linux-amd64-release
|
||||
- pkl-doc-windows-amd64-release
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
LANG: en_US.UTF-8
|
||||
environment: maven-release
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: temurin
|
||||
architecture: x64
|
||||
cache: gradle
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: executable-**
|
||||
- env:
|
||||
ORG_GRADLE_PROJECT_signingKeyId: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEYID }}
|
||||
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
|
||||
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
|
||||
ORG_GRADLE_PROJECT_sonatypePassword: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEPASSWORD }}
|
||||
ORG_GRADLE_PROJECT_sonatypeUsername: ${{ secrets.ORG_GRADLE_PROJECT_SONATYPEUSERNAME }}
|
||||
run: ./gradlew --info --stacktrace -DpklMultiJdkTesting=true publishToSonatype closeAndReleaseSonatypeStagingRepository
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-deploy-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-deploy-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
github-release:
|
||||
needs: deploy-release
|
||||
permissions:
|
||||
contents: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: executable-**
|
||||
- name: Publish release on GitHub
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
TAG_NAME: ${{ github.ref_name }}
|
||||
GIT_SHA: ${{ github.sha }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
run: |-
|
||||
# exclude build_artifacts.txt from publish
|
||||
rm -f */build/executable/*.build_artifacts.txt
|
||||
find */build/executable/* -type d | xargs rm -rf
|
||||
gh release create ${TAG_NAME} \
|
||||
--title "${TAG_NAME}" \
|
||||
--target "${GIT_SHA}" \
|
||||
--verify-tag \
|
||||
--notes "Release notes: https://pkl-lang.org/main/current/release-notes/changelog.html#release-${TAG_NAME}" \
|
||||
*/build/executable/*
|
||||
- name: Upload Test Result XML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-xml-github-release
|
||||
path: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-github-release
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
publish-test-results:
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-release
|
||||
- pkl-cli-linux-amd64-release
|
||||
- pkl-cli-macOS-aarch64-release
|
||||
- pkl-cli-linux-aarch64-release
|
||||
- pkl-cli-alpine-linux-amd64-release
|
||||
- pkl-cli-windows-amd64-release
|
||||
- pkl-doc-linux-amd64-release
|
||||
- pkl-doc-macOS-aarch64-release
|
||||
- pkl-doc-linux-aarch64-release
|
||||
- pkl-doc-alpine-linux-amd64-release
|
||||
- pkl-doc-windows-amd64-release
|
||||
- deploy-release
|
||||
- github-release
|
||||
permissions:
|
||||
checks: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/download-artifact@v6
|
||||
with:
|
||||
pattern: test-results-xml-*
|
||||
- name: Publish test results
|
||||
if: '!cancelled()'
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
comment_mode: 'off'
|
||||
files: '**/build/test-results/**/*.xml'
|
||||
- name: Upload Test Result HTML
|
||||
if: '!cancelled()'
|
||||
uses: actions/upload-artifact@v5
|
||||
with:
|
||||
name: test-results-html-publish-test-results
|
||||
path: '**/build/reports/tests/**/*'
|
||||
if-no-files-found: ignore
|
||||
trigger-downstream-builds:
|
||||
if: github.repository_owner == 'apple'
|
||||
needs:
|
||||
- gradle-check
|
||||
- gradle-check-windows
|
||||
- bench
|
||||
- gradle-compatibility
|
||||
- java-executables-release
|
||||
- pkl-cli-linux-amd64-release
|
||||
- pkl-cli-macOS-aarch64-release
|
||||
- pkl-cli-linux-aarch64-release
|
||||
- pkl-cli-alpine-linux-amd64-release
|
||||
- pkl-cli-windows-amd64-release
|
||||
- pkl-doc-linux-amd64-release
|
||||
- pkl-doc-macOS-aarch64-release
|
||||
- pkl-doc-linux-aarch64-release
|
||||
- pkl-doc-alpine-linux-amd64-release
|
||||
- pkl-doc-windows-amd64-release
|
||||
- deploy-release
|
||||
- github-release
|
||||
- publish-test-results
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Create app token
|
||||
id: app-token
|
||||
uses: actions/create-github-app-token@v2
|
||||
with:
|
||||
app-id: ${{ secrets.PKL_CI_CLIENT_ID }}
|
||||
private-key: ${{ secrets.PKL_CI }}
|
||||
owner: ${{ github.repository_owner }}
|
||||
- name: Trigger pkl-lang.org build
|
||||
env:
|
||||
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
||||
run: |-
|
||||
gh workflow run \
|
||||
--repo apple/pkl-lang.org \
|
||||
--ref main \
|
||||
--field source_run="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
|
||||
main.yml
|
||||
36
.github/workflows/test_report.yml
generated
vendored
Normal file
36
.github/workflows/test_report.yml
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
# Do not modify!
|
||||
# This file was generated from a template using https://github.com/StefMa/pkl-gha
|
||||
|
||||
name: PR Test Reports
|
||||
'on':
|
||||
workflow_run:
|
||||
types:
|
||||
- completed
|
||||
workflows:
|
||||
- Pull Request
|
||||
permissions:
|
||||
contents: read
|
||||
jobs:
|
||||
test-results:
|
||||
name: Test Results
|
||||
if: github.event.workflow_run.conclusion == 'success' || github.event.workflow_run.conclusion == 'failure'
|
||||
permissions:
|
||||
actions: read
|
||||
checks: write
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: dawidd6/action-download-artifact@v11
|
||||
with:
|
||||
path: artifacts
|
||||
name: test-results-.*
|
||||
name_is_regex: true
|
||||
run_id: ${{ github.event.workflow_run.id }}
|
||||
- name: Publish test results
|
||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||
with:
|
||||
commit: ${{ github.event.workflow_run.head_sha }}
|
||||
comment_mode: 'off'
|
||||
files: artifacts/**/*.xml
|
||||
event_file: artifacts/test-results-event-file/event.json
|
||||
event_name: ${{ github.event.workflow_run.event }}
|
||||
Reference in New Issue
Block a user