Skip to content
This repository has been archived by the owner on Sep 18, 2023. It is now read-only.

Commit

Permalink
feat: Introduce Native Image testing build script changes (#249)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/7661bbe8-b0e7-4dc7-b7bb-09db5a3f3b00/targets

- [ ] To automatically regenerate this PR, check this box. (May take up to 24 hours.)

Source-Link: googleapis/synthtool@d45942b
  • Loading branch information
yoshi-automation committed Nov 3, 2021
1 parent d8af58d commit c2fa55a
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .kokoro/build.sh
Expand Up @@ -69,6 +69,11 @@ integration)
verify
RETURN_CODE=$?
;;
graalvm)
# Run Unit and Integration Tests with Native Image
mvn test -Pnative -Penable-integration-tests
RETURN_CODE=$?
;;
samples)
SAMPLES_DIR=samples
# only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
Expand Down
33 changes: 33 additions & 0 deletions .kokoro/presubmit/graalvm-native.cfg
@@ -0,0 +1,33 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/graalvm"
}

env_vars: {
key: "JOB_TYPE"
value: "graalvm"
}

# TODO: remove this after we've migrated all tests and scripts
env_vars: {
key: "GCLOUD_PROJECT"
value: "gcloud-devel"
}

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

env_vars: {
key: "GOOGLE_APPLICATION_CREDENTIALS"
value: "secret_manager/java-it-service-account"
}

env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "java-it-service-account"
}
Expand Up @@ -319,10 +319,10 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getFieldBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_);
}
if (!getPathTemplateBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathTemplate_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pathTemplate_);
}
unknownFields.writeTo(output);
Expand All @@ -334,10 +334,10 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getFieldBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(field_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_);
}
if (!getPathTemplateBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pathTemplate_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pathTemplate_);
}
size += unknownFields.getSerializedSize();
Expand Down
6 changes: 3 additions & 3 deletions synth.metadata
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-common-protos.git",
"sha": "08b5c8545ed6f29a11ae4d3f061df47f40234bd1"
"sha": "fe2eae8c4d902c190c6e24bd02a41dc916f36db4"
}
},
{
Expand All @@ -19,7 +19,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "a4be3384ccb92364795d981f2863f6986fcee620"
"sha": "d45942be8066ad57bd0509f4a16e1fac78ecc50f"
}
}
],
Expand All @@ -46,7 +46,6 @@
".kokoro/common.sh",
".kokoro/continuous/common.cfg",
".kokoro/continuous/java8.cfg",
".kokoro/dependencies.sh",
".kokoro/nightly/common.cfg",
".kokoro/nightly/integration.cfg",
".kokoro/nightly/java11.cfg",
Expand All @@ -59,6 +58,7 @@
".kokoro/presubmit/clirr.cfg",
".kokoro/presubmit/common.cfg",
".kokoro/presubmit/dependencies.cfg",
".kokoro/presubmit/graalvm-native.cfg",
".kokoro/presubmit/integration.cfg",
".kokoro/presubmit/java11.cfg",
".kokoro/presubmit/java7.cfg",
Expand Down

0 comments on commit c2fa55a

Please sign in to comment.