mirror of
https://github.com/ivabus/pantry
synced 2024-11-10 02:25:18 +03:00
fix(pkl)
their builds had too many features to run in our docker image. that's fine, we'll just un-vendor them (better anyway). includes some tricks to let GraalVM's native-image compiler understand our environment closes #6439
This commit is contained in:
parent
5cdbc20ad4
commit
0a376e0bd8
|
@ -1,17 +1,35 @@
|
||||||
distributable: ~
|
distributable:
|
||||||
|
url: https://github.com/apple/pkl/archive/refs/tags/{{version.tag}}.tar.gz
|
||||||
warnings:
|
strip-components: 1
|
||||||
- vendored
|
|
||||||
|
|
||||||
versions:
|
versions:
|
||||||
github: apple/pkl
|
github: apple/pkl
|
||||||
|
|
||||||
|
companions:
|
||||||
|
openjdk.org: '*'
|
||||||
|
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
curl.se: '*'
|
openjdk.org: ^17
|
||||||
|
linux:
|
||||||
|
zlib.net: 1
|
||||||
|
llvm.org: '*'
|
||||||
script:
|
script:
|
||||||
- curl -L "https://github.com/apple/pkl/releases/download/{{version}}/pkl-${SYS_NAME}-${ARCH_NAME}" -o "pkl"
|
# graalvm fails to understand our compiler environment
|
||||||
- install -D pkl {{prefix}}/bin/pkl
|
- run: |
|
||||||
|
sed -i '/-H:Class=org.pkl.cli.Main/i\
|
||||||
|
add("--static")\
|
||||||
|
add("--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang")\
|
||||||
|
add("-H:CCompilerOption=-Wl,-L{{deps.zlib.net.prefix}}/lib")\
|
||||||
|
add("-H:-CheckToolchain")' \
|
||||||
|
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
|
||||||
env:
|
env:
|
||||||
darwin:
|
darwin:
|
||||||
SYS_NAME: macos
|
SYS_NAME: macos
|
||||||
|
@ -23,9 +41,15 @@ build:
|
||||||
ARCH_NAME: aarch64
|
ARCH_NAME: aarch64
|
||||||
|
|
||||||
provides:
|
provides:
|
||||||
|
- bin/jpkl
|
||||||
- bin/pkl
|
- bin/pkl
|
||||||
|
|
||||||
test:
|
test:
|
||||||
|
- pkl --version
|
||||||
|
- jpkl --version
|
||||||
- pkl --version | grep {{version}}
|
- pkl --version | grep {{version}}
|
||||||
|
- jpkl --version | grep {{version}}
|
||||||
- pkl eval template.pkl | grep 'Writing a Template'
|
- pkl eval template.pkl | grep 'Writing a Template'
|
||||||
|
- jpkl eval template.pkl | grep 'Writing a Template'
|
||||||
- pkl eval class.pkl | grep 'bestForConfig'
|
- pkl eval class.pkl | grep 'bestForConfig'
|
||||||
|
- jpkl eval class.pkl | grep 'bestForConfig'
|
||||||
|
|
Loading…
Reference in a new issue