Skip to content

feat: show top c frame #1162

feat: show top c frame

feat: show top c frame #1162

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
tests-linux:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
mode: ["normal", "alt-vm-force", "fast-memcpy"]
name: Tests with Python ${{ matrix.python-version }}, mode=${{ matrix.mode }} on ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}-dev
- name: Install dependencies
run: |
sudo apt-get remove man-db
sudo apt-get update
sudo apt-get install -y --no-install-recommends gdb liblzma-dev
sudo -E bash scripts/build_libunwind.sh
pip install pygments
- name: Install Hatch
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # install branch
- name: Set core dump file pattern
run: |
sudo echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern
sudo bash -c 'ulimit -c unlimited && python3 -c "import ctypes;ctypes.string_at(0)" || true'
ls core.*
rm core.*
- name: Run tests
run: |
sudo echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern
if [ "${{ matrix.mode }}" = "alt-vm-force" ]; then
ENV_VARS="ECHION_ALT_VM_READ_FORCE=1"
elif [ "${{ matrix.mode }}" = "fast-memcpy" ]; then
ENV_VARS="ECHION_USE_FAST_COPY_MEMORY=1"
else
ENV_VARS="ECHION_ALT_VM_READ_FORCE=0"
fi
sudo -E env PATH="$PATH" bash -c "$ENV_VARS ulimit -c unlimited && hatch run tests.py${{ matrix.python-version }}:tests -svv"
- name: Upload profiles
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: profiles-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.mode }}
path: profiles/
overwrite: true
if: always()
- name: Print core dumps
run: |
ls -l core.* || pwd
for core in core.*; do
sudo gdb -q -batch -ex "bt full" -ex q `which python${{ matrix.python-version }}` ${core} | pygmentize
done
if: failure()
# - name: Publish coverage metrics
# run: |
# cd $GITHUB_WORKSPACE/main
# hatch -e coverage run cov
# hatch -e coverage run codecov
# if: matrix.python-version == '3.10'
# env:
# CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
tests-macos:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
mode: ["normal", "fast-memcpy"]
name: Tests with Python ${{ matrix.python-version }}, mode=${{ matrix.mode }} on macos-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python-version }}-dev
- name: Install Hatch
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # install branch
- name: Run tests
run: |
if [ "${{ matrix.mode }}" = "fast-memcpy" ]; then
export ECHION_USE_FAST_COPY_MEMORY=1
fi
sudo -E hatch run tests.py${{ matrix.python-version }}:tests -svv
- name: Upload profiles
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: profiles-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.mode }}
path: profiles/
overwrite: true
if: always()