Skip to content

Commit e440894

Browse files
build: introduce testing infra for GraalVM "C" (#1991)
* build: introduce testing infra for GraalVM "C" * chore: update versions to the latest * test: try disable strict heap option * chore: use strict-image-heap only in image A * chore: remove custom flag to config behavior * chore: start emulator on all graalvm jobs * chore: fix commented out lines * chore: remove commented code
1 parent 15faf13 commit e440894

File tree

6 files changed

+46
-12
lines changed

6 files changed

+46
-12
lines changed

.github/sync-repo-settings.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ branchProtectionRules:
3636
- "units (11)"
3737
- "Kokoro - Test: Integration"
3838
- "cla/google"
39-
- 'Kokoro - Test: Java GraalVM Native Image'
40-
- 'Kokoro - Test: Java 17 GraalVM Native Image'
41-
- javadoc
39+
- 'Kokoro - Test: Java GraalVM Native Image A'
40+
- 'Kokoro - Test: Java GraalVM Native Image B'
41+
- 'Kokoro - Test: Java GraalVM Native Image C'
4242
- unmanaged_dependency_check
4343
# Identifies the protection rule pattern. Name of the branch to be protected.
4444
# Defaults to `main`

.kokoro/build.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ fi
4545
# Start the Spanner emulator if the environment variable for it has been set.
4646
# TODO: Change if statement once the env var can be set in the config.
4747
#if [[ ! -z "${SPANNER_EMULATOR_HOST}" ]]; then
48-
if [[ "$JOB_TYPE" == "graalvm" ]] || [[ "$JOB_TYPE" == "graalvm17" ]]; then
48+
if [[ "$JOB_TYPE" =~ ^graalvm ]]; then
4949
echo "Starting emulator"
5050
export SPANNER_EMULATOR_HOST=localhost:9010
5151
docker pull gcr.io/cloud-spanner-emulator/emulator
@@ -115,9 +115,10 @@ graalvm)
115115
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test "-Dtest=com.google.cloud.spanner.jdbc.it.**"
116116
RETURN_CODE=$?
117117
;;
118-
graalvm17)
119-
# Run Unit and Integration Tests with Native Image.
120-
mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test "-Dtest=com.google.cloud.spanner.jdbc.it.**"
118+
graalvmA)
119+
# Run Unit and Integration Tests with Native Image A.
120+
121+
NATIVE_IMAGE_OPTIONS="--strict-image-heap" mvn -B ${INTEGRATION_TEST_ARGS} -ntp -Pnative -Penable-integration-tests test "-Dtest=com.google.cloud.spanner.jdbc.it.**"
121122
RETURN_CODE=$?
122123
;;
123124
samples)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Configure the docker image for kokoro-trampoline.
4+
env_vars: {
5+
key: "TRAMPOLINE_IMAGE"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.46.2"
7+
}
8+
9+
env_vars: {
10+
key: "JOB_TYPE"
11+
value: "graalvmA"
12+
}
13+
14+
# TODO: remove this after we've migrated all tests and scripts
15+
env_vars: {
16+
key: "GCLOUD_PROJECT"
17+
value: "gcloud-devel"
18+
}
19+
20+
env_vars: {
21+
key: "GOOGLE_CLOUD_PROJECT"
22+
value: "gcloud-devel"
23+
}
24+
25+
env_vars: {
26+
key: "GOOGLE_APPLICATION_CREDENTIALS"
27+
value: "secret_manager/java-it-service-account"
28+
}
29+
30+
env_vars: {
31+
key: "SECRET_MANAGER_KEYS"
32+
value: "java-it-service-account"
33+
}

.kokoro/presubmit/graalvm-native.cfg renamed to .kokoro/presubmit/graalvm-native-b.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_a:3.46.0"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.46.2"
77
}
88

99
env_vars: {
@@ -30,4 +30,4 @@ env_vars: {
3030
env_vars: {
3131
key: "SECRET_MANAGER_KEYS"
3232
value: "java-it-service-account"
33-
}
33+
}

.kokoro/presubmit/graalvm-native-17.cfg renamed to .kokoro/presubmit/graalvm-native-c.cfg

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
# Configure the docker image for kokoro-trampoline.
44
env_vars: {
55
key: "TRAMPOLINE_IMAGE"
6-
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_b:3.46.0"
6+
value: "gcr.io/cloud-devrel-public-resources/graalvm_sdk_platform_c:3.46.2"
77
}
88

99
env_vars: {
1010
key: "JOB_TYPE"
11-
value: "graalvm17"
11+
value: "graalvm"
1212
}
1313

1414
# TODO: remove this after we've migrated all tests and scripts
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Args=--strict-image-heap
1+
Args=--initialize-at-build-time=com.google.cloud.spanner.jdbc.it

0 commit comments

Comments
 (0)