Skip to content

Commit ba1fcdc

Browse files
Refactor GraalVM installation in build script
Updated the GraalVM installation process to download and extract the JDK directly, setting JAVA_HOME accordingly.
1 parent f490a62 commit ba1fcdc

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

.kokoro/build.sh

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,18 @@ integration-cloud-staging|integration-cloud-staging-directpath-enabled)
184184
;;
185185
graalvm)
186186
# Run Unit and Integration Tests with Native Image
187-
set -e
188-
microdnf install zip
189-
curl -s "https://get.sdkman.io" | bash -e
190-
source "/root/.sdkman/bin/sdkman-init.sh"
191-
set -x
192-
sdk install java 25-graalce -Y
193-
sdk install maven 3.9.11 -Y
187+
echo "Install GraalVM 25"
188+
echo "$JAVA_HOME"
189+
pwd
190+
mkdir -p ~/tools/jdk
191+
cd ~/tools/jdk
192+
wget https://download.oracle.com/graalvm/25/latest/graalvm-jdk-25_linux-x64_bin.tar.gz
193+
tar -xf graalvm-jdk-25_linux-x64_bin.tar.gz
194+
export JAVA_HOME=~/tools/jdk/graalvm-jdk-25+37.1
195+
export PATH=$JAVA_HOME/bin:$PATH
194196
java -version
195-
mvn -version
197+
echo "Running native image tests..."
198+
cd "${scriptDir}/.."
196199

197200
mvn test -Pnative -Penable-integration-tests -Dspanner.gce.config.project_id=gcloud-devel -Dspanner.testenv.instance=projects/gcloud-devel/instances/java-client-integration-tests
198201
RETURN_CODE=$?

0 commit comments

Comments
 (0)