diff --git a/.github/workflows/build-and-run.yml b/.github/workflows/build-and-run.yml index 46f0696d..bdbce5ff 100644 --- a/.github/workflows/build-and-run.yml +++ b/.github/workflows/build-and-run.yml @@ -78,7 +78,7 @@ jobs: # Export for current shell session export TORNADOVM_HOME="$FULL_SDK" export PATH="$FULL_SDK/bin:$JAVA_HOME/bin:$PATH" - + # Save for subsequent steps echo "TORNADOVM_HOME=$FULL_SDK" >> $GITHUB_ENV echo "PATH=$PATH" >> $GITHUB_ENV diff --git a/.github/workflows/deploy-maven-central.yml b/.github/workflows/deploy-maven-central.yml index d0714a8f..88bcee8e 100644 --- a/.github/workflows/deploy-maven-central.yml +++ b/.github/workflows/deploy-maven-central.yml @@ -22,12 +22,20 @@ on: jobs: deploy: - name: Deploy to Maven Central + name: Deploy to Maven Central (${{ matrix.jdk.name }}) if: github.repository == 'beehive-lab/GPULlama3.java' runs-on: [self-hosted, Linux, x64] timeout-minutes: 15 + strategy: + fail-fast: false # if one JDK fails, still attempt the other + matrix: + jdk: + - name: jdk21 + java_home: /opt/jenkins/jdks/graal-23.1.0/jdk-21.0.3 + - name: jdk25 + java_home: /opt/jenkins/jdks/jdk-25.0.2 env: - JAVA_HOME: /opt/jenkins/jdks/graal-23.1.0/jdk-21.0.3 + JAVA_HOME: ${{ matrix.jdk.java_home }} steps: - name: Checkout code @@ -98,13 +106,15 @@ jobs: - name: Deployment Summary if: ${{ !inputs.dry_run }} run: | - echo "## 🚀 Maven Central Deployment" >> $GITHUB_STEP_SUMMARY + DEPLOYED_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout 2>/dev/null) + echo "## 🚀 Maven Central Deployment (${{ matrix.jdk.name }})" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "| Detail | Value |" >> $GITHUB_STEP_SUMMARY echo "|--------|-------|" >> $GITHUB_STEP_SUMMARY - echo "| Version | ${{ steps.version.outputs.version }} |" >> $GITHUB_STEP_SUMMARY + echo "| JDK | ${{ matrix.jdk.name }} |" >> $GITHUB_STEP_SUMMARY + echo "| Version | ${DEPLOYED_VERSION} |" >> $GITHUB_STEP_SUMMARY echo "| GroupId | io.github.beehive-lab |" >> $GITHUB_STEP_SUMMARY echo "| ArtifactId | gpu-llama3 |" >> $GITHUB_STEP_SUMMARY echo "| Status | ✅ Deployed |" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY - echo "📍 [View on Maven Central](https://central.sonatype.com/artifact/io.github.beehive-lab/gpu-llama3/${{ steps.version.outputs.version }})" >> $GITHUB_STEP_SUMMARY \ No newline at end of file + echo "📍 [View on Maven Central](https://central.sonatype.com/artifact/io.github.beehive-lab/gpu-llama3/${DEPLOYED_VERSION})" >> $GITHUB_STEP_SUMMARY \ No newline at end of file diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index e199727b..3ff71f90 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -68,14 +68,17 @@ jobs: - name: Update Maven version run: | - ./mvnw versions:set -DnewVersion=${{ env.VERSION }} -DgenerateBackupPoms=false + # Update property directly; versions:set would overwrite + # the CI-friendly ${revision}${jdk.version.suffix} expression. + sed -i 's|.*|${{ env.VERSION }}|' pom.xml echo "✅ Maven version updated to ${{ env.VERSION }}" - name: Update README.md run: | if [ -f "README.md" ]; then - # Update version in Maven dependency example + # Update version in Maven dependency examples (handles plain X.Y.Z and X.Y.Z-jdkNN suffixes) sed -i 's|[0-9]\+\.[0-9]\+\.[0-9]\+|${{ env.VERSION }}|g' README.md + sed -i 's|[0-9]\+\.[0-9]\+\.[0-9]\+-jdk[0-9]\+|${{ env.VERSION }}-jdk25|g' README.md echo "✅ Updated README.md" fi diff --git a/.gitignore b/.gitignore index 6d41b627..c8532c71 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ pom.xml.versionsBackup pom.xml.next release.properties dependency-reduced-pom.xml +.flattened-pom.xml buildNumber.properties .mvn/timing.properties .mvn/wrapper/maven-wrapper.jar diff --git a/README.md b/README.md index 60229fcd..67ef681d 100644 --- a/README.md +++ b/README.md @@ -129,6 +129,7 @@ Despite being deprecated, OpenCL can still run on Apple Silicon; albeit, with ol You can add **GPULlama3.java** directly to your Maven project by including the following dependency in your `pom.xml`: +**JDK 21:** ```xml io.github.beehive-lab @@ -137,6 +138,15 @@ You can add **GPULlama3.java** directly to your Maven project by including the f ``` +**JDK 25:** +```xml + + io.github.beehive-lab + gpu-llama3 + 0.3.1-jdk25 + +``` + ## ☕ Integration with Your Java Codebase or Tools To integrate it into your codebase or IDE (e.g., IntelliJ) or custom build system (like IntelliJ, Maven, or Gradle), use the `--show-command` flag. diff --git a/pom.xml b/pom.xml index d61ecf3e..dff28bce 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ io.github.beehive-lab gpu-llama3 - 0.3.3 + ${revision}${jdk.version.suffix} GPU Llama3 GPU-accelerated LLaMA3 inference using TornadoVM @@ -37,6 +37,12 @@ + + 0.3.1 + + + 3.0.0 + 21 21 UTF-8 @@ -54,18 +60,21 @@ io.github.beehive-lab tornado-api - 2.2.0 + ${tornadovm.version} io.github.beehive-lab tornado-runtime - 2.2.0 + ${tornadovm.version} - + org.apache.maven.plugins maven-compiler-plugin @@ -73,12 +82,33 @@ --enable-preview - --add-modules - jdk.incubator.vector + + + org.codehaus.mojo + flatten-maven-plugin + 1.6.0 + + true + resolveCiFriendliesOnly + + + + flatten + process-resources + flatten + + + flatten.clean + clean + clean + + + + org.apache.maven.plugins @@ -103,6 +133,72 @@ + + + + jdk21 + [21,25) + + 21 + 21 + 3.0.0 + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + --add-modules + jdk.incubator.vector + + + + + + + + + + jdk25 + [25.0.2,) + + 25 + 25 + 3.0.0-jdk25 + -jdk25 + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + + --add-modules + jdk.incubator.vector + + + + + + + release @@ -126,20 +222,25 @@ - + org.apache.maven.plugins maven-javadoc-plugin 3.6.3 - 21 - 21 + ${maven.compiler.source} + ${maven.compiler.source} --enable-preview - --add-modules=jdk.incubator.vector + --add-modules + jdk.incubator.vector --enable-preview + --add-modules jdk.incubator.vector false false