Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
ci: add abi3audit
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed May 22, 2024
1 parent 1838f8e commit 01fca1b
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 12 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,25 @@ jobs:
group: '${{ github.workflow }}-${{ github.ref }}'
cancel-in-progress: true
uses: ./.github/workflows/_build_wheels.yaml

audit:
name: Audit
needs: [ build ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: pip
cache-dependency-path: 'requirements.txt'

- run: pip install -r requirements.txt

- uses: actions/download-artifact@v4
with:
name: wheel
path: dist

- run: abi3audit --verbose dist/*.whl
3 changes: 2 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: 'requirements.txt'

- run: pip install -e '.[testing]'
- run: pip install -r requirements.txt

- run: python -m pytest -sv
6 changes: 0 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,5 @@ classifiers = [
"Programming Language :: Python :: 3 :: Only",
]

[project.optional-dependencies]
testing = [
'pytest==8.2.1',
"pytest-github-actions-annotate-failures==0.2.0",
]

[tool.pytest.ini_options]
pythonpath = ['src']
7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-e .

# testing
pytest==8.2.1
pytest-github-actions-annotate-failures==0.2.0
# build check
abi3audit
1 change: 0 additions & 1 deletion src/bencode_c/common.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#ifndef MY_COMMON_H

#define Py_LIMITED_API 0x03080000
#include <Python.h>

#define HPy_ssize_t Py_ssize_t
Expand Down
6 changes: 2 additions & 4 deletions taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,5 @@ tasks:
CFLAGS: "-O0 -g"
# LD_PRELOAD: libclang_rt.asan.so
cmds:
- cmd: python setup.py build_ext --force --inplace
silent: true
- PYTHONPATH=src python -X faulthandler a.py
# - pytest -x -v -s
- task: dev:build
- pytest -x -v -s

0 comments on commit 01fca1b

Please sign in to comment.