Skip to content

Commit fd46e73

Browse files
committed
[CI] Simplify error log upload.
1 parent 9a9c283 commit fd46e73

File tree

2 files changed

+8
-20
lines changed

2 files changed

+8
-20
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,30 +71,18 @@ jobs:
7171
java-version: 17
7272
- name: Build with Gradle
7373
run: ./gradlew
74-
- name: Copy test logs (Unix)
74+
- name: Copy test logs
7575
id: copy_test_logs
76-
if: failure() && runner.os != 'Windows'
76+
if: failure()
7777
run: |
78-
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT
78+
${{ runner.os == 'Windows' && 'echo "file=build/distributions/test_logs.tbz2" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append' || 'echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT' }}
7979
./gradlew tarTestLogs
80-
- name: Upload crash logs (Unix)
80+
- name: Upload crash logs
8181
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2'
8282
uses: actions/upload-artifact@v4
8383
with:
8484
name: crash-logs-${{ matrix.os }}-java-${{ matrix.java }}
8585
path: ${{ steps.copy_test_logs.outputs.file }}
86-
- name: Copy test logs (Windows)
87-
id: copy_test_logs_windows
88-
if: runner.os == 'Windows' && failure()
89-
run: |
90-
echo "file=build/distributions/test_logs.tbz2" | Out-File $env:GITHUB_OUTPUT -Encoding utf8 -Append
91-
./gradlew tarTestLogs
92-
- name: Upload crash logs (Windows)
93-
if: runner.os == 'Windows' && always() && steps.copy_test_logs_windows.outputs.file == 'build/distributions/test_logs.tbz2'
94-
uses: actions/upload-artifact@v4
95-
with:
96-
name: crash-logs-${{ matrix.os }}-java-${{ matrix.java }}
97-
path: ${{ steps.copy_test_logs_windows.outputs.file }}
9886

9987
csharp-build:
10088
name: C# ${{ matrix.dotnet }}

.github/workflows/slow.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,17 +55,17 @@ jobs:
5555
run: ./csharp/build.sh
5656
- name: Run property tests
5757
run: ./gradlew propertyTest
58-
- name: Copy test logs (Unix)
58+
- name: Copy test logs
5959
id: copy_test_logs
6060
if: failure()
6161
run: |
62-
echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT
62+
${{ runner.os == 'Windows' && 'echo "file=build/distributions/test_logs.tbz2" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append' || 'echo "file=build/distributions/test_logs.tbz2" >> $GITHUB_OUTPUT' }}
6363
./gradlew tarTestLogs
64-
- name: Upload crash logs (Unix)
64+
- name: Upload crash logs
6565
if: always() && steps.copy_test_logs.outputs.file == 'build/distributions/test_logs.tbz2'
6666
uses: actions/upload-artifact@v4
6767
with:
68-
name: crash-logs-${{ matrix.os }}-property-tests
68+
name: crash-logs-${{ matrix.os }}-property-tests-java-${{matrix.java}}-dotnet-${{matrix.dotnet}}
6969
path: ${{ steps.copy_test_logs.outputs.file }}
7070
- name: Upload test results
7171
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)