Skip to content

Commit aa680c2

Browse files
committed
ci: configure the protected branch
1 parent 5f31da8 commit aa680c2

File tree

1 file changed

+76
-87
lines changed

1 file changed

+76
-87
lines changed

.github/workflows/ci.yaml

Lines changed: 76 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,41 @@
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+
- 2.29.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]
13+
java:
14+
- 11
15+
- 17
16+
- 21
2917
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
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-java@v4
20+
with:
21+
distribution: temurin
22+
java-version: ${{matrix.java}}
23+
- run: java -version
24+
- run: .kokoro/build.sh
25+
env:
26+
JOB_TYPE: test
3927
units-java8:
40-
# Building using Java 17 and run the tests with Java 8 runtime
41-
name: "units (8)"
28+
name: units (8)
4229
runs-on: ubuntu-latest
4330
steps:
4431
- uses: actions/checkout@v4
4532
- uses: actions/setup-java@v4
4633
with:
4734
java-version: 8
4835
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
36+
- name: >-
37+
Set jvm system property environment variable for surefire plugin (unit
38+
tests)
5239
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}/bin/java" >> $GITHUB_ENV
5340
shell: bash
5441
- uses: actions/setup-java@v4
@@ -59,73 +46,75 @@ jobs:
5946
env:
6047
JOB_TYPE: test
6148
windows:
62-
# Building using Java 11 and run the tests with Java 8 runtime
6349
runs-on: windows-latest
6450
steps:
65-
- name: Support longpaths
66-
run: git config --system core.longpaths true
67-
- uses: actions/checkout@v4
68-
- uses: actions/setup-java@v4
69-
with:
70-
java-version: 8
71-
distribution: temurin
72-
- name: "Set jvm system property environment variable for surefire plugin (unit tests)"
73-
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}\bin\java" >> $GITHUB_ENV
74-
shell: bash
75-
- uses: actions/setup-java@v4
76-
with:
77-
distribution: temurin
78-
java-version: 11
79-
- run: java -version
80-
- run: .kokoro/build.bat
81-
env:
82-
JOB_TYPE: test
51+
- name: Support longpaths
52+
run: git config --system core.longpaths true
53+
- uses: actions/checkout@v4
54+
- uses: actions/setup-java@v4
55+
with:
56+
java-version: 8
57+
distribution: temurin
58+
- name: >-
59+
Set jvm system property environment variable for surefire plugin (unit
60+
tests)
61+
run: echo "SUREFIRE_JVM_OPT=-Djvm=${JAVA_HOME}\bin\java" >> $GITHUB_ENV
62+
shell: bash
63+
- uses: actions/setup-java@v4
64+
with:
65+
distribution: temurin
66+
java-version: 11
67+
- run: java -version
68+
- run: .kokoro/build.bat
69+
env:
70+
JOB_TYPE: test
8371
dependencies:
8472
runs-on: ubuntu-latest
8573
strategy:
8674
matrix:
87-
java: [17]
75+
java:
76+
- 17
8877
steps:
89-
- uses: actions/checkout@v4
90-
- uses: actions/setup-java@v4
91-
with:
92-
distribution: temurin
93-
java-version: ${{matrix.java}}
94-
- run: java -version
95-
- run: .kokoro/dependencies.sh
78+
- uses: actions/checkout@v4
79+
- uses: actions/setup-java@v4
80+
with:
81+
distribution: temurin
82+
java-version: ${{matrix.java}}
83+
- run: java -version
84+
- run: .kokoro/dependencies.sh
9685
javadoc:
9786
runs-on: ubuntu-latest
9887
steps:
99-
- uses: actions/checkout@v4
100-
- uses: actions/setup-java@v4
101-
with:
102-
distribution: temurin
103-
java-version: 17
104-
- run: java -version
105-
- run: .kokoro/build.sh
106-
env:
107-
JOB_TYPE: javadoc
88+
- uses: actions/checkout@v4
89+
- uses: actions/setup-java@v4
90+
with:
91+
distribution: temurin
92+
java-version: 17
93+
- run: java -version
94+
- run: .kokoro/build.sh
95+
env:
96+
JOB_TYPE: javadoc
10897
lint:
10998
runs-on: ubuntu-latest
11099
steps:
111-
- uses: actions/checkout@v4
112-
- uses: actions/setup-java@v4
113-
with:
114-
distribution: temurin
115-
java-version: 17
116-
- run: java -version
117-
- run: .kokoro/build.sh
118-
env:
119-
JOB_TYPE: lint
100+
- uses: actions/checkout@v4
101+
- uses: actions/setup-java@v4
102+
with:
103+
distribution: temurin
104+
java-version: 17
105+
- run: java -version
106+
- run: .kokoro/build.sh
107+
env:
108+
JOB_TYPE: lint
120109
clirr:
121110
runs-on: ubuntu-latest
122111
steps:
123-
- uses: actions/checkout@v4
124-
- uses: actions/setup-java@v4
125-
with:
126-
distribution: temurin
127-
java-version: 8
128-
- run: java -version
129-
- run: .kokoro/build.sh
130-
env:
131-
JOB_TYPE: clirr
112+
- uses: actions/checkout@v4
113+
- uses: actions/setup-java@v4
114+
with:
115+
distribution: temurin
116+
java-version: 8
117+
- run: java -version
118+
- run: .kokoro/build.sh
119+
env:
120+
JOB_TYPE: clirr

0 commit comments

Comments
 (0)