Skip to content

Commit e970c6e

Browse files
Add GPULlama3 build and versioning step to Quarkus-LangChain4j workflow
1 parent 52b6979 commit e970c6e

File tree

1 file changed

+69
-6
lines changed

1 file changed

+69
-6
lines changed

.github/workflows/integration-quarkus-langchain4j.yml

Lines changed: 69 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,87 @@ jobs:
8484
which tornado || { echo "::error::tornado not in PATH"; exit 1; }
8585
tornado --devices
8686
87-
# Step 2: Clone Quarkus LangChain4j
87+
# Step 2: Build GPULlama3.java
88+
- name: Build GPULlama3.java
89+
run: |
90+
cd ${{ github.workspace }}
91+
echo "Using TORNADOVM_HOME=$TORNADOVM_HOME"
92+
export PATH="$TORNADOVM_HOME/bin:$JAVA_HOME/bin:$PATH"
93+
tornado --version
94+
95+
# Append SNAPSHOT to GPULlama3 version
96+
GPULLAMA3_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
97+
GPULLAMA3_VERSION="${GPULLAMA3_VERSION}-SNAPSHOT"
98+
echo "GPULlama3 version: $GPULLAMA3_VERSION"
99+
./mvnw versions:set -DnewVersion=$GPULLAMA3_VERSION
100+
101+
# Build
102+
./mvnw clean install -DskipTests
103+
104+
# Save GPULlama3.java version for subsequent steps
105+
echo "GPULLAMA3_VERSION=$GPULLAMA3_VERSION" >> $GITHUB_ENV
106+
107+
# Step 3: Clone Quarkus LangChain4j
88108
- name: Clone Quarkus LangChain4j
89109
run: |
90110
cd ${{ github.workspace }}
91111
git clone https://github.com/quarkiverse/quarkus-langchain4j.git
92112
93-
# Step 3: Build Quarkus LangChain4j
113+
# Step 4: Build Quarkus LangChain4j with current GPULlama3.java
94114
- name: Build Quarkus LangChain4j
95115
run: |
96116
cd ${{ github.workspace }}/quarkus-langchain4j
97117
export PATH="$TORNADOVM_HOME/bin:$JAVA_HOME/bin:$PATH"
98118
119+
# Update the GPULlama3 version used by quarkus-langchain4j
120+
RUNTIME_POM="model-providers/gpu-llama3/runtime/pom.xml"
121+
sed -i 's/<version>${gpu-llama3.version}<\/version>/<version>'$GPULLAMA3_VERSION'<\/version>/' "$RUNTIME_POM"
122+
99123
# Use reactor to build *only *GPULlama3 integration test + dependencies
100124
# This recompiles everything with the same Java version, avoiding compatibility issues
101125
# The -Dtornado flag activates the TornadoVM profile which includes gpu-llama3 module
102126
mvn clean install -pl integration-tests/gpu-llama3 -am -DskipTests -Dtornado
103127
104-
# Step 4: Start Quarkus Application and Wait for Startup
128+
# Step 4.5: Verify Local GPULlama3 Usage (Not Maven Central)
129+
- name: Verify Local GPULlama3 Usage
130+
run: |
131+
cd ${{ github.workspace }}/quarkus-langchain4j
132+
133+
echo "=== Verifying GPULlama3 source (Local SNAPSHOT vs Maven Central) ==="
134+
echo "Using GPULlama3 version: $GPULLAMA3_VERSION"
135+
136+
# 1. Check what's in local Maven repository
137+
echo "1. Local Maven repository contents:"
138+
LOCAL_DIR="$HOME/.m2/repository/io/github/beehive-lab/gpu-llama3/${GPULLAMA3_VERSION}"
139+
if [ -d "$LOCAL_DIR" ]; then
140+
ls -la "$LOCAL_DIR/"
141+
if [ -f "$LOCAL_DIR/gpu-llama3-${GPULLAMA3_VERSION}.jar" ]; then
142+
echo "Local jar timestamp: $(stat -c %y $LOCAL_DIR/gpu-llama3-${GPULLAMA3_VERSION}.jar)"
143+
fi
144+
else
145+
echo "ERROR: Local directory not found: $LOCAL_DIR"
146+
exit 1
147+
fi
148+
149+
# 2. Check resolved dependency source
150+
echo "2. Maven dependency resolution:"
151+
mvn dependency:tree -pl model-providers/gpu-llama3/runtime | grep gpu-llama3
152+
153+
# 3. Verify no downloads from Maven Central
154+
echo "3. Verifying SNAPSHOT builds don't trigger Maven Central downloads:"
155+
echo "✅ SNAPSHOT versions are never downloaded from Maven Central (only from snapshot repositories)"
156+
157+
# 4. Confirm the artifact is present and being used
158+
echo "4. Final verification - local artifact exists and is being used:"
159+
if [ -f "$LOCAL_DIR/gpu-llama3-${GPULLAMA3_VERSION}.jar" ]; then
160+
echo "✅ SUCCESS: Using local SNAPSHOT build"
161+
ls -lh "$LOCAL_DIR/gpu-llama3-${GPULLAMA3_VERSION}.jar"
162+
else
163+
echo "❌ ERROR: Local artifact not found at $LOCAL_DIR/gpu-llama3-${GPULLAMA3_VERSION}.jar"
164+
exit 1
165+
fi
166+
167+
# Step 5: Start Quarkus Application and Wait for Startup
105168
- name: Start Quarkus Application and Wait for Startup
106169
run: |
107170
cd ${{ github.workspace }}/quarkus-langchain4j/integration-tests/gpu-llama3
@@ -143,7 +206,7 @@ jobs:
143206
fi
144207
done
145208
146-
# Step 5: Run test 1
209+
# Step 6: Run test 1
147210
- name: Trigger Blocking Endpoint
148211
run: |
149212
# Trigger endpoint
@@ -160,7 +223,7 @@ jobs:
160223
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
161224
fi
162225
163-
# Step 6: Run test 2
226+
# Step 7: Run test 2
164227
- name: Trigger Streaming Endpoint
165228
run: |
166229
# Trigger endpoint
@@ -177,7 +240,7 @@ jobs:
177240
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
178241
fi
179242
180-
# Step 7: Cleanup & Shutdown
243+
# Step 8: Cleanup & Shutdown
181244
- name: Cleanup & Shutdown
182245
run: |
183246
# Clean shutdown

0 commit comments

Comments
 (0)