chore: add codspeed benchmarks (#340)

This commit is contained in:
J. Nick Koston
2025-01-07 10:52:53 -10:00
committed by GitHub
parent 1c20dcc504
commit 5bf90b9fb1
5 changed files with 247 additions and 5 deletions

View File

@@ -48,13 +48,12 @@ jobs:
- "use_cython"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Update apt
run: sudo apt update
- name: Install libs
run: sudo apt-get install -y dbus-daemon python3-gi libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
- name: Install poetry
run: pipx install poetry
- uses: snok/install-poetry@v1.3.4
- name: Set up Python
uses: actions/setup-python@v5
with:
@@ -75,6 +74,30 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}
benchmark:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update apt
run: sudo apt update
- name: Install libs
run: sudo apt-get install -y dbus-daemon python3-gi libgirepository1.0-dev gcc libcairo2-dev pkg-config python3-dev gir1.2-gtk-3.0
- uses: snok/install-poetry@v1.3.4
- name: Setup Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: "poetry"
- name: Install Dependencies
run: |
REQUIRE_CYTHON=1 poetry install --only=main,dev
shell: bash
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: dbus-run-session -- poetry run pytest --no-cov -vvvvv --codspeed tests/benchmarks
release:
runs-on: ubuntu-latest
environment: release