Skip to content

Commit

Permalink
ci: downstream check for native image tests (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
mpeddada1 authored Aug 3, 2022
1 parent f59be02 commit fe1b069
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
branches:
- main
pull_request:

# Keeping this file separate as the dependencies check would use more
# repositories than needed this downstream check for GraalVM native image
# compilation.
name: downstream
jobs:
# GraalVM job ensures the compatibility of GraaVM version
graalvm:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
graalvm: [22.1.0]
java: [11, 17]
repo:
# GAPIC library that doesn't use a real GCP project in integration tests
- orgpolicy
steps:
- uses: actions/checkout@v2
- uses: stCarolas/setup-maven@v4
with:
maven-version: 3.8.1
- uses: ayltai/setup-graalvm@v1
with:
java-version: ${{matrix.java}}
# When a new version of native-maven-plugin fails to run in a downstream
# library, it's likely to be an incompatibility with the GraalVM version.
# In that case, you need to upgrade the Docker container used in the
# tests in the downstream repositories (not just this value below).
# Example: https://github.com/googleapis/testing-infra-docker/pull/195
graalvm-version: ${{matrix.graalvm}}
native-image: true
- run: java -version
- run: sudo apt-get update -y
- run: sudo apt-get install libxml2-utils
- run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}} graalvm
2 changes: 1 addition & 1 deletion java-shared-dependencies/.github/workflows/downstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,4 @@ jobs:
- run: java -version
- run: sudo apt-get update -y
- run: sudo apt-get install libxml2-utils
- run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}}
- run: .kokoro/downstream-client-library-check.sh ${{matrix.repo}} test
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ set -eo pipefail
set -x

CLIENT_LIBRARY=$1

# Example JOB_TYPE: "test" or "graalvm"
export JOB_TYPE=$2
## Get the directory of the build script
scriptDir="$(realpath "$(dirname "${BASH_SOURCE[0]}")")"
## cd to the parent directory, i.e. the root of the git repo
Expand Down Expand Up @@ -59,7 +62,5 @@ if [[ $CLIENT_LIBRARY == "bigtable" ]]; then
popd
fi

mvn verify install -B -V -ntp -fae \
-Dmaven.javadoc.skip=true \
-Dgcloud.download.skip=true \
-Denforcer.skip=true
# This reads the JOB_TYPE environmental variable ("test" or "graalvm")
.kokoro/build.sh

0 comments on commit fe1b069

Please sign in to comment.