-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Expand file tree
/
Copy pathjava-shared-config-downstream-maven-plugins.yaml
More file actions
164 lines (163 loc) · 5.77 KB
/
Copy pathjava-shared-config-downstream-maven-plugins.yaml
File metadata and controls
164 lines (163 loc) · 5.77 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
on:
push:
branches:
- main
pull_request:
# Keeping this file separate as the dependencies check would use more
# repositories than needed this downstream check for GraalVM native image and
# other Maven plugins.
name: java-shared-config downstream (maven-plugins)
env:
BUILD_SUBDIR: java-shared-config
jobs:
filter:
runs-on: ubuntu-latest
outputs:
library: ${{ steps.filter.outputs.library }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
library:
- 'java-shared-config/**'
build:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [8, 11]
repo:
- java-bigquery
- java-bigtable
job-type:
- test # maven-surefire-plugin
- clirr # clirr-maven-plugin
- javadoc # maven-javadoc-plugin
- javadoc-with-doclet # test javadoc generation with doclet
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: 11
- name: Install java-shared-dependencies and common dependencies
run: |
.kokoro/build.sh
env:
JOB_TYPE: install
- name: Pre-build dependencies
run: |
LIB_DIR="${{matrix.repo}}"
LIB_NAME="google-cloud-${LIB_DIR#java-}"
mvn install -pl ${LIB_DIR}/${LIB_NAME} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: sudo apt-get update -y
- run: sudo apt-get install libxml2-utils
- run: .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
lint:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [17, 21]
repo:
- java-bigquery
- java-bigtable
job-type:
- lint # fmt-maven-plugin and google-java-format
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-java@v4
with:
distribution: zulu
java-version: ${{matrix.java}}
- run: java -version
- run: sudo apt-get update -y
- run: sudo apt-get install libxml2-utils
- name: Install java-shared-dependencies and common dependencies
run: |
.kokoro/build.sh
env:
JOB_TYPE: install
- name: Pre-build dependencies
run: |
LIB_DIR="${{matrix.repo}}"
LIB_NAME="google-cloud-${LIB_DIR#java-}"
TARGET_PATH="${LIB_DIR}/${LIB_NAME}"
# Check if target matches standard structure (e.g. java-bigquery/google-cloud-bigquery)
if [ ! -d "${TARGET_PATH}" ]; then
# Fallback 1: Look for any google-cloud-* directory, excluding samples, retrofit, or BOMs (e.g. java-storage-nio/google-cloud-nio)
ALT_PATH=$(find "${LIB_DIR}" -maxdepth 1 -type d -name "google-cloud-*" ! -name "*-bom" ! -name "*-parent" ! -name "*-deps-bom" ! -name "*-examples" ! -name "*samples" ! -name "*-retrofit" | head -n 1)
if [ -n "${ALT_PATH}" ]; then
TARGET_PATH="${ALT_PATH}"
else
# Fallback 2: Assume single-module project where pom.xml is in the root directory (e.g. java-logging-logback)
TARGET_PATH="${LIB_DIR}"
fi
fi
mvn install -pl ${TARGET_PATH} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
- run: .kokoro/client-library-check.sh ${{matrix.repo}} ${{matrix.job-type}}
javadoc-with-doclet:
needs: filter
if: ${{ needs.filter.outputs.library == 'true' }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
repo:
- java-bigtable
- java-bigquery
- java-storage
- java-storage-nio
- java-spanner
- java-spanner-jdbc
- java-pubsub
- java-logging
- java-logging-logback
- java-firestore
- java-datastore
- java-bigquerystorage
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- run: java -version
- run: sudo apt-get update -y
- run: sudo apt-get install libxml2-utils
- name: Install java-shared-dependencies and common dependencies
run: |
.kokoro/build.sh
env:
JOB_TYPE: install
- name: Pre-build dependencies
run: |
LIB_DIR="${{matrix.repo}}"
LIB_NAME="google-cloud-${LIB_DIR#java-}"
TARGET_PATH="${LIB_DIR}/${LIB_NAME}"
# Check if target matches standard structure (e.g. java-bigquery/google-cloud-bigquery)
if [ ! -d "${TARGET_PATH}" ]; then
# Fallback 1: Look for any google-cloud-* directory, excluding samples, retrofit, or BOMs (e.g. java-storage-nio/google-cloud-nio)
ALT_PATH=$(find "${LIB_DIR}" -maxdepth 1 -type d -name "google-cloud-*" ! -name "*-bom" ! -name "*-parent" ! -name "*-deps-bom" ! -name "*-examples" ! -name "*samples" ! -name "*-retrofit" | head -n 1)
if [ -n "${ALT_PATH}" ]; then
TARGET_PATH="${ALT_PATH}"
else
# Fallback 2: Assume single-module project where pom.xml is in the root directory (e.g. java-logging-logback)
TARGET_PATH="${LIB_DIR}"
fi
fi
mvn install -pl ${TARGET_PATH} -am -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V -q
- run: .kokoro/client-library-check-doclet.sh ${{matrix.repo}}