@@ -7,7 +7,7 @@ name: ci-maven
7
7
env :
8
8
SHOWCASE_VERSION : 0.25.0
9
9
jobs :
10
- units :
10
+ build :
11
11
runs-on : ubuntu-latest
12
12
strategy :
13
13
matrix :
@@ -22,11 +22,34 @@ jobs:
22
22
- run : java -version
23
23
- name : Unit Tests
24
24
run : |
25
- mvn verify --batch-mode --no-transfer-progress -Dcheckstyle.skip \
25
+ mvn install --batch-mode --no-transfer-progress -Dcheckstyle.skip \
26
26
-Dfmt.skip
27
+ - run : bazelisk version
28
+ - name : Integration Tests
29
+ run : |
30
+ bazel --batch test //test/integration/...
31
+ - name : Gradle Build Generated Storage Client Library
32
+ run : |
33
+ echo "Building Storage lib from generated source..."
34
+ mkdir /tmp/java-storage
35
+ bazelisk --batch build @com_google_googleapis//google/storage/v2:google-cloud-storage-v2-java
36
+ tar zxvf bazel-bin/external/com_google_googleapis/google/storage/v2/google-cloud-storage-v2-java.tar.gz -C /tmp/java-storage
37
+ pushd /tmp/java-storage/google-cloud-storage-v2-java
38
+ ./gradlew clean build publishToMavenLocal sourcesJar allJars
39
+ popd
27
40
28
- units-java8 :
29
- name : " units (8) except gapic-generator-java"
41
+ - name : Gradle Build Generated Compute Client Library
42
+ run : |
43
+ echo "Building Compute lib from generated source..."
44
+ mkdir /tmp/java-compute
45
+ bazelisk --batch build @com_google_googleapis//google/cloud/compute/v1small:google-cloud-compute-small-v1-java
46
+ tar zxvf bazel-bin/external/com_google_googleapis/google/cloud/compute/v1small/google-cloud-compute-small-v1-java.tar.gz -C /tmp/java-compute
47
+ pushd /tmp/java-compute/google-cloud-compute-small-v1-java
48
+ ./gradlew clean build publishToMavenLocal sourcesJar allJars
49
+ popd
50
+
51
+ build-java8-except-gapic-generator-java :
52
+ name : " build(8) except for gapic-generator-java"
30
53
runs-on : ubuntu-latest
31
54
steps :
32
55
- uses : actions/checkout@v3
65
88
-Dcheckstyle.skip -Dmaven.compiler.useIncrementalCompilation=false \
66
89
-Dfmt.skip
67
90
68
- units -java8-gapic-generator-java :
69
- name : " units (8) for gapic-generator-java"
91
+ build -java8-gapic-generator-java :
92
+ name : " build (8) for gapic-generator-java"
70
93
runs-on : ubuntu-latest
71
94
steps :
72
95
- uses : actions/checkout@v3
@@ -89,6 +112,29 @@ jobs:
89
112
shell : bash
90
113
run : |
91
114
mvn -V -B -ntp surefire:test --projects 'gapic-generator-java'
115
+ - run : bazelisk version
116
+ - name : Integration Tests
117
+ run : |
118
+ bazelisk --batch test //test/integration/...
119
+ - name : Gradle Build Generated Storage Client Library
120
+ run : |
121
+ echo "Building Storage lib from generated source..."
122
+ mkdir /tmp/java-storage
123
+ bazelisk --batch build @com_google_googleapis//google/storage/v2:google-cloud-storage-v2-java
124
+ tar zxvf bazel-bin/external/com_google_googleapis/google/storage/v2/google-cloud-storage-v2-java.tar.gz -C /tmp/java-storage
125
+ pushd /tmp/java-storage/google-cloud-storage-v2-java
126
+ ./gradlew clean build publishToMavenLocal sourcesJar allJars
127
+ popd
128
+
129
+ - name : Gradle Build Generated Compute Client Library
130
+ run : |
131
+ echo "Building Compute lib from generated source..."
132
+ mkdir /tmp/java-compute
133
+ bazelisk --batch build @com_google_googleapis//google/cloud/compute/v1small:google-cloud-compute-small-v1-java
134
+ tar zxvf bazel-bin/external/com_google_googleapis/google/cloud/compute/v1small/google-cloud-compute-small-v1-java.tar.gz -C /tmp/java-compute
135
+ pushd /tmp/java-compute/google-cloud-compute-small-v1-java
136
+ ./gradlew clean build publishToMavenLocal sourcesJar allJars
137
+ popd
92
138
93
139
lint :
94
140
runs-on : ubuntu-latest
@@ -116,26 +162,6 @@ jobs:
116
162
java-version : ${{ matrix.java }}
117
163
distribution : temurin
118
164
- run : java -version
119
-
120
- - name : Bazel File Cache Setup
121
- id : cache-bazel
122
- uses : actions/cache@v3
123
- with :
124
- path : ~/.cache/bazel
125
- key : ${{ runner.os }}-${{ hashFiles('WORKSPACE') }}
126
- restore-keys : ${{ runner.os }}-
127
- - name : Bazel Cache Not Found
128
- if : steps.cache-bazel.outputs.cache-hit != 'true'
129
- run : |
130
- echo "No cache found."
131
- - name : Bazel Cache Found
132
- if : steps.cache-bazel.outputs.cache-hit == 'true'
133
- run : |
134
- echo -n "Cache found. Cache size: "
135
- du -sh ~/.cache/bazel
136
- echo "If the cache seems broken, update the root WORKSPACE file with a trivial change."
137
- echo "The old cache will disappear after 7 days."
138
-
139
165
- name : Install maven modules
140
166
run : |
141
167
mvn install -B -ntp -DskipTests -Dclirr.skip -Dcheckstyle.skip
0 commit comments