Skip to content

refactor: use std::vector instead of unique_ptr with custom deleter #686

refactor: use std::vector instead of unique_ptr with custom deleter

refactor: use std::vector instead of unique_ptr with custom deleter #686

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"]
echion-alt-vm-force: ["1", "0"]
name: Tests with Python ${{ matrix.python-version }}, ECHION_ALT_VM_FORCE=${{ matrix.echion-alt-vm-force }} 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 update
sudo apt-get install -y gdb liblzma-dev
sudo -E bash scripts/build_libunwind.sh
pip install pygments
- name: Install Hatch
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # install branch
- name: Run tests
run: |
ulimit -c unlimited
echo "core.%p" | sudo tee /proc/sys/kernel/core_pattern
sudo -E env PATH="$PATH" ECHION_ALT_VM_READ_FORCE=${{ matrix.echion-alt-vm-force }} 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.echion-alt-vm-force }}
path: profiles/
overwrite: true
if: always()
- name: Print core dumps
run: |
ls -l core.* || pwd
for core in core.*; do
gdb -q -batch -ex "bt full" -ex q `which python${{ matrix.python-version }}` ${core} | pygmentize
done
if: always()
# - 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"]
name: Tests with Python ${{ matrix.python-version }} 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: 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 }}
path: profiles/
overwrite: true
if: always()