Repository navigation
Expand file tree
/
Copy pathgoogle-auth-library-java-ci.yaml
More file actions
184 lines (180 loc) · 5.83 KB
/
Copy pathgoogle-auth-library-java-ci.yaml
File metadata and controls
184 lines (180 loc) · 5.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# GitHub action job to test core java library features on
# downstream client libraries before they are released.
permissions:
contents: read
on:
pull_request:
name: google-auth-library-java ci
env:
BUILD_SUBDIR: google-auth-library-java
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
filter:
runs-on: ubuntu-latest
timeout-minutes: 90
permissions:
pull-requests: read
outputs:
library: ${{ steps.filter.outputs.library }}
steps:
- uses: dorny/paths-filter@fbd0ab8f3e69293af611ebaee6363fc25e6d187d # v4.0.1
id: filter
with:
filters: |
library:
- 'google-auth-library-java/**'
- '.github/workflows/google-auth-library-java-ci.yaml'
units:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java: [11, 17, 21, 25, 26]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
distribution: temurin
java-version: ${{matrix.java}}
cache: maven
- run: java -version
- run: .kokoro/build.sh
env:
BUILD_SUBDIR: google-auth-library-java
JOB_TYPE: test
units-java8:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
name: "units (8)"
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
java-version: 11
distribution: temurin
cache: maven
- run: java -version
- name: Install all modules using Java 11
shell: bash
run: .kokoro/build.sh
env:
BUILD_SUBDIR: google-auth-library-java
JOB_TYPE: install
- name: Cache Temurin JDK 8
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: /opt/hostedtoolcache/Java_Temurin-Hotspot_jdk/8.*
key: ${{ runner.os }}-temurin-jdk8
- uses: actions/setup-java@b6effb05e454b25005698d916606bdc6ffcbf961 # v5.7.0
with:
java-version: 8
distribution: temurin
- run: java -version
- name: Run tests in Java 8 with the source compiled in Java 11
run: |
mvn test \
-B -ntp \
-Pquick-build \
-Dorg.slf4j.simpleLogger.showDateTime=true \
-Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS \
-Dmaven.wagon.http.retryHandler.count=5 \
--also-make \
-T 1C
env:
BUILD_SUBDIR: google-auth-library-java
JOB_TYPE: test
working-directory: google-auth-library-java
units-logging:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
java: [11, 17, 21, 25, 26]
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
distribution: temurin
java-version: ${{matrix.java}}
cache: maven
- run: java -version
- run: .kokoro/build.sh
env:
BUILD_SUBDIR: google-auth-library-java
JOB_TYPE: test
SUREFIRE_JVM_OPT: "-P '!slf4j2x,slf4j2x-test'"
clirr:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
persist-credentials: false
- uses: actions/setup-java@17f84c3641ba7b8f6deff6309fc4c864478f5d62 # v3.14.1
with:
distribution: temurin
java-version: 11
cache: maven
- run: java -version
- run: .kokoro/build.sh
env:
JOB_TYPE: clirr
BUILD_SUBDIR: google-auth-library-java
dependencies:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
persist-credentials: false
- uses: actions/setup-java@c1e323688fd81a25caa38c78aa6df2d33d3e20d9 # v4.8.0
with:
distribution: temurin
java-version: 17
cache: maven
- run: .kokoro/dependencies.sh
required:
needs: [ filter, units, units-java8, units-logging, clirr, dependencies ]
name: conditional-required-check
if: ${{ !cancelled() }} # Run even if any "needs" jobs fail or are skipped, unless cancelled
runs-on: ubuntu-22.04
timeout-minutes: 90
steps:
- name: Fail if any previous failure or cancellation
if: ${{ contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') }}
run: exit 1
- name: Success otherwise
run: echo "Success!"