Skip to content

Commit f617546

Browse files
committed
fixed build script to store logs after build failure
1 parent 9d37d35 commit f617546

File tree

1 file changed

+28
-20
lines changed

1 file changed

+28
-20
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
name: Compile using JDK 8
4242
steps:
4343
- name: Check out repository
44-
uses: actions/checkout@v3
44+
uses: actions/checkout@v4
4545
- name: Check out PR
4646
run: |
4747
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
@@ -60,6 +60,14 @@ jobs:
6060
export LIB_VER=$(grep '<revision>' pom.xml | sed -e 's|[[:space:]]*<[/]*revision>[[:space:]]*||g')
6161
find `pwd`/examples -type f -name pom.xml -exec sed -i -e "s|\(<clickhouse-java.version>\).*\(<\)|\1$LIB_VER\2|g" {} \;
6262
for d in $(ls -d `pwd`/examples/*/); do cd $d && mvn --batch-mode --no-transfer-progress clean compile; done
63+
- name: Upload test results
64+
uses: actions/upload-artifact@v4
65+
if: failure()
66+
with:
67+
name: result ${{ github.job }}
68+
path: |
69+
**/target/failsafe-reports
70+
**/target/surefire-reports
6371
6472
test-multi-env:
6573
needs: compile
@@ -77,22 +85,22 @@ jobs:
7785
name: ${{ matrix.dist }} JDK 17 on ${{ matrix.os }}
7886
steps:
7987
- name: Check out repository
80-
uses: actions/checkout@v3
88+
uses: actions/checkout@v4
8189
- name: Check out PR
8290
run: |
8391
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
8492
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
8593
if: github.event.inputs.pr != ''
8694
- name: Install JDK 17 and Maven
87-
uses: actions/setup-java@v3
95+
uses: actions/setup-java@v4
8896
with:
8997
distribution: ${{ matrix.dist }}
9098
java-version: 17
9199
cache: "maven"
92100
- name: Test libraries
93101
run: mvn --batch-mode --no-transfer-progress -Dj8 -DskipITs verify
94102
- name: Upload test results
95-
uses: actions/upload-artifact@v2
103+
uses: actions/upload-artifact@v4
96104
if: failure()
97105
with:
98106
name: result ${{ github.job }}
@@ -107,7 +115,7 @@ jobs:
107115
name: Test Native Image
108116
steps:
109117
- name: Check out repository
110-
uses: actions/checkout@v3
118+
uses: actions/checkout@v4
111119
- name: Check out PR
112120
run: |
113121
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
@@ -140,14 +148,14 @@ jobs:
140148
name: CLI client + CH LTS
141149
steps:
142150
- name: Check out repository
143-
uses: actions/checkout@v3
151+
uses: actions/checkout@v4
144152
- name: Check out PR
145153
run: |
146154
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
147155
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
148156
if: github.event.inputs.pr != ''
149157
- name: Install JDK 8 and Maven
150-
uses: actions/setup-java@v3
158+
uses: actions/setup-java@v4
151159
with:
152160
distribution: "temurin"
153161
java-version: 8
@@ -164,7 +172,7 @@ jobs:
164172
run: |
165173
mvn --also-make --batch-mode --no-transfer-progress --projects clickhouse-cli-client -DclickhouseVersion=$PREFERRED_LTS_VERSION -Dj8 -DskipUTs verify
166174
- name: Upload test results
167-
uses: actions/upload-artifact@v2
175+
uses: actions/upload-artifact@v4
168176
if: failure()
169177
with:
170178
name: result ${{ github.job }}
@@ -185,14 +193,14 @@ jobs:
185193
name: Java client + CH ${{ matrix.clickhouse }}
186194
steps:
187195
- name: Check out repository
188-
uses: actions/checkout@v3
196+
uses: actions/checkout@v4
189197
- name: Check out PR
190198
run: |
191199
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
192200
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
193201
if: github.event.inputs.pr != ''
194202
- name: Install JDK 17 and Maven
195-
uses: actions/setup-java@v3
203+
uses: actions/setup-java@v4
196204
with:
197205
distribution: "temurin"
198206
java-version: |
@@ -221,7 +229,7 @@ jobs:
221229
run: |
222230
mvn --also-make --batch-mode --no-transfer-progress --projects clickhouse-cli-client,clickhouse-grpc-client,clickhouse-http-client -DclickhouseVersion=${{ matrix.clickhouse }} verify
223231
- name: Upload test results
224-
uses: actions/upload-artifact@v2
232+
uses: actions/upload-artifact@v4
225233
if: failure()
226234
with:
227235
name: result ${{ github.job }}
@@ -242,14 +250,14 @@ jobs:
242250
name: JDBC driver + CH ${{ matrix.clickhouse }} (${{ matrix.protocol }})
243251
steps:
244252
- name: Check out repository
245-
uses: actions/checkout@v3
253+
uses: actions/checkout@v4
246254
- name: Check out PR
247255
run: |
248256
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
249257
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
250258
if: github.event.inputs.pr != ''
251259
- name: Install JDK 17 and Maven
252-
uses: actions/setup-java@v3
260+
uses: actions/setup-java@v4
253261
with:
254262
distribution: "temurin"
255263
java-version: |
@@ -280,7 +288,7 @@ jobs:
280288
run: |
281289
mvn --batch-mode --no-transfer-progress --projects clickhouse-jdbc -DclickhouseVersion=${{ matrix.clickhouse }} -Dprotocol=${{ matrix.protocol }} verify
282290
- name: Upload test results
283-
uses: actions/upload-artifact@v2
291+
uses: actions/upload-artifact@v4
284292
if: failure()
285293
with:
286294
name: result ${{ github.job }}
@@ -302,14 +310,14 @@ jobs:
302310
name: R2DBC ${{ matrix.r2dbc }} + CH ${{ matrix.clickhouse }} (${{ matrix.protocol }})
303311
steps:
304312
- name: Check out repository
305-
uses: actions/checkout@v3
313+
uses: actions/checkout@v4
306314
- name: Check out PR
307315
run: |
308316
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
309317
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
310318
if: github.event.inputs.pr != ''
311319
- name: Install JDK 17 and Maven
312-
uses: actions/setup-java@v3
320+
uses: actions/setup-java@v4
313321
with:
314322
distribution: "temurin"
315323
java-version: |
@@ -341,7 +349,7 @@ jobs:
341349
mvn --batch-mode --no-transfer-progress --projects clickhouse-r2dbc -DclickhouseVersion=${{ matrix.clickhouse }} \
342350
-D'r2dbc-spi.version=${{ matrix.r2dbc }}' -Dprotocol=${{ matrix.protocol }} verify
343351
- name: Upload test results
344-
uses: actions/upload-artifact@v2
352+
uses: actions/upload-artifact@v4
345353
if: failure()
346354
with:
347355
name: result ${{ github.job }}
@@ -375,14 +383,14 @@ jobs:
375383
name: "TimeZone(C/S): ${{ matrix.clientTz }} vs. ${{ matrix.serverTz }}"
376384
steps:
377385
- name: Check out repository
378-
uses: actions/checkout@v3
386+
uses: actions/checkout@v4
379387
- name: Check out PR
380388
run: |
381389
git fetch --no-tags --prune --progress --no-recurse-submodules --depth=1 \
382390
origin pull/${{ github.event.inputs.pr }}/merge:merged-pr && git checkout merged-pr
383391
if: github.event.inputs.pr != ''
384392
- name: Install JDK 8 and Maven
385-
uses: actions/setup-java@v3
393+
uses: actions/setup-java@v4
386394
with:
387395
distribution: "temurin"
388396
java-version: 8
@@ -395,7 +403,7 @@ jobs:
395403
-DclickhouseTimezone=${{ matrix.serverTz }} -Duser.timezone=${{ matrix.clientTz }} \
396404
-Dj8 -DskipUTs verify
397405
- name: Upload test results
398-
uses: actions/upload-artifact@v2
406+
uses: actions/upload-artifact@v4
399407
if: failure()
400408
with:
401409
name: result ${{ github.job }}

0 commit comments

Comments
 (0)