apparently spacing and lines matter. ugh.
This commit is contained in:
Jacob Heider 2024-06-17 23:25:18 -04:00
parent 172ab2af49
commit 6b09c73fa1
No known key found for this signature in database
GPG key ID: 59D15ADC7DCD39BB

View file

@ -16,22 +16,31 @@ build:
llvm.org: '*' llvm.org: '*'
script: script:
# graalvm fails to understand our compiler environment # graalvm fails to understand our compiler environment
- run: LINE_PREFIX="," - run: |
if test "{{hw.platform}}" = "darwin"; then
sed -i '/-H:Class=org.pkl.cli.Main/i\
,"--static"\
,"--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang"\
,"-H:CCompilerOption=-fPIC"\
,"-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib"\
,"-H:-CheckToolchain"' \
pkl-cli.gradle.kts
fi
if: <0.26.0 if: <0.26.0
- run: |
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}" \
pkl-cli.gradle.kts
if: linux
working-directory: pkl-cli working-directory: pkl-cli
- run: |
if test "{{hw.platform}}" = "darwin"; then
sed -i '/-H:Class=org.pkl.cli.Main/i\
add("--static")\
add("--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang")\
add("-H:CCompilerOption=-fPIC")\
add("-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib")\
add("-H:-CheckToolchain")' \
pkl-cli.gradle.kts
fi
if: '>=0.26.0'
working-directory: pkl-cli
- ./gradlew -DreleaseBuild=true :pkl-cli:javaExecutable :pkl-cli:${SYS_NAME%os}ExecutableA${ARCH_NAME#a} - ./gradlew -DreleaseBuild=true :pkl-cli:javaExecutable :pkl-cli:${SYS_NAME%os}ExecutableA${ARCH_NAME#a}
- run: | - run: |
install -D jpkl {{prefix}}/bin/jpkl install -D jpkl {{prefix}}/bin/jpkl