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

Commit d0e082c

Browse files
authored
ci: configure the protected branch (#911)
1 parent de2670b commit d0e082c

File tree

4 files changed

+219
-246
lines changed

4 files changed

+219
-246
lines changed

.github/workflows/ci.yaml

Lines changed: 56 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,80 @@
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.0.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: [8, 11, 17]
13+
java:
14+
- 8
15+
- 11
16+
- 17
2917
steps:
30-
- uses: actions/checkout@v3
31-
- uses: actions/setup-java@v3
32-
with:
33-
distribution: zulu
34-
java-version: ${{matrix.java}}
35-
- run: java -version
36-
- run: .kokoro/build.sh
37-
env:
38-
JOB_TYPE: test
18+
- uses: actions/checkout@v3
19+
- uses: actions/setup-java@v3
20+
with:
21+
distribution: zulu
22+
java-version: ${{matrix.java}}
23+
- run: java -version
24+
- run: .kokoro/build.sh
25+
env:
26+
JOB_TYPE: test
3927
windows:
4028
runs-on: windows-latest
4129
steps:
42-
- name: Support longpaths
43-
run: git config --system core.longpaths true
44-
- uses: actions/checkout@v3
45-
- uses: actions/setup-java@v3
46-
with:
47-
distribution: zulu
48-
java-version: 8
49-
- run: java -version
50-
- run: .kokoro/build.bat
51-
env:
52-
JOB_TYPE: test
30+
- name: Support longpaths
31+
run: git config --system core.longpaths true
32+
- uses: actions/checkout@v3
33+
- uses: actions/setup-java@v3
34+
with:
35+
distribution: zulu
36+
java-version: 8
37+
- run: java -version
38+
- run: .kokoro/build.bat
39+
env:
40+
JOB_TYPE: test
5341
dependencies:
5442
runs-on: ubuntu-latest
5543
strategy:
5644
matrix:
57-
java: [8, 11, 17]
45+
java:
46+
- 8
47+
- 11
48+
- 17
5849
steps:
59-
- uses: actions/checkout@v3
60-
- uses: actions/setup-java@v3
61-
with:
62-
distribution: zulu
63-
java-version: ${{matrix.java}}
64-
- run: java -version
65-
- run: .kokoro/dependencies.sh
50+
- uses: actions/checkout@v3
51+
- uses: actions/setup-java@v3
52+
with:
53+
distribution: zulu
54+
java-version: ${{matrix.java}}
55+
- run: java -version
56+
- run: .kokoro/dependencies.sh
6657
lint:
6758
runs-on: ubuntu-latest
6859
steps:
69-
- uses: actions/checkout@v3
70-
- uses: actions/setup-java@v3
71-
with:
72-
distribution: zulu
73-
java-version: 11
74-
- run: java -version
75-
- run: .kokoro/build.sh
76-
env:
77-
JOB_TYPE: lint
60+
- uses: actions/checkout@v3
61+
- uses: actions/setup-java@v3
62+
with:
63+
distribution: zulu
64+
java-version: 11
65+
- run: java -version
66+
- run: .kokoro/build.sh
67+
env:
68+
JOB_TYPE: lint
7869
clirr:
7970
runs-on: ubuntu-latest
8071
steps:
81-
- uses: actions/checkout@v3
82-
- uses: actions/setup-java@v3
83-
with:
84-
distribution: zulu
85-
java-version: 8
86-
- run: java -version
87-
- run: .kokoro/build.sh
88-
env:
89-
JOB_TYPE: clirr
72+
- uses: actions/checkout@v3
73+
- uses: actions/setup-java@v3
74+
with:
75+
distribution: zulu
76+
java-version: 8
77+
- run: java -version
78+
- run: .kokoro/build.sh
79+
env:
80+
JOB_TYPE: clirr

.github/workflows/downstream-native-image.yaml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,21 @@
1-
on:
1+
'on':
22
push:
33
branches:
4-
- main
5-
pull_request:
6-
7-
# Keeping this file separate as the dependencies check would use more
8-
# repositories than needed this downstream check for GraalVM native image
9-
# compilation.
4+
- 3.0.x
5+
pull_request: null
106
name: downstream-native-image
117
jobs:
12-
# GraalVM job ensures the compatibility of GraaVM version
138
graalvm:
149
runs-on: ubuntu-latest
1510
strategy:
1611
fail-fast: false
1712
matrix:
18-
graalvm: [22.2.0]
19-
java: [11, 17]
13+
graalvm:
14+
- 22.2.0
15+
java:
16+
- 11
17+
- 17
2018
repo:
21-
# GAPIC library that doesn't use a real GCP project in integration tests
2219
- orgpolicy
2320
steps:
2421
- uses: actions/checkout@v2
@@ -28,11 +25,6 @@ jobs:
2825
- uses: ayltai/setup-graalvm@v1
2926
with:
3027
java-version: ${{matrix.java}}
31-
# When a new version of native-maven-plugin fails to run in a downstream
32-
# library, it's likely to be an incompatibility with the GraalVM version.
33-
# In that case, you need to upgrade the Docker container used in the
34-
# tests in the downstream repositories (not just this value below).
35-
# Example: https://github.com/googleapis/testing-infra-docker/pull/195
3628
graalvm-version: ${{matrix.graalvm}}
3729
native-image: true
3830
- run: java -version

0 commit comments

Comments
 (0)