Skip to content

Commit

Permalink
ci: add native profile for graalvm testing (#1143)
Browse files Browse the repository at this point in the history
* ci: add native profile for graalvm testing

* ci: native profile only in oauth2_http module with ITs

* ci: set env_vars for graalvm build

* ci: include functional tests in graalvm builds

* ci: generate native-config.json

* fix: add reflect-config.json

* ci: revert back to standard native build

* fix: include all original native-config.json entries

* fix: add --enable-url-protocols=https to native image config

* fix: add http to enabled protocols

* fix: rename reflect-config.json

* fix: remove test-specific classes

* fix: relocate reflect-config.json to META-INF/<groupId>/<artifactId>

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* fix: add back env_vars that owlbot removed

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* ci: add timestamps to graalvm builds

* fix: make owlbot ignore graalvm-native presubmit configs

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
burkedavison and gcf-owl-bot[bot] committed Feb 6, 2023
1 parent fad528e commit 9db93eb
Show file tree
Hide file tree
Showing 7 changed files with 898 additions and 12 deletions.
17 changes: 16 additions & 1 deletion .kokoro/presubmit/graalvm-native-17.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,19 @@ env_vars: {
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
}

env_vars: {
key: "GCS_BUCKET"
value: "byoid-it-bucket"
}

env_vars: {
key: "GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES"
value: "1"
}

env_vars: {
key: "GOOGLE_CLOUD_QUOTA_PROJECT"
value: "gcloud-devel"
}
16 changes: 16 additions & 0 deletions .kokoro/presubmit/graalvm-native.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,19 @@ env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}

env_vars: {
key: "GCS_BUCKET"
value: "byoid-it-bucket"
}

env_vars: {
key: "GOOGLE_EXTERNAL_ACCOUNT_ALLOW_EXECUTABLES"
value: "1"
}

env_vars: {
key: "GOOGLE_CLOUD_QUOTA_PROJECT"
value: "gcloud-devel"
}

72 changes: 70 additions & 2 deletions oauth2_http/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -19,8 +21,73 @@
</snapshotRepository>
</distributionManagement>

<profiles>
<profile>
<!-- This profile is used to enable GraalVM native image testing -->
<id>native</id>
<dependencies>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.9.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>junit-platform-native</artifactId>
<version>0.9.19</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<!-- Must use older version of surefire plugin for native-image testing. -->
<version>2.22.2</version>
<configuration>
<!-- Include all tests during native image testing. -->
<excludes combine.self="override"/>
<includes>
<include>**/IT*.java</include>
<include>**/functional/*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.graalvm.buildtools</groupId>
<artifactId>native-maven-plugin</artifactId>
<version>0.9.19</version>
<extensions>true</extensions>
<executions>
<execution>
<id>test-native</id>
<goals>
<goal>test</goal>
</goals>
<phase>test</phase>
</execution>
</executions>
<configuration>
<buildArgs>
<buildArg>--no-fallback</buildArg>
<buildArg>--no-server</buildArg>
</buildArgs>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

<build>
<sourceDirectory>java</sourceDirectory>
<resources>
<resource>
<directory>resources</directory>
</resource>
</resources>
<testSourceDirectory>javatests</testSourceDirectory>
<testResources>
<testResource>
Expand All @@ -44,7 +111,8 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<configuration>
<ignoredUnusedDeclaredDependencies>com.google.auto.value:auto-value</ignoredUnusedDeclaredDependencies>
<ignoredUnusedDeclaredDependencies>com.google.auto.value:auto-value
</ignoredUnusedDeclaredDependencies>
</configuration>
</plugin>
<plugin>
Expand Down
Loading

0 comments on commit 9db93eb

Please sign in to comment.