diff --git a/.circleci/config.pkl b/.circleci/config.pkl index 0a299a1e5..5ca21f1a9 100644 --- a/.circleci/config.pkl +++ b/.circleci/config.pkl @@ -21,7 +21,7 @@ import "jobs/DeployJob.pkl" import "jobs/GradleCheckJob.pkl" import "jobs/SimpleGradleJob.pkl" -local prbJobs: Listing = gradleCheckJobs.keys.toListing() +local prbJobs: Listing = (gradleCheckJobs.keys + buildNativeJobs.keys.filter((it) -> it.startsWith("libpkl") && it.endsWith("snapshot"))).toListing() local buildAndTestJobs = (prbJobs) { "bench" @@ -81,7 +81,7 @@ triggerPackageDocsBuild = "release" local buildNativeJobs: Mapping = new { for (_dist in List("release", "snapshot")) { - for (_project in List("pkl-cli", "pkl-doc")) { + for (_project in List("pkl-cli", "pkl-doc", "libpkl")) { for (_arch in List("amd64", "aarch64")) { for (_os in List("macOS", "linux")) { ["\(_project)-\(_os)-\(_arch)-\(_dist)"] { @@ -89,6 +89,7 @@ local buildNativeJobs: Mapping = new { os = _os isRelease = _dist == "release" project = _project + buildDir = if (_project == "libpkl") "libpkl/build/native-libs/" else "\(_project)/build/executable/" } } } @@ -98,12 +99,14 @@ local buildNativeJobs: Mapping = new { musl = true isRelease = _dist == "release" project = _project + buildDir = if (_project == "libpkl") "libpkl/build/native-libs/" else "\(_project)/build/executable/" } ["\(_project)-windows-amd64-\(_dist)"] { arch = "amd64" os = "windows" isRelease = _dist == "release" project = _project + buildDir = if (_project == "libpkl") "libpkl/build/native-libs/" else "\(_project)/build/executable/" } } } diff --git a/.circleci/config.yml b/.circleci/config.yml index 3522e0f68..628a0eb67 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -23,6 +23,7 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.targetArch=amd64 pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: @@ -100,6 +101,7 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: @@ -131,6 +133,7 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: @@ -192,6 +195,7 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: @@ -269,6 +273,7 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.musl=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: @@ -298,16 +303,664 @@ jobs: && cp -r . /jdk name: Set up environment shell: bash.exe + - run: + command: choco install mingw + name: Installing mingw + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative + name: gradle buildNative + shell: bash.exe + - persist_to_workspace: + root: '.' + paths: + - pkl-cli/build/executable/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: windows.large + machine: + image: windows-server-2022-gui:current + pkl-doc-macOS-amd64-release: + steps: + - checkout + - run: + command: /usr/sbin/softwareupdate --install-rosetta --agree-to-license + name: Installing Rosetta 2 + - run: + command: |- + # install jdk + curl -Lf \ + https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_mac_hotspot_21.0.5_11.tar.gz -o /tmp/jdk.tar.gz + + mkdir $HOME/jdk \ + && cd $HOME/jdk \ + && cat /tmp/jdk.tar.gz | tar --strip-components=1 -xzC . + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.targetArch=amd64 pkl-doc:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - pkl-doc/build/executable/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /Users/distiller/jdk/Contents/Home + resource_class: m2pro.large + macos: + xcode: 15.3.0 + pkl-doc-linux-amd64-release: + steps: + - checkout + - restore_cache: + key: staticdeps-amd64 + name: Restore static deps from cache + - run: + command: |- + 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/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_linux_hotspot_21.0.5_11.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/x86_64-redhat-linux/8/libstdc++.a ~/staticdeps + + # install zlib + if [[ ! -f ~/staticdeps/include/zlib.h ]]; then + curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz + + mkdir -p /tmp/dep_zlib-1.2.13 \ + && cd /tmp/dep_zlib-1.2.13 \ + && cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC . \ + && echo "zlib-1.2.13: configure..." && ./configure --static --prefix="$HOME"/staticdeps > /dev/null \ + && echo "zlib-1.2.13: make..." && make -s -j4 \ + && echo "zlib-1.2.13: make install..." && make -s install \ + && rm -rf /tmp/dep_zlib-1.2.13 + fi + + # install musl + if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then + curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz + + mkdir -p /tmp/dep_musl-1.2.2 \ + && cd /tmp/dep_musl-1.2.2 \ + && cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC . \ + && echo "musl-1.2.2: configure..." && ./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null \ + && echo "musl-1.2.2: make..." && make -s -j4 \ + && echo "musl-1.2.2: make install..." && make -s install \ + && rm -rf /tmp/dep_musl-1.2.2 + + # native-image expects to find an executable at this path. + ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc + fi + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - save_cache: + paths: + - ~/staticdeps + key: staticdeps-amd64 + name: Save statics deps to cache + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - pkl-doc/build/executable/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: xlarge + docker: + - image: oraclelinux:8-slim + pkl-doc-macOS-aarch64-release: + steps: + - checkout + - run: + command: |- + # install jdk + curl -Lf \ + https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.5_11.tar.gz -o /tmp/jdk.tar.gz + + mkdir $HOME/jdk \ + && cd $HOME/jdk \ + && cat /tmp/jdk.tar.gz | tar --strip-components=1 -xzC . + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - pkl-doc/build/executable/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /Users/distiller/jdk/Contents/Home + resource_class: m2pro.large + macos: + xcode: 15.3.0 + pkl-doc-linux-aarch64-release: + steps: + - checkout + - restore_cache: + key: staticdeps-aarch64 + name: Restore static deps from cache + - run: + command: |- + 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/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.5_11.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/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/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz + + mkdir -p /tmp/dep_zlib-1.2.13 \ + && cd /tmp/dep_zlib-1.2.13 \ + && cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC . \ + && echo "zlib-1.2.13: configure..." && ./configure --static --prefix="$HOME"/staticdeps > /dev/null \ + && echo "zlib-1.2.13: make..." && make -s -j4 \ + && echo "zlib-1.2.13: make install..." && make -s install \ + && rm -rf /tmp/dep_zlib-1.2.13 + fi + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - save_cache: + paths: + - ~/staticdeps + key: staticdeps-aarch64 + name: Save statics deps to cache + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - pkl-doc/build/executable/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: arm.xlarge + docker: + - image: arm64v8/oraclelinux:8-slim + pkl-doc-linux-alpine-amd64-release: + steps: + - checkout + - restore_cache: + key: staticdeps-amd64 + name: Restore static deps from cache + - run: + command: |- + 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/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_linux_hotspot_21.0.5_11.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/x86_64-redhat-linux/8/libstdc++.a ~/staticdeps + + # install zlib + if [[ ! -f ~/staticdeps/include/zlib.h ]]; then + curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz + + mkdir -p /tmp/dep_zlib-1.2.13 \ + && cd /tmp/dep_zlib-1.2.13 \ + && cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC . \ + && echo "zlib-1.2.13: configure..." && ./configure --static --prefix="$HOME"/staticdeps > /dev/null \ + && echo "zlib-1.2.13: make..." && make -s -j4 \ + && echo "zlib-1.2.13: make install..." && make -s install \ + && rm -rf /tmp/dep_zlib-1.2.13 + fi + + # install musl + if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then + curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz + + mkdir -p /tmp/dep_musl-1.2.2 \ + && cd /tmp/dep_musl-1.2.2 \ + && cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC . \ + && echo "musl-1.2.2: configure..." && ./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null \ + && echo "musl-1.2.2: make..." && make -s -j4 \ + && echo "musl-1.2.2: make install..." && make -s install \ + && rm -rf /tmp/dep_musl-1.2.2 + + # native-image expects to find an executable at this path. + ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc + fi + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - save_cache: + paths: + - ~/staticdeps + key: staticdeps-amd64 + name: Save statics deps to cache + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.musl=true pkl-doc:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - pkl-doc/build/executable/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: xlarge + docker: + - image: oraclelinux:8-slim + pkl-doc-windows-amd64-release: + steps: + - checkout + - run: + command: |- + # install jdk + curl -Lf \ + https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_windows_hotspot_21.0.5_11.zip -o /tmp/jdk.zip + + unzip /tmp/jdk.zip -d /tmp/jdk \ + && cd /tmp/jdk/jdk-* \ + && mkdir /jdk \ + && cp -r . /jdk + name: Set up environment + shell: bash.exe + - run: + command: choco install mingw + name: Installing mingw + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + name: gradle buildNative + shell: bash.exe + - persist_to_workspace: + root: '.' + paths: + - pkl-doc/build/executable/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: windows.large + machine: + image: windows-server-2022-gui:current + libpkl-macOS-amd64-release: + steps: + - checkout + - run: + command: /usr/sbin/softwareupdate --install-rosetta --agree-to-license + name: Installing Rosetta 2 + - run: + command: |- + # install jdk + curl -Lf \ + https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_mac_hotspot_21.0.5_11.tar.gz -o /tmp/jdk.tar.gz + + mkdir $HOME/jdk \ + && cd $HOME/jdk \ + && cat /tmp/jdk.tar.gz | tar --strip-components=1 -xzC . + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.targetArch=amd64 libpkl:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - libpkl/build/native-libs/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /Users/distiller/jdk/Contents/Home + resource_class: m2pro.large + macos: + xcode: 15.3.0 + libpkl-linux-amd64-release: + steps: + - checkout + - restore_cache: + key: staticdeps-amd64 + name: Restore static deps from cache + - run: + command: |- + 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/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_linux_hotspot_21.0.5_11.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/x86_64-redhat-linux/8/libstdc++.a ~/staticdeps + + # install zlib + if [[ ! -f ~/staticdeps/include/zlib.h ]]; then + curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz + + mkdir -p /tmp/dep_zlib-1.2.13 \ + && cd /tmp/dep_zlib-1.2.13 \ + && cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC . \ + && echo "zlib-1.2.13: configure..." && ./configure --static --prefix="$HOME"/staticdeps > /dev/null \ + && echo "zlib-1.2.13: make..." && make -s -j4 \ + && echo "zlib-1.2.13: make install..." && make -s install \ + && rm -rf /tmp/dep_zlib-1.2.13 + fi + + # install musl + if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then + curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz + + mkdir -p /tmp/dep_musl-1.2.2 \ + && cd /tmp/dep_musl-1.2.2 \ + && cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC . \ + && echo "musl-1.2.2: configure..." && ./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null \ + && echo "musl-1.2.2: make..." && make -s -j4 \ + && echo "musl-1.2.2: make install..." && make -s install \ + && rm -rf /tmp/dep_musl-1.2.2 + + # native-image expects to find an executable at this path. + ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc + fi + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - save_cache: + paths: + - ~/staticdeps + key: staticdeps-amd64 + name: Save statics deps to cache + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true libpkl:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - libpkl/build/native-libs/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: xlarge + docker: + - image: oraclelinux:8-slim + libpkl-macOS-aarch64-release: + steps: + - checkout + - run: + command: |- + # install jdk + curl -Lf \ + https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_mac_hotspot_21.0.5_11.tar.gz -o /tmp/jdk.tar.gz + + mkdir $HOME/jdk \ + && cd $HOME/jdk \ + && cat /tmp/jdk.tar.gz | tar --strip-components=1 -xzC . + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true libpkl:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - libpkl/build/native-libs/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /Users/distiller/jdk/Contents/Home + resource_class: m2pro.large + macos: + xcode: 15.3.0 + libpkl-linux-aarch64-release: + steps: + - checkout + - restore_cache: + key: staticdeps-aarch64 + name: Restore static deps from cache + - run: + command: |- + 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/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_aarch64_linux_hotspot_21.0.5_11.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/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/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz + + mkdir -p /tmp/dep_zlib-1.2.13 \ + && cd /tmp/dep_zlib-1.2.13 \ + && cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC . \ + && echo "zlib-1.2.13: configure..." && ./configure --static --prefix="$HOME"/staticdeps > /dev/null \ + && echo "zlib-1.2.13: make..." && make -s -j4 \ + && echo "zlib-1.2.13: make install..." && make -s install \ + && rm -rf /tmp/dep_zlib-1.2.13 + fi + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - save_cache: + paths: + - ~/staticdeps + key: staticdeps-aarch64 + name: Save statics deps to cache + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true libpkl:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - libpkl/build/native-libs/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: arm.xlarge + docker: + - image: arm64v8/oraclelinux:8-slim + libpkl-linux-alpine-amd64-release: + steps: + - checkout + - restore_cache: + key: staticdeps-amd64 + name: Restore static deps from cache + - run: + command: |- + 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/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_linux_hotspot_21.0.5_11.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/x86_64-redhat-linux/8/libstdc++.a ~/staticdeps + + # install zlib + if [[ ! -f ~/staticdeps/include/zlib.h ]]; then + curl -Lf https://github.com/madler/zlib/releases/download/v1.2.13/zlib-1.2.13.tar.gz -o /tmp/zlib.tar.gz + + mkdir -p /tmp/dep_zlib-1.2.13 \ + && cd /tmp/dep_zlib-1.2.13 \ + && cat /tmp/zlib.tar.gz | tar --strip-components=1 -xzC . \ + && echo "zlib-1.2.13: configure..." && ./configure --static --prefix="$HOME"/staticdeps > /dev/null \ + && echo "zlib-1.2.13: make..." && make -s -j4 \ + && echo "zlib-1.2.13: make install..." && make -s install \ + && rm -rf /tmp/dep_zlib-1.2.13 + fi + + # install musl + if [[ ! -f ~/staticdeps/bin/x86_64-linux-musl-gcc ]]; then + curl -Lf https://musl.libc.org/releases/musl-1.2.2.tar.gz -o /tmp/musl.tar.gz + + mkdir -p /tmp/dep_musl-1.2.2 \ + && cd /tmp/dep_musl-1.2.2 \ + && cat /tmp/musl.tar.gz | tar --strip-components=1 -xzC . \ + && echo "musl-1.2.2: configure..." && ./configure --disable-shared --prefix="$HOME"/staticdeps > /dev/null \ + && echo "musl-1.2.2: make..." && make -s -j4 \ + && echo "musl-1.2.2: make install..." && make -s install \ + && rm -rf /tmp/dep_musl-1.2.2 + + # native-image expects to find an executable at this path. + ln -s ~/staticdeps/bin/musl-gcc ~/staticdeps/bin/x86_64-linux-musl-gcc + fi + name: Set up environment + shell: '#!/bin/bash -exo pipefail' + - save_cache: + paths: + - ~/staticdeps + key: staticdeps-amd64 + name: Save statics deps to cache - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-cli:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.musl=true libpkl:buildNative + name: gradle buildNative + - persist_to_workspace: + root: '.' + paths: + - libpkl/build/native-libs/ + - store_test_results: + path: ~/test-results + environment: + LANG: en_US.UTF-8 + JAVA_HOME: /jdk + resource_class: xlarge + docker: + - image: oraclelinux:8-slim + libpkl-windows-amd64-release: + steps: + - checkout + - run: + command: |- + # install jdk + curl -Lf \ + https://github.com/adoptium/temurin21-binaries/releases/download/jdk-21.0.5%2B11/OpenJDK21U-jdk_x64_windows_hotspot_21.0.5_11.zip -o /tmp/jdk.zip + + unzip /tmp/jdk.zip -d /tmp/jdk \ + && cd /tmp/jdk/jdk-* \ + && mkdir /jdk \ + && cp -r . /jdk + name: Set up environment + shell: bash.exe + - run: + command: choco install mingw + name: Installing mingw + - run: + command: |- + export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true libpkl:buildNative name: gradle buildNative shell: bash.exe - persist_to_workspace: root: '.' paths: - - pkl-cli/build/executable/ + - libpkl/build/native-libs/ - store_test_results: path: ~/test-results environment: @@ -316,7 +969,7 @@ jobs: resource_class: windows.large machine: image: windows-server-2022-gui:current - pkl-doc-macOS-amd64-release: + pkl-cli-macOS-amd64-snapshot: steps: - checkout - run: @@ -336,12 +989,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.targetArch=amd64 pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - pkl-cli/build/executable/ - store_test_results: path: ~/test-results environment: @@ -350,7 +1004,7 @@ jobs: resource_class: m2pro.large macos: xcode: 15.3.0 - pkl-doc-linux-amd64-release: + pkl-cli-linux-amd64-snapshot: steps: - checkout - restore_cache: @@ -413,12 +1067,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - pkl-cli/build/executable/ - store_test_results: path: ~/test-results environment: @@ -427,7 +1082,7 @@ jobs: resource_class: xlarge docker: - image: oraclelinux:8-slim - pkl-doc-macOS-aarch64-release: + pkl-cli-macOS-aarch64-snapshot: steps: - checkout - run: @@ -444,12 +1099,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - pkl-cli/build/executable/ - store_test_results: path: ~/test-results environment: @@ -458,7 +1114,7 @@ jobs: resource_class: m2pro.large macos: xcode: 15.3.0 - pkl-doc-linux-aarch64-release: + pkl-cli-linux-aarch64-snapshot: steps: - checkout - restore_cache: @@ -505,12 +1161,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - pkl-cli/build/executable/ - store_test_results: path: ~/test-results environment: @@ -519,7 +1176,7 @@ jobs: resource_class: arm.xlarge docker: - image: arm64v8/oraclelinux:8-slim - pkl-doc-linux-alpine-amd64-release: + pkl-cli-linux-alpine-amd64-snapshot: steps: - checkout - restore_cache: @@ -582,12 +1239,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true -Dpkl.musl=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - pkl-cli/build/executable/ - store_test_results: path: ~/test-results environment: @@ -596,7 +1254,7 @@ jobs: resource_class: xlarge docker: - image: oraclelinux:8-slim - pkl-doc-windows-amd64-release: + pkl-cli-windows-amd64-snapshot: steps: - checkout - run: @@ -611,16 +1269,20 @@ jobs: && cp -r . /jdk name: Set up environment shell: bash.exe + - run: + command: choco install mingw + name: Installing mingw - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -DreleaseBuild=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative name: gradle buildNative shell: bash.exe - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - pkl-cli/build/executable/ - store_test_results: path: ~/test-results environment: @@ -629,7 +1291,7 @@ jobs: resource_class: windows.large machine: image: windows-server-2022-gui:current - pkl-cli-macOS-amd64-snapshot: + pkl-doc-macOS-amd64-snapshot: steps: - checkout - run: @@ -649,12 +1311,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 pkl-cli:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 pkl-doc:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-cli/build/executable/ + - pkl-doc/build/executable/ - store_test_results: path: ~/test-results environment: @@ -663,7 +1326,7 @@ jobs: resource_class: m2pro.large macos: xcode: 15.3.0 - pkl-cli-linux-amd64-snapshot: + pkl-doc-linux-amd64-snapshot: steps: - checkout - restore_cache: @@ -726,12 +1389,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-cli/build/executable/ + - pkl-doc/build/executable/ - store_test_results: path: ~/test-results environment: @@ -740,7 +1404,7 @@ jobs: resource_class: xlarge docker: - image: oraclelinux:8-slim - pkl-cli-macOS-aarch64-snapshot: + pkl-doc-macOS-aarch64-snapshot: steps: - checkout - run: @@ -757,12 +1421,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-cli/build/executable/ + - pkl-doc/build/executable/ - store_test_results: path: ~/test-results environment: @@ -771,7 +1436,7 @@ jobs: resource_class: m2pro.large macos: xcode: 15.3.0 - pkl-cli-linux-aarch64-snapshot: + pkl-doc-linux-aarch64-snapshot: steps: - checkout - restore_cache: @@ -818,12 +1483,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-cli/build/executable/ + - pkl-doc/build/executable/ - store_test_results: path: ~/test-results environment: @@ -832,7 +1498,7 @@ jobs: resource_class: arm.xlarge docker: - image: arm64v8/oraclelinux:8-slim - pkl-cli-linux-alpine-amd64-snapshot: + pkl-doc-linux-alpine-amd64-snapshot: steps: - checkout - restore_cache: @@ -895,12 +1561,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-cli:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-cli/build/executable/ + - pkl-doc/build/executable/ - store_test_results: path: ~/test-results environment: @@ -909,7 +1576,7 @@ jobs: resource_class: xlarge docker: - image: oraclelinux:8-slim - pkl-cli-windows-amd64-snapshot: + pkl-doc-windows-amd64-snapshot: steps: - checkout - run: @@ -924,16 +1591,20 @@ jobs: && cp -r . /jdk name: Set up environment shell: bash.exe + - run: + command: choco install mingw + name: Installing mingw - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-cli:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative name: gradle buildNative shell: bash.exe - persist_to_workspace: root: '.' paths: - - pkl-cli/build/executable/ + - pkl-doc/build/executable/ - store_test_results: path: ~/test-results environment: @@ -942,7 +1613,7 @@ jobs: resource_class: windows.large machine: image: windows-server-2022-gui:current - pkl-doc-macOS-amd64-snapshot: + libpkl-macOS-amd64-snapshot: steps: - checkout - run: @@ -962,12 +1633,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.targetArch=amd64 libpkl:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - libpkl/build/native-libs/ - store_test_results: path: ~/test-results environment: @@ -976,7 +1648,7 @@ jobs: resource_class: m2pro.large macos: xcode: 15.3.0 - pkl-doc-linux-amd64-snapshot: + libpkl-linux-amd64-snapshot: steps: - checkout - restore_cache: @@ -1039,12 +1711,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true libpkl:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - libpkl/build/native-libs/ - store_test_results: path: ~/test-results environment: @@ -1053,7 +1726,7 @@ jobs: resource_class: xlarge docker: - image: oraclelinux:8-slim - pkl-doc-macOS-aarch64-snapshot: + libpkl-macOS-aarch64-snapshot: steps: - checkout - run: @@ -1070,12 +1743,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true libpkl:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - libpkl/build/native-libs/ - store_test_results: path: ~/test-results environment: @@ -1084,7 +1758,7 @@ jobs: resource_class: m2pro.large macos: xcode: 15.3.0 - pkl-doc-linux-aarch64-snapshot: + libpkl-linux-aarch64-snapshot: steps: - checkout - restore_cache: @@ -1131,12 +1805,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true libpkl:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - libpkl/build/native-libs/ - store_test_results: path: ~/test-results environment: @@ -1145,7 +1820,7 @@ jobs: resource_class: arm.xlarge docker: - image: arm64v8/oraclelinux:8-slim - pkl-doc-linux-alpine-amd64-snapshot: + libpkl-linux-alpine-amd64-snapshot: steps: - checkout - restore_cache: @@ -1208,12 +1883,13 @@ jobs: - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.musl=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true -Dpkl.musl=true libpkl:buildNative name: gradle buildNative - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - libpkl/build/native-libs/ - store_test_results: path: ~/test-results environment: @@ -1222,7 +1898,7 @@ jobs: resource_class: xlarge docker: - image: oraclelinux:8-slim - pkl-doc-windows-amd64-snapshot: + libpkl-windows-amd64-snapshot: steps: - checkout - run: @@ -1237,16 +1913,20 @@ jobs: && cp -r . /jdk name: Set up environment shell: bash.exe + - run: + command: choco install mingw + name: Installing mingw - run: command: |- export PATH=~/staticdeps/bin:$PATH - ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true pkl-doc:buildNative + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH + ./gradlew --info --stacktrace -DtestReportsDir=${HOME}/test-results -DpklMultiJdkTesting=true libpkl:buildNative name: gradle buildNative shell: bash.exe - persist_to_workspace: root: '.' paths: - - pkl-doc/build/executable/ + - libpkl/build/native-libs/ - store_test_results: path: ~/test-results environment: @@ -1417,6 +2097,24 @@ workflows: - gradle-check-windows: requires: - hold + - libpkl-macOS-amd64-snapshot: + requires: + - hold + - libpkl-linux-amd64-snapshot: + requires: + - hold + - libpkl-macOS-aarch64-snapshot: + requires: + - hold + - libpkl-linux-aarch64-snapshot: + requires: + - hold + - libpkl-linux-alpine-amd64-snapshot: + requires: + - hold + - libpkl-windows-amd64-snapshot: + requires: + - hold when: matches: value: << pipeline.git.branch >> @@ -1425,6 +2123,12 @@ workflows: jobs: - gradle-check - gradle-check-windows + - libpkl-macOS-amd64-snapshot + - libpkl-linux-amd64-snapshot + - libpkl-macOS-aarch64-snapshot + - libpkl-linux-aarch64-snapshot + - libpkl-linux-alpine-amd64-snapshot + - libpkl-windows-amd64-snapshot - bench - gradle-compatibility - pkl-cli-macOS-amd64-snapshot @@ -1439,10 +2143,22 @@ workflows: - pkl-doc-linux-aarch64-snapshot - pkl-doc-linux-alpine-amd64-snapshot - pkl-doc-windows-amd64-snapshot + - libpkl-macOS-amd64-snapshot + - libpkl-linux-amd64-snapshot + - libpkl-macOS-aarch64-snapshot + - libpkl-linux-aarch64-snapshot + - libpkl-linux-alpine-amd64-snapshot + - libpkl-windows-amd64-snapshot - deploy-snapshot: requires: - gradle-check - gradle-check-windows + - libpkl-macOS-amd64-snapshot + - libpkl-linux-amd64-snapshot + - libpkl-macOS-aarch64-snapshot + - libpkl-linux-aarch64-snapshot + - libpkl-linux-alpine-amd64-snapshot + - libpkl-windows-amd64-snapshot - bench - gradle-compatibility - pkl-cli-macOS-amd64-snapshot @@ -1457,6 +2173,12 @@ workflows: - pkl-doc-linux-aarch64-snapshot - pkl-doc-linux-alpine-amd64-snapshot - pkl-doc-windows-amd64-snapshot + - libpkl-macOS-amd64-snapshot + - libpkl-linux-amd64-snapshot + - libpkl-macOS-aarch64-snapshot + - libpkl-linux-aarch64-snapshot + - libpkl-linux-alpine-amd64-snapshot + - libpkl-windows-amd64-snapshot context: pkl-maven-release - trigger-docsite-build: requires: @@ -1481,6 +2203,42 @@ workflows: ignore: /.*/ tags: only: /^v?\d+\.\d+\.\d+$/ + - libpkl-macOS-amd64-snapshot: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-linux-amd64-snapshot: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-macOS-aarch64-snapshot: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-linux-aarch64-snapshot: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-linux-alpine-amd64-snapshot: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-windows-amd64-snapshot: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ - bench: filters: branches: @@ -1565,10 +2323,52 @@ workflows: ignore: /.*/ tags: only: /^v?\d+\.\d+\.\d+$/ + - libpkl-macOS-amd64-release: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-linux-amd64-release: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-macOS-aarch64-release: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-linux-aarch64-release: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-linux-alpine-amd64-release: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ + - libpkl-windows-amd64-release: + filters: + branches: + ignore: /.*/ + tags: + only: /^v?\d+\.\d+\.\d+$/ - github-release: requires: - gradle-check - gradle-check-windows + - libpkl-macOS-amd64-snapshot + - libpkl-linux-amd64-snapshot + - libpkl-macOS-aarch64-snapshot + - libpkl-linux-aarch64-snapshot + - libpkl-linux-alpine-amd64-snapshot + - libpkl-windows-amd64-snapshot - bench - gradle-compatibility - pkl-cli-macOS-amd64-release @@ -1583,6 +2383,12 @@ workflows: - pkl-doc-linux-aarch64-release - pkl-doc-linux-alpine-amd64-release - pkl-doc-windows-amd64-release + - libpkl-macOS-amd64-release + - libpkl-linux-amd64-release + - libpkl-macOS-aarch64-release + - libpkl-linux-aarch64-release + - libpkl-linux-alpine-amd64-release + - libpkl-windows-amd64-release context: pkl-github-release filters: branches: @@ -1612,6 +2418,12 @@ workflows: jobs: - gradle-check - gradle-check-windows + - libpkl-macOS-amd64-snapshot + - libpkl-linux-amd64-snapshot + - libpkl-macOS-aarch64-snapshot + - libpkl-linux-aarch64-snapshot + - libpkl-linux-alpine-amd64-snapshot + - libpkl-windows-amd64-snapshot - bench - gradle-compatibility - pkl-cli-macOS-amd64-release @@ -1626,6 +2438,12 @@ workflows: - pkl-doc-linux-aarch64-release - pkl-doc-linux-alpine-amd64-release - pkl-doc-windows-amd64-release + - libpkl-macOS-amd64-release + - libpkl-linux-amd64-release + - libpkl-macOS-aarch64-release + - libpkl-linux-aarch64-release + - libpkl-linux-alpine-amd64-release + - libpkl-windows-amd64-release when: matches: value: << pipeline.git.branch >> diff --git a/.circleci/jobs/BuildNativeJob.pkl b/.circleci/jobs/BuildNativeJob.pkl index 83a7ff4cc..ec5b5ffcf 100644 --- a/.circleci/jobs/BuildNativeJob.pkl +++ b/.circleci/jobs/BuildNativeJob.pkl @@ -29,6 +29,9 @@ project: String javaVersion = "21.0" +/// The build directory that artifacts are written to +buildDir: String + extraGradleArgs { when (os == "macOS" && arch == "amd64") { "-Dpkl.targetArch=\(arch)" @@ -150,6 +153,14 @@ steps { } setupMacEnvironment } + when (os == "windows") { + new Config.RunStep { + name = "Installing mingw" + command = """ + choco install mingw + """ + } + } new Config.RunStep { name = "gradle buildNative" when (module.os == "windows") { @@ -158,13 +169,14 @@ steps { command = #""" export PATH=~/staticdeps/bin:$PATH + export PATH=/c/ProgramData/mingw64/mingw64/bin:$PATH ./gradlew \#(module.gradleArgs) \#(project):buildNative """# } new Config.PersistToWorkspaceStep { root = "." paths { - "\(project)/build/executable/" + buildDir } } } diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml index d723e4a15..ae601cd4e 100644 --- a/.idea/inspectionProfiles/Project_Default.xml +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -68,10 +68,13 @@