Skip to content

Commit d675b91

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

1 file changed

Lines changed: 30 additions & 6 deletions

File tree

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

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,24 +84,48 @@ 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 5: Start Quarkus Application and Wait for Startup
105129
- name: Start Quarkus Application and Wait for Startup
106130
run: |
107131
cd ${{ github.workspace }}/quarkus-langchain4j/integration-tests/gpu-llama3
@@ -143,7 +167,7 @@ jobs:
143167
fi
144168
done
145169
146-
# Step 5: Run test 1
170+
# Step 6: Run test 1
147171
- name: Trigger Blocking Endpoint
148172
run: |
149173
# Trigger endpoint
@@ -160,7 +184,7 @@ jobs:
160184
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
161185
fi
162186
163-
# Step 6: Run test 2
187+
# Step 7: Run test 2
164188
- name: Trigger Streaming Endpoint
165189
run: |
166190
# Trigger endpoint
@@ -177,7 +201,7 @@ jobs:
177201
echo "HTTP Response body: $HTTP_RESPONSE_BODY"
178202
fi
179203
180-
# Step 7: Cleanup & Shutdown
204+
# Step 8: Cleanup & Shutdown
181205
- name: Cleanup & Shutdown
182206
run: |
183207
# Clean shutdown

0 commit comments

Comments
 (0)