diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml index 803f53cb9..cf57817ca 100644 --- a/.github/workflows/continuous.yml +++ b/.github/workflows/continuous.yml @@ -45,6 +45,8 @@ jobs: if: ${{ matrix.format }} run: ./gradlew verifyPython - name: Build with Gradle + env: + DJL_COMPILE_JAVA: "true" run: ./gradlew --refresh-dependencies build :jacoco:testCodeCoverageReport --stacktrace - name: Upload test results uses: actions/upload-artifact@v7 diff --git a/.github/workflows/optimization_integration.yml b/.github/workflows/optimization_integration.yml index c21a659ad..8236bcf0d 100644 --- a/.github/workflows/optimization_integration.yml +++ b/.github/workflows/optimization_integration.yml @@ -175,7 +175,7 @@ jobs: IMAGE_REPO: ${{ inputs.image-repo }} CONTAINER: "lmi" run: | - SERVING_VERSION=${TEST_SERVING_VERSION:-"0.36.0"} + SERVING_VERSION=${TEST_SERVING_VERSION:-"0.38.0"} SERVING_VERSION=$(echo $SERVING_VERSION | xargs) # trim whitespace if [ -n "$OVERRIDE_TEST_CONTAINER" ]; then diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7c354e8b4..8b92e1f37 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -2,8 +2,8 @@ format.version = "1.1" [versions] -djl = "0.36.0" -serving = "0.36.0" +djl = "0.38.0" +serving = "0.38.0" onnxruntime = "1.20.0" commonsCli = "1.9.0" commonsCodec = "1.18.0" diff --git a/serving/src/test/java/ai/djl/serving/WorkflowTest.java b/serving/src/test/java/ai/djl/serving/WorkflowTest.java index 5d070a4f4..1410ad75e 100644 --- a/serving/src/test/java/ai/djl/serving/WorkflowTest.java +++ b/serving/src/test/java/ai/djl/serving/WorkflowTest.java @@ -24,6 +24,7 @@ import org.apache.commons.cli.CommandLine; import org.testng.Assert; +import org.testng.SkipException; import org.testng.annotations.BeforeSuite; import org.testng.annotations.Test; @@ -70,6 +71,15 @@ public void testCriteria() throws IOException, BadWorkflowException { @Test public void testFunctions() throws IOException, BadWorkflowException { + // functions.json declares a custom WorkflowFunction that ships as a bundled .java source + // under workflows/libs/classes, so this test needs DJL to compile it at load time. That + // is opt-in as of DJL 0.37.0, so skip unless the opt-in is set. + boolean envOptIn = Boolean.parseBoolean(Utils.getenv("DJL_COMPILE_JAVA", "false")); + boolean propOptIn = + Boolean.parseBoolean(System.getProperty("ai.djl.compile_java", "false")); + if (!envOptIn && !propOptIn) { + throw new SkipException("Java compilation is disabled"); + } Path workflowFile = Paths.get("src/test/resources/workflows/functions.json"); runWorkflow(workflowFile, zeroInput); }