refactor: fix compile errors when used from ddtrace #541
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@v4 | |
- uses: actions/setup-python@v4 | |
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@install | |
- 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@v4 | |
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@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }}-dev | |
- name: Install Hatch | |
uses: pypa/hatch@install | |
- name: Run tests | |
run: sudo -E hatch run tests.py${{ matrix.python-version }}:tests -svv | |
- name: Upload profiles | |
uses: actions/upload-artifact@v4 | |
with: | |
name: profiles-${{ runner.os }}-${{ matrix.python-version }} | |
path: profiles/ | |
overwrite: true | |
if: always() |