Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update ci.yaml to setup Java 21 CI tests #2299

Merged
merged 26 commits into from
Dec 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# See https://github.com/bazelbuild/bazelisk
USE_BAZEL_VERSION=6.0.0
# As per b/302171264#comment5, 6.4.0 supports Java 21.
USE_BAZEL_VERSION=6.4.0
26 changes: 24 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
java: [ 11, 17 ]
java: [ 11, 17]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
Expand Down Expand Up @@ -48,7 +48,29 @@ jobs:
pushd /tmp/java-compute/google-cloud-compute-small-v1-java
./gradlew clean build publishToMavenLocal sourcesJar allJars
popd

build-java-21:
name: "build(21) except self-service clients"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you add source code comment why build (21) is special?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

# Support for Java 21 is available for all use cases except self-service clients.
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 21
distribution: temurin
cache: maven
- run: java -version
- name: Unit Tests
run: |
mvn test --batch-mode --no-transfer-progress -Dcheckstyle.skip \
-Dfmt.skip -DenableTestCoverage
- run: bazelisk version
- name: Install Maven modules
run: |
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
- name: Integration Tests
run: |
bazelisk --batch test //test/integration/...
build-java8-except-gapic-generator-java:
name: "build(8) except for gapic-generator-java"
runs-on: ubuntu-22.04
Expand Down
Loading