2024-06-18 01:49:16 +03:00
|
|
|
distributable:
|
|
|
|
url: https://github.com/apple/pkl/archive/refs/tags/{{version.tag}}.tar.gz
|
|
|
|
strip-components: 1
|
2024-02-11 17:38:13 +03:00
|
|
|
|
|
|
|
versions:
|
|
|
|
github: apple/pkl
|
|
|
|
|
2024-06-18 01:49:16 +03:00
|
|
|
companions:
|
|
|
|
openjdk.org: '*'
|
|
|
|
|
2024-02-11 17:38:13 +03:00
|
|
|
build:
|
|
|
|
dependencies:
|
2024-06-18 01:49:16 +03:00
|
|
|
openjdk.org: ^17
|
|
|
|
linux:
|
|
|
|
zlib.net: 1
|
|
|
|
llvm.org: '*'
|
2024-02-11 17:38:13 +03:00
|
|
|
script:
|
2024-06-18 01:49:16 +03:00
|
|
|
# graalvm fails to understand our compiler environment
|
2024-06-18 06:11:11 +03:00
|
|
|
- run: LINE_PREFIX=","
|
|
|
|
if: <0.26.0
|
2024-06-18 01:49:16 +03:00
|
|
|
- run: |
|
2024-06-18 06:11:11 +03:00
|
|
|
LINE_PREFIX="add("
|
|
|
|
LINE_SUFFIX=")"
|
|
|
|
if: '>=0.26.0'
|
|
|
|
- run: |
|
|
|
|
sed -i "/-H:Class=org.pkl.cli.Main/i\
|
|
|
|
${LINE_PREFIX}\"--static\"${LINE_SUFFIX}\
|
|
|
|
${LINE_PREFIX}\"--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang\"${LINE_SUFFIX}\
|
|
|
|
${LINE_PREFIX}\"-H:CCompilerOption=-fPIC\"${LINE_SUFFIX}\
|
|
|
|
${LINE_PREFIX}\"-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib\"${LINE_SUFFIX}\
|
|
|
|
${LINE_PREFIX}\"-H:-CheckToolchain\"${LINE_SUFFIX}" \
|
2024-06-18 01:49:16 +03:00
|
|
|
pkl-cli.gradle.kts
|
|
|
|
if: linux
|
|
|
|
working-directory: pkl-cli
|
|
|
|
- ./gradlew -DreleaseBuild=true :pkl-cli:javaExecutable :pkl-cli:${SYS_NAME%os}ExecutableA${ARCH_NAME#a}
|
|
|
|
- run: |
|
|
|
|
install -D jpkl {{prefix}}/bin/jpkl
|
|
|
|
install -D pkl-${SYS_NAME}-${ARCH_NAME} {{prefix}}/bin/pkl
|
|
|
|
working-directory: pkl-cli/build/executable
|
2024-02-11 17:38:13 +03:00
|
|
|
env:
|
|
|
|
darwin:
|
|
|
|
SYS_NAME: macos
|
|
|
|
linux:
|
|
|
|
SYS_NAME: linux
|
|
|
|
x86-64:
|
|
|
|
ARCH_NAME: amd64
|
|
|
|
aarch64:
|
|
|
|
ARCH_NAME: aarch64
|
|
|
|
|
|
|
|
provides:
|
2024-06-18 01:49:16 +03:00
|
|
|
- bin/jpkl
|
2024-02-11 17:38:13 +03:00
|
|
|
- bin/pkl
|
|
|
|
|
|
|
|
test:
|
2024-06-18 01:49:16 +03:00
|
|
|
- pkl --version
|
|
|
|
- jpkl --version
|
2024-02-11 17:38:13 +03:00
|
|
|
- pkl --version | grep {{version}}
|
2024-06-18 01:49:16 +03:00
|
|
|
- jpkl --version | grep {{version}}
|
2024-06-18 05:23:52 +03:00
|
|
|
- pkl eval template.pkl
|
2024-02-11 17:38:13 +03:00
|
|
|
- pkl eval template.pkl | grep 'Writing a Template'
|
2024-06-18 01:49:16 +03:00
|
|
|
- jpkl eval template.pkl | grep 'Writing a Template'
|
|
|
|
- pkl eval class.pkl | grep 'bestForConfig'
|
|
|
|
- jpkl eval class.pkl | grep 'bestForConfig'
|