Skip to content

Commit c52da65

Browse files
committed
feat: enable coredump generation
1 parent f7934a3 commit c52da65

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -242,6 +242,22 @@ jobs:
242242
exit 1
243243
fi
244244
245+
- name: Enable core dump generation (Linux)
246+
if: runner.os == 'Linux'
247+
run: |
248+
sudo sysctl -w kernel.core_pattern="core.${{ matrix.python-version }}.${{ matrix.runner.toolkit }}.%P"
249+
sudo sysctl -w kernel.core_uses_pid=0
250+
sudo sysctl -w fs.suid_dumpable=1
251+
sysctl kernel.core_pattern kernel.core_uses_pid fs.suid_dumpable
252+
253+
- name: Enable core dump generation (macOS)
254+
if: runner.os == 'macOS'
255+
run: |
256+
sudo sysctl -w kern.corefile="core.${{ matrix.python-version }}.${{ matrix.runner.toolkit }}.%P"
257+
sudo sysctl -w kern.coredump=1
258+
sudo sysctl -w kern.sugid_coredump=1
259+
sysctl kern.corefile kern.coredump kern.sugid_coredump
260+
245261
- name: Install project (wheel form)
246262
env:
247263
UV_NO_BUILD_ISOLATION: "1"
@@ -282,3 +298,12 @@ jobs:
282298
cd testing/python
283299
unset PYTHONPATH
284300
uv run --no-project -m -- pytest -k metal -v -r fE --durations=0 --cache-clear --timeout=3600
301+
302+
- name: List generated files
303+
if: ${{ !cancelled() }}
304+
run: |
305+
find . -type f -name '*.py[cod]' -delete
306+
find . -depth -type d -name "__pycache__" -exec rm -r "{}" +
307+
if git status --ignored --porcelain | grep -qvE '/$'; then
308+
ls -alh $(git status --ignored --porcelain | grep -vE '/$' | grep -oE '\S+$')
309+
fi

.github/workflows/pr-perfbench-bot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
fetch-depth: 0
2828
submodules: recursive
2929

30-
- name: Set up Python
30+
- name: Setup Python
3131
uses: actions/setup-python@v6
3232
with:
3333
python-version: "3.9"

.github/workflows/publish-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fetch-depth: 0
2424
submodules: recursive
2525

26-
- name: Set up Python
26+
- name: Setup Python
2727
uses: actions/setup-python@v6
2828
with:
2929
python-version: "3.10"

0 commit comments

Comments
 (0)