Skip to content

Commit 08bda21

Browse files
Add GPULlama3 build and versioning step to Quarkus-LangChain4j workflow
1 parent 1e9f7a7 commit 08bda21

1 file changed

Lines changed: 26 additions & 6 deletions

File tree

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

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,44 @@ 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+
./mvnw clean package -DskipTests
95+
96+
# Extract the version
97+
GPULLAMA3_VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)
98+
echo "GPULlama3 version: $GPULLAMA3_VERSION"
99+
100+
# Save GPULlama3.java version for subsequent steps
101+
echo "GPULLAMA3_VERSION=$GPULLAMA3_VERSION" >> $GITHUB_ENV
102+
103+
# Step 3: Clone Quarkus LangChain4j
88104
- name: Clone Quarkus LangChain4j
89105
run: |
90106
cd ${{ github.workspace }}
91107
git clone https://github.com/quarkiverse/quarkus-langchain4j.git
92108
93-
# Step 3: Build Quarkus LangChain4j
109+
# Step 4: Build Quarkus LangChain4j with current GPULlama3.java
94110
- name: Build Quarkus LangChain4j
95111
run: |
96112
cd ${{ github.workspace }}/quarkus-langchain4j
97113
export PATH="$TORNADOVM_HOME/bin:$JAVA_HOME/bin:$PATH"
98114
115+
# Update the GPULlama3 version used by quarkus-langchain4j
116+
RUNTIME_POM="model-providers/gpu-llama3/runtime/pom.xml"
117+
sed -i 's/<version>${gpu-llama3.version}<\/version>/<version>'$GPULLAMA3_VERSION'<\/version>/' "$RUNTIME_POM"
118+
99119
# Use reactor to build *only *GPULlama3 integration test + dependencies
100120
# This recompiles everything with the same Java version, avoiding compatibility issues
101121
# The -Dtornado flag activates the TornadoVM profile which includes gpu-llama3 module
102122
mvn clean install -pl integration-tests/gpu-llama3 -am -DskipTests -Dtornado
103123
104-
# Step 4: Start Quarkus Application and Wait for Startup
124+
# Step 5: Start Quarkus Application and Wait for Startup
105125
- name: Start Quarkus Application and Wait for Startup
106126
run: |
107127
cd ${{ github.workspace }}/quarkus-langchain4j/integration-tests/gpu-llama3
@@ -143,7 +163,7 @@ jobs:
143163
fi
144164
done
145165
146-
# Step 5: Run test 1
166+
# Step 6: Run test 1
147167
- name: Trigger Blocking Endpoint
148168
run: |
149169
# Trigger endpoint
@@ -160,7 +180,7 @@ jobs:
160180
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
161181
fi
162182
163-
# Step 6: Run test 2
183+
# Step 7: Run test 2
164184
- name: Trigger Streaming Endpoint
165185
run: |
166186
# Trigger endpoint
@@ -177,7 +197,7 @@ jobs:
177197
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
178198
fi
179199
180-
# Step 7: Cleanup & Shutdown
200+
# Step 8: Cleanup & Shutdown
181201
- name: Cleanup & Shutdown
182202
run: |
183203
# Clean shutdown

0 commit comments

Comments
 (0)