Skip to content

Commit b4ad5ec

Browse files
authored
ci: temporarily using native-maven-plugin 0.9.11 for testing (#915)
ci: temporarily using native-maven-plugin 0.9.11 for testing
1 parent c536dd6 commit b4ad5ec

File tree

2 files changed

+66
-4
lines changed

2 files changed

+66
-4
lines changed

.kokoro/build.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@ integration)
7070
RETURN_CODE=$?
7171
;;
7272
graalvm)
73-
# Run Unit and Integration Tests with Native Image
74-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test "-Dtest=com.google.cloud.spanner.jdbc.it.**"
73+
# Run Unit and Integration Tests with Native Image. Use native-maven-plugin until https://github.com/graalvm/native-build-tools/issues/279 is fixed.
74+
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative-0.9.11 -Penable-integration-tests test "-Dtest=com.google.cloud.spanner.jdbc.it.**"
7575
RETURN_CODE=$?
7676
;;
7777
graalvm17)
78-
# Run Unit and Integration Tests with Native Image
79-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test "-Dtest=com.google.cloud.spanner.jdbc.it.**"
78+
# Run Unit and Integration Tests with Native Image. Use native-maven-plugin 0.9.11 until https://github.com/graalvm/native-build-tools/issues/279 is fixed.
79+
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative-0.9.11 -Penable-integration-tests test "-Dtest=com.google.cloud.spanner.jdbc.it.**"
8080
RETURN_CODE=$?
8181
;;
8282
samples)

pom.xml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,68 @@
349349
</build>
350350

351351
<profiles>
352+
<profile>
353+
<id>native-0.9.11</id>
354+
355+
<dependencies>
356+
357+
<dependency>
358+
<groupId>org.junit.vintage</groupId>
359+
<artifactId>junit-vintage-engine</artifactId>
360+
<version>5.8.2</version>
361+
<scope>test</scope>
362+
</dependency>
363+
364+
<dependency>
365+
<groupId>org.graalvm.buildtools</groupId>
366+
<artifactId>junit-platform-native</artifactId>
367+
<version>0.9.11</version>
368+
<scope>test</scope>
369+
</dependency>
370+
</dependencies>
371+
372+
<build>
373+
<plugins>
374+
<plugin>
375+
<groupId>org.apache.maven.plugins</groupId>
376+
<artifactId>maven-surefire-plugin</artifactId>
377+
<!-- Must use older version of surefire plugin for native-image testing. -->
378+
<version>2.22.2</version>
379+
<configuration>
380+
<!-- Include all tests during native image testing. -->
381+
<excludes combine.self="override" />
382+
<includes>
383+
<include>**/IT*.java</include>
384+
<!-- Enable unit tests in generated libraries for native image testing. -->
385+
<include>**/*ClientTest.java</include>
386+
</includes>
387+
</configuration>
388+
</plugin>
389+
390+
<plugin>
391+
<groupId>org.graalvm.buildtools</groupId>
392+
<artifactId>native-maven-plugin</artifactId>
393+
<version>0.9.11</version>
394+
<extensions>true</extensions>
395+
<executions>
396+
<execution>
397+
<id>test-native</id>
398+
<goals>
399+
<goal>test</goal>
400+
</goals>
401+
<phase>test</phase>
402+
</execution>
403+
</executions>
404+
<configuration>
405+
<buildArgs>
406+
<buildArg>--no-fallback</buildArg>
407+
</buildArgs>
408+
</configuration>
409+
</plugin>
410+
</plugins>
411+
</build>
412+
</profile>
413+
352414
<profile>
353415
<id>shade</id>
354416
<build>

0 commit comments

Comments
 (0)