1- ' on ' :
1+ # Copyright 2022 Google LLC
2+ #
3+ # Licensed under the Apache License, Version 2.0 (the "License");
4+ # you may not use this file except in compliance with the License.
5+ # You may obtain a copy of the License at
6+ #
7+ # http://www.apache.org/licenses/LICENSE-2.0
8+ #
9+ # Unless required by applicable law or agreed to in writing, software
10+ # distributed under the License is distributed on an "AS IS" BASIS,
11+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+ # See the License for the specific language governing permissions and
13+ # limitations under the License.
14+ # Github action job to test core java library features on
15+ # downstream client libraries before they are released.
16+ on :
217 push :
318 branches :
4- - 1.140.x
5- pull_request : null
19+ - main
20+ pull_request :
621name : ci
722jobs :
823 units :
924 runs-on : ubuntu-latest
1025 strategy :
1126 fail-fast : false
1227 matrix :
13- java :
14- - 11
15- - 17
16- - 21
17- - 24
28+ java : [11, 17, 21, 24]
1829 steps :
19- - uses : actions/checkout@v4
20- - uses : actions/setup-java@v4
21- with :
22- distribution : temurin
23- java-version : ${{matrix.java}}
24- - run : java -version
25- - run : .kokoro/build.sh
26- env :
27- JOB_TYPE : test
30+ - uses : actions/checkout@v4
31+ - uses : actions/setup-java@v4
32+ with :
33+ distribution : temurin
34+ java-version : ${{matrix.java}}
35+ - run : java -version
36+ - run : .kokoro/build.sh
37+ env :
38+ JOB_TYPE : test
2839 units-java8 :
29- name : units (8)
40+ # Building using Java 17 and run the tests with Java 8 runtime
41+ name : " units (8)"
3042 runs-on : ubuntu-latest
3143 steps :
3244 - uses : actions/checkout@v4
3345 - uses : actions/setup-java@v4
3446 with :
3547 java-version : 8
3648 distribution : temurin
37- - name : >-
38- Set jvm system property environment variable for surefire plugin (unit
39- tests)
49+ - name : " Set jvm system property environment variable for surefire plugin (unit tests) "
50+ # Maven surefire plugin (unit tests) allows us to specify JVM to run the tests.
51+ # https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#jvm
4052 run : echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
4153 shell : bash
4254 - uses : actions/setup-java@v4
@@ -49,64 +61,63 @@ jobs:
4961 windows :
5062 runs-on : windows-latest
5163 steps :
52- - name : Support longpaths
53- run : git config --system core.longpaths true
54- - uses : actions/checkout@v4
55- - uses : actions/setup-java@v4
56- with :
57- distribution : temurin
58- java-version : 8
59- - run : java -version
60- - run : .kokoro/build.bat
61- env :
62- JOB_TYPE : test
64+ - name : Support longpaths
65+ run : git config --system core.longpaths true
66+ - uses : actions/checkout@v4
67+ - uses : actions/setup-java@v4
68+ with :
69+ distribution : temurin
70+ java-version : 8
71+ - run : java -version
72+ - run : .kokoro/build.bat
73+ env :
74+ JOB_TYPE : test
6375 dependencies :
6476 runs-on : ubuntu-latest
6577 strategy :
6678 matrix :
67- java :
68- - 17
79+ java : [17]
6980 steps :
70- - uses : actions/checkout@v4
71- - uses : actions/setup-java@v4
72- with :
73- distribution : temurin
74- java-version : ${{matrix.java}}
75- - run : java -version
76- - run : .kokoro/dependencies.sh
81+ - uses : actions/checkout@v4
82+ - uses : actions/setup-java@v4
83+ with :
84+ distribution : temurin
85+ java-version : ${{matrix.java}}
86+ - run : java -version
87+ - run : .kokoro/dependencies.sh
7788 javadoc :
7889 runs-on : ubuntu-latest
7990 steps :
80- - uses : actions/checkout@v4
81- - uses : actions/setup-java@v4
82- with :
83- distribution : temurin
84- java-version : 17
85- - run : java -version
86- - run : .kokoro/build.sh
87- env :
88- JOB_TYPE : javadoc
91+ - uses : actions/checkout@v4
92+ - uses : actions/setup-java@v4
93+ with :
94+ distribution : temurin
95+ java-version : 17
96+ - run : java -version
97+ - run : .kokoro/build.sh
98+ env :
99+ JOB_TYPE : javadoc
89100 lint :
90101 runs-on : ubuntu-latest
91102 steps :
92- - uses : actions/checkout@v4
93- - uses : actions/setup-java@v4
94- with :
95- distribution : temurin
96- java-version : 17
97- - run : java -version
98- - run : .kokoro/build.sh
99- env :
100- JOB_TYPE : lint
103+ - uses : actions/checkout@v4
104+ - uses : actions/setup-java@v4
105+ with :
106+ distribution : temurin
107+ java-version : 17
108+ - run : java -version
109+ - run : .kokoro/build.sh
110+ env :
111+ JOB_TYPE : lint
101112 clirr :
102113 runs-on : ubuntu-latest
103114 steps :
104- - uses : actions/checkout@v4
105- - uses : actions/setup-java@v4
106- with :
107- distribution : temurin
108- java-version : 8
109- - run : java -version
110- - run : .kokoro/build.sh
111- env :
112- JOB_TYPE : clirr
115+ - uses : actions/checkout@v4
116+ - uses : actions/setup-java@v4
117+ with :
118+ distribution : temurin
119+ java-version : 8
120+ - run : java -version
121+ - run : .kokoro/build.sh
122+ env :
123+ JOB_TYPE : clirr
0 commit comments