From a060f56b740b3061062ceef4a528e5f4b4e2c522 Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Sat, 17 Aug 2024 09:33:15 +0200 Subject: [PATCH] #318 Separate Failure handling on Windows and Unixes ; Conflicts: ; .github/workflows/build-artifacts.yml ; .github/workflows/test-java-os-mix.yml --- .github/workflows/build-artifacts.yml | 17 +++++++++++++++-- .github/workflows/test-java-os-mix.yml | 21 +++++++++++++++------ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-artifacts.yml b/.github/workflows/build-artifacts.yml index a97e41d5..561fa31e 100644 --- a/.github/workflows/build-artifacts.yml +++ b/.github/workflows/build-artifacts.yml @@ -75,8 +75,8 @@ jobs: path: | **/build - - name: Collect state upon failure - if: failure() + - name: Collect state upon failure (On Unix) + if: failure() && runner.os != 'Windows' run: | echo "Git:" git status @@ -87,3 +87,16 @@ jobs: echo "Files:" find * -ls ./gradlew javaToolchains + + - name: Collect state upon failure (On Windows) + if: failure() && runner.os == 'Windows' + shell: pwsh + run: | + echo "Git:" + git status + echo "Env:" + env + echo "PWD:" + pwd + echo "Files:" + Get-ChildItem -Recurse -File | Format-Table Name, Length, LastWriteTime \ No newline at end of file diff --git a/.github/workflows/test-java-os-mix.yml b/.github/workflows/test-java-os-mix.yml index 3ad2783c..51f024fb 100644 --- a/.github/workflows/test-java-os-mix.yml +++ b/.github/workflows/test-java-os-mix.yml @@ -57,12 +57,8 @@ jobs: cmd /c "echo off && gradlew.bat --version" cmd /c "echo off && gradlew.bat htmlSanityCheck --scan" - # If we ever need to debug the file system contents - # Get-ChildItem -Recurse -File | Format-Table Name, Length, LastWriteTime - # Get-ChildItem -Recurse -File ./integration-test | Format-Table Name, Length, LastWriteTime - - - name: Collect state upon failure - if: failure() + - name: Collect state upon failure (On Unix) + if: failure() && runner.os != 'Windows' run: | echo "Git:" git status @@ -74,3 +70,16 @@ jobs: find * -ls ./gradlew javaToolchains + + - name: Collect state upon failure (On Windows) + if: failure() && runner.os == 'Windows' + shell: pwsh + run: | + echo "Git:" + git status + echo "Env:" + env + echo "PWD:" + pwd + echo "Files:" + Get-ChildItem -Recurse -File | Format-Table Name, Length, LastWriteTime \ No newline at end of file