Skip to content

Commit 8d1e7aa

Browse files
committed
ci: configure the protected branch
1 parent 2d7587b commit 8d1e7aa

File tree

1 file changed

+68
-79
lines changed

1 file changed

+68
-79
lines changed

.github/workflows/ci.yaml

Lines changed: 68 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,42 @@
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:
1+
'on':
172
push:
183
branches:
19-
- main
20-
pull_request:
4+
- 3.22.x
5+
pull_request: null
216
name: ci
227
jobs:
238
units:
249
runs-on: ubuntu-latest
2510
strategy:
2611
fail-fast: false
2712
matrix:
28-
java: [11, 17, 21, 24]
13+
java:
14+
- 11
15+
- 17
16+
- 21
17+
- 24
2918
steps:
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
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
3928
units-java8:
40-
# Building using Java 17 and run the tests with Java 8 runtime
41-
name: "units (8)"
29+
name: units (8)
4230
runs-on: ubuntu-latest
4331
steps:
4432
- uses: actions/checkout@v4
4533
- uses: actions/setup-java@v4
4634
with:
4735
java-version: 8
4836
distribution: temurin
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
37+
- name: >-
38+
Set jvm system property environment variable for surefire plugin (unit
39+
tests)
5240
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
5341
shell: bash
5442
- uses: actions/setup-java@v4
@@ -61,63 +49,64 @@ jobs:
6149
windows:
6250
runs-on: windows-latest
6351
steps:
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
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
7563
dependencies:
7664
runs-on: ubuntu-latest
7765
strategy:
7866
matrix:
79-
java: [17]
67+
java:
68+
- 17
8069
steps:
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
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
8877
javadoc:
8978
runs-on: ubuntu-latest
9079
steps:
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
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
10089
lint:
10190
runs-on: ubuntu-latest
10291
steps:
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
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
112101
clirr:
113102
runs-on: ubuntu-latest
114103
steps:
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
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

0 commit comments

Comments
 (0)