feat: support Python 3.12 #179
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"] | |
name: Tests with Python ${{ matrix.python-version }} on Linux | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: main | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }}-dev | |
- name: Checkout Austin development branch | |
uses: actions/checkout@master | |
with: | |
repository: P403n1x87/austin | |
ref: devel | |
path: austin | |
- name: Compile Austin | |
run: | | |
cd $GITHUB_WORKSPACE/austin | |
gcc -Wall -O3 -Os -s -pthread src/*.c -o src/austin | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y binutils binutils-common | |
addr2line -V | |
- name: Run tests | |
run: | | |
cd $GITHUB_WORKSPACE/main | |
export PATH="$GITHUB_WORKSPACE/austin/src:$PATH" | |
pip install hatch | |
hatch -e "tests.py${{ matrix.python-version }}" run tests | |
- 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"] | |
name: Tests with Python ${{ matrix.python-version }} on MacOS | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: main | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }}-dev | |
- name: Checkout Austin development branch | |
uses: actions/checkout@master | |
with: | |
repository: P403n1x87/austin | |
ref: devel | |
path: austin | |
- name: Compile Austin | |
run: | | |
cd $GITHUB_WORKSPACE/austin | |
gcc -Wall -O3 -Os src/*.c -o src/austin | |
- name: Remove signature from the Python binary | |
run: | | |
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/bin/python3 || true | |
codesign --remove-signature /Library/Frameworks/Python.framework/Versions/${{ matrix.python-version }}/Resources/Python.app/Contents/MacOS/Python || true | |
- name: Run tests | |
run: | | |
cd $GITHUB_WORKSPACE/main | |
export PATH="$GITHUB_WORKSPACE/austin/src:$PATH" | |
pip install hatch | |
sudo hatch -e "tests.py${{ matrix.python-version }}" run tests | |
tests-win: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
name: Tests with Python ${{ matrix.python-version }} on Windows | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
path: main | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }}-dev | |
- name: Checkout Austin development branch | |
uses: actions/checkout@master | |
with: | |
repository: P403n1x87/austin | |
ref: devel | |
path: austin | |
- name: Compile Austin on Windows | |
run: | | |
cd $env:GITHUB_WORKSPACE/austin | |
gcc.exe -O3 -o src/austin.exe src/*.c -lpsapi -lntdll -Wall -Os -s | |
- name: Run tests on Windows | |
run: | | |
cd $env:GITHUB_WORKSPACE/main | |
$env:PATH="$env:GITHUB_WORKSPACE\austin\src;$env:PATH" | |
pip install hatch | |
hatch -e "tests.py${{ matrix.python-version }}" run tests |