diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 54d68e9e..33d4092a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -59,7 +59,10 @@ jobs: # Build both Uno.UI/WinUI2/UWP and Uno.WinUI/WinUI3/WindowsAppSDK versions of our packages using a matrix build: needs: [Xaml-Style-Check] - runs-on: windows-latest-large + runs-on: windows-latest + + env: + PROCDUMP_PATH: ${{ github.workspace }} # See https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs strategy: @@ -84,15 +87,6 @@ jobs: maximum-size: 32GB disk-root: "C:" - - name: Enable User-Mode Dumps collecting - if: ${{ env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '' }} - shell: powershell - run: | - New-Item '${{ github.workspace }}\CrashDumps' -Type Directory - Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpFolder' -Type ExpandString -Value '${{ github.workspace }}\CrashDumps' - Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpCount' -Type DWord -Value '10' - Set-ItemProperty -Path 'HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps' -Name 'DumpType' -Type DWord -Value '2' - - name: Install .NET SDK v${{ env.DOTNET_VERSION }} uses: actions/setup-dotnet@v4 with: @@ -108,6 +102,13 @@ jobs: with: submodules: recursive + - name: Install procdump + if: ${{ env.ENABLE_DIAGNOSTICS == 'true' }} + shell: pwsh + run: | + Invoke-WebRequest -Uri https://download.sysinternals.com/files/Procdump.zip -OutFile Procdump.zip + Expand-Archive -Path Procdump.zip -DestinationPath ${{ env.PROCDUMP_PATH }} + # Restore Tools from Manifest list in the Repository - name: Restore dotnet tools run: dotnet tool restore @@ -161,7 +162,7 @@ jobs: - name: Run component tests against ${{ matrix.multitarget }} if: ${{ matrix.multitarget == 'uwp' || matrix.multitarget == 'wasdk' }} id: test-platform - run: vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ matrix.multitarget }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ matrix.multitarget }}.trx" /Blame + run: vstest.console.exe ./tooling/**/CommunityToolkit.Tests.${{ matrix.multitarget }}.build.appxrecipe /Framework:FrameworkUap10 /logger:"trx;LogFileName=${{ matrix.multitarget }}.trx" /Blame:"CollectDump;DumpType=Full;CollectHangDump;TestTimeout=30m;HangDumpType=Full" /Diag:"${{ github.workspace }}/vstest-diagnostic-log.txt" - name: Create test reports run: | @@ -179,7 +180,7 @@ jobs: uses: actions/upload-artifact@v4 if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} with: - name: ilc-repro + name: ilc-repro-${{ matrix.multitarget }}-winui${{ matrix.winui }} path: ./*.zip # https://github.com/dorny/paths-filter#custom-processing-of-changed-files @@ -188,14 +189,21 @@ jobs: if: always() working-directory: ${{ github.workspace }} run: | - echo "DUMP_FILE=$(Get-ChildItem .\CrashDumps\*.dmp -ErrorAction SilentlyContinue)" >> $env:GITHUB_OUTPUT + echo "DUMP_FILE=$(Get-ChildItem ${{ env.PROCDUMP_PATH }}/**/*.dmp -ErrorAction SilentlyContinue)" >> $env:GITHUB_OUTPUT - - name: Artifact - WER crash dumps + - name: Artifact - Process Dumps uses: actions/upload-artifact@v4 if: ${{ (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }} with: name: CrashDumps-${{ matrix.multitarget }}-winui${{ matrix.winui }} - path: '${{ github.workspace }}/CrashDumps' + path: ${{ env.PROCDUMP_PATH }}/**/*.dmp + + - name: Artifact - vstest-diagnostic-log + uses: actions/upload-artifact@v4 + if: always() + with: + name: 'vstest-diagnostic-log-${{ matrix.multitarget }}-winui${{ matrix.winui }}.txt' + path: '${{ github.workspace }}/vstest-diagnostic-log.txt' - name: Analyze Dump if: ${{ steps.detect-dump.outputs.DUMP_FILE != '' && (env.ENABLE_DIAGNOSTICS == 'true' || env.COREHOST_TRACE != '') && always() }}