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

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 committed Aug 3, 2022
1 parent 27fc79f commit 92d217c
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 5 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/downstream-native-image.yaml
@@ -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 .github/workflows/downstream.yaml
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
9 changes: 5 additions & 4 deletions .kokoro/downstream-client-library-check.sh
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 92d217c

Please sign in to comment.