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=","
if: <0.26.0
- run: | - run: |
LINE_PREFIX="add(" if test "{{hw.platform}}" = "darwin"; then
LINE_SUFFIX=")" sed -i '/-H:Class=org.pkl.cli.Main/i\
if: '>=0.26.0' ,"--static"\
- run: | ,"--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang"\
sed -i "/-H:Class=org.pkl.cli.Main/i\ ,"-H:CCompilerOption=-fPIC"\
${LINE_PREFIX}\"--static\"${LINE_SUFFIX}\ ,"-H:CCompilerOption=-Wl,-pie,-L{{deps.zlib.net.prefix}}/lib"\
${LINE_PREFIX}\"--native-compiler-path={{deps.llvm.org.prefix}}/bin/clang\"${LINE_SUFFIX}\ ,"-H:-CheckToolchain"' \
${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 pkl-cli.gradle.kts
if: linux fi
if: <0.26.0
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