Skip to content

Commit 3ff8195

Browse files
authored
Update main.yml
1 parent b457c8f commit 3ff8195

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

.github/workflows/main.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ jobs:
6060

6161
- uses: actions/[email protected]
6262

63+
- name: Enable core dumps
64+
if: matrix.name == 'linux'
65+
run: |
66+
ulimit -c unlimited
67+
echo '/tmp/core.%e.%p' | sudo tee /proc/sys/kernel/core_pattern
68+
6369
- uses: msys2/[email protected]
6470
if: matrix.os == 'windows-latest'
6571
with:
@@ -133,8 +139,23 @@ jobs:
133139
134140
- name: test sqlite-sync
135141
if: matrix.name == 'linux' || matrix.name == 'windows'
142+
continue-on-error: true # so workflow doesn't stop on segfault
136143
run: make test
137144

145+
- name: Run test and generate core dump
146+
if: matrix.name == 'linux'
147+
continue-on-error: true # so workflow doesn't stop on segfault
148+
run: |
149+
./dist/main || echo "segfault occurred"
150+
ls -lh /tmp/core.*
151+
152+
- name: Upload core dump
153+
if: always() # upload even if previous step failed
154+
uses: actions/upload-artifact@v4
155+
with:
156+
name: core-dump
157+
path: /tmp/core.*
158+
138159
- name: test sqlite-sync + coverage
139160
if: matrix.name == 'macos'
140161
run: brew install lcov && make test COVERAGE=true
@@ -277,4 +298,4 @@ jobs:
277298
cloudsync-*-${{ steps.tag.outputs.version }}.tar.xz
278299
cloudsync-*-${{ steps.tag.outputs.version }}.tar.gz
279300
sqlite-*-sync-${{ steps.tag.outputs.version }}-wasm.zip
280-
make_latest: true
301+
make_latest: true

0 commit comments

Comments
 (0)