Skip to content

Commit f2b3d5a

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

File tree

1 file changed

+60
-6
lines changed

1 file changed

+60
-6
lines changed

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

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,78 @@ 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 vs Maven Central) ==="
134+
135+
# 1. Check what's in local Maven repository
136+
echo "1. Local Maven repository contents:"
137+
ls -la ~/.m2/repository/io/github/beehive-lab/gpu-llama3/0.3.3/
138+
echo "Local jar timestamp: $(stat -c %y ~/.m2/repository/io/github/beehive-lab/gpu-llama3/0.3.3/gpu-llama3-0.3.3.jar)"
139+
140+
# 2. Check resolved dependency source
141+
echo "2. Maven dependency resolution with verbose source info:"
142+
mvn dependency:tree -pl model-providers/gpu-llama3/runtime -Dverbose | grep gpu-llama3
143+
144+
# 3. Most importantly - check if Maven attempts any downloads
145+
echo "3. Building with network monitoring (to catch any downloads):"
146+
147+
# Clean the specific dependency and rebuild to see if it downloads
148+
rm -rf ~/.m2/repository/io/github/beehive-lab/gpu-llama3/0.3.3/gpu-llama3-0.3.3.jar
149+
150+
# Monitor for downloads during compilation
151+
mvn compile -pl model-providers/gpu-llama3/runtime -X 2>&1 | grep -E "(Downloading|Downloaded|gpu-llama3)" || echo "No downloads detected - using local build"
152+
153+
# 4. Verify the jar is still our local build
154+
echo "4. Final verification - jar restored from where?"
155+
ls -la ~/.m2/repository/io/github/beehive-lab/gpu-llama3/0.3.3/gpu-llama3-0.3.3.jar
156+
echo "Restored jar timestamp: $(stat -c %y ~/.m2/repository/io/github/beehive-lab/gpu-llama3/0.3.3/gpu-llama3-0.3.3.jar)"
157+
158+
# Step 5: Start Quarkus Application and Wait for Startup
105159
- name: Start Quarkus Application and Wait for Startup
106160
run: |
107161
cd ${{ github.workspace }}/quarkus-langchain4j/integration-tests/gpu-llama3
@@ -143,7 +197,7 @@ jobs:
143197
fi
144198
done
145199
146-
# Step 5: Run test 1
200+
# Step 6: Run test 1
147201
- name: Trigger Blocking Endpoint
148202
run: |
149203
# Trigger endpoint
@@ -160,7 +214,7 @@ jobs:
160214
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
161215
fi
162216
163-
# Step 6: Run test 2
217+
# Step 7: Run test 2
164218
- name: Trigger Streaming Endpoint
165219
run: |
166220
# Trigger endpoint
@@ -177,7 +231,7 @@ jobs:
177231
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
178232
fi
179233
180-
# Step 7: Cleanup & Shutdown
234+
# Step 8: Cleanup & Shutdown
181235
- name: Cleanup & Shutdown
182236
run: |
183237
# Clean shutdown

0 commit comments

Comments
 (0)