CI: upload a process minidump in case something crashes
In case something crashes in CI this will show us some information on which program crashed and why. We register procdump as a JIT debugger which dumps the process memory into a new file if triggered. To enable the JIT debugger in the context of cygwin we need to set MSYS=winjitdebug. The resulting dump file can for example be analyzed with minidump-stackwalk or minidump_stackwalk
This commit is contained in:
22
.github/workflows/main.yml
vendored
22
.github/workflows/main.yml
vendored
@@ -24,11 +24,23 @@ jobs:
|
||||
]
|
||||
name: ${{ matrix.msystem }}
|
||||
runs-on: ${{ matrix.runner }}
|
||||
env:
|
||||
MSYS: winjitdebug
|
||||
steps:
|
||||
- name: Get CPU Name
|
||||
run : |
|
||||
Get-CIMInstance -Class Win32_Processor | Select-Object -Property Name
|
||||
|
||||
- name: Setup JIT minidump
|
||||
if: ${{ matrix.msystem != 'CLANGARM64' }}
|
||||
run: |
|
||||
Set-Location '${{ runner.temp }}'
|
||||
Invoke-WebRequest -Uri 'https://download.sysinternals.com/files/Procdump.zip' -OutFile Procdump.zip
|
||||
Expand-Archive Procdump.zip -DestinationPath .
|
||||
New-Item -Path '_dumps' -ItemType Directory
|
||||
.\procdump64.exe -accepteula -ma -i "${{ runner.temp }}/_dumps"
|
||||
.\procdump.exe -accepteula -ma -i "${{ runner.temp }}/_dumps"
|
||||
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
path: temp
|
||||
@@ -81,10 +93,20 @@ jobs:
|
||||
MINGW_ARCH=${{ matrix.msystem }} ./.ci/ci-build.sh
|
||||
|
||||
- name: "Upload binaries"
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.msystem }}-packages
|
||||
path: C:/_/artifacts/*.pkg.tar.*
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: "Upload dumps"
|
||||
if: ${{ !cancelled() }}
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.msystem }}-dumps
|
||||
path: ${{ runner.temp }}/_dumps/*.dmp
|
||||
if-no-files-found: ignore
|
||||
|
||||
- name: "Clean up runner"
|
||||
if: ${{ always() }}
|
||||
|
||||
Reference in New Issue
Block a user