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

Commit 82f22fd

Browse files
authored
ci: downsream test for GraalVM native image (#1681)
* ci: downsream test for GraalVM native image * downstream now require Java 11 * ci: adding 22.1.0 back to the downstream test
1 parent 46f899d commit 82f22fd

File tree

3 files changed

+52
-6
lines changed

3 files changed

+52
-6
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
pull_request:
6+
7+
# Keeping this file separate as the dependencies check would use more
8+
# repositories than needed this downstream check for GraalVM native image
9+
# compilation.
10+
name: downstream
11+
jobs:
12+
# GraalVM job ensures the compatibility of GraaVM version
13+
graalvm:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
graalvm: [22.1.0, 22.0.0.2, 21.3.2]
19+
java: [11, 17]
20+
repo:
21+
# GAPIC library that doesn't use a real GCP project in integration tests
22+
- orgpolicy
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: stCarolas/setup-maven@v4
26+
with:
27+
maven-version: 3.8.1
28+
- uses: ayltai/setup-graalvm@v1
29+
with:
30+
java-version: ${{matrix.java}}
31+
# When a new version of native-maven-plugin fails to run in a downstream
32+
# library, it's likely to be an incompatibility with the GraalVM version.
33+
# In that case, you need to upgrade the Docker container used in the
34+
# tests in the downstream repositories (not just this value below).
35+
# Example: https://github.com/googleapis/testing-infra-docker/pull/195
36+
graalvm-version: ${{matrix.graalvm}}
37+
native-image: true
38+
- run: java -version
39+
- run: sudo apt-get update -y
40+
- run: sudo apt-get install libxml2-utils
41+
- run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}} graalvm

‎.github/workflows/downstream.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: false
1313
matrix:
14-
java: [8]
14+
java: [11]
1515
repo:
1616
# This list needs to be updated manually until an automated solution is in place.
1717
- accessapproval
@@ -141,4 +141,4 @@ jobs:
141141
- run: java -version
142142
- run: sudo apt-get update -y
143143
- run: sudo apt-get install libxml2-utils
144-
- run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}}
144+
- run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}} test

‎.kokoro/downstream-client-library-check.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ set -eo pipefail
1818
set -x
1919

2020
CLIENT_LIBRARY=$1
21+
22+
# Example JOB_TYPE: "test" or "graalvm"
23+
export JOB_TYPE=$2
2124
## Get the directory of the build script
2225
scriptDir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
2326
## cd to the parent directory, i.e. the root of the git repo
@@ -86,7 +89,9 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then
8689
popd
8790
fi
8891

89-
mvn verify install -B -V -ntp -fae \
90-
-Dmaven.javadoc.skip=true \
91-
-Dgcloud.download.skip=true \
92-
-Denforcer.skip=true
92+
echo "Modification on the shared dependencies BOM:"
93+
git diff
94+
echo
95+
96+
# This reads the JOB_TYPE environmental variable ("test" or "graalvm")
97+
.kokoro/build.sh

0 commit comments

Comments
 (0)