Skip to content

Commit

Permalink
Merge pull request #17 from markgras/feature/add-python-3.12-support
Browse files Browse the repository at this point in the history
Update CI Workflow and Add Python3.12 Support
  • Loading branch information
qchateau authored Dec 9, 2023
2 parents 3d565d5 + e58ba55 commit d96b078
Show file tree
Hide file tree
Showing 13 changed files with 94 additions and 714 deletions.
13 changes: 0 additions & 13 deletions .ci/build-linux-sdist.sh

This file was deleted.

8 changes: 4 additions & 4 deletions .ci/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ set -e -x

export COVERAGE=1

python -m pip install -U -r dev-requirements.txt
python -m pip install .[test]
python -m pip install -U cpp-coveralls
python setup.py install

# move to a different directory to avoid picking-up the local files
# Move to a different directory to avoid picking-up the local files.
# Alternatively, in Python 3.11+ use the interpreter's -P option to ignore local files.
mkdir ci-coverage && cd ci-coverage
python -m nose2 cbitstruct
python -m unittest discover cbitstruct
coveralls --exclude clinic --gcov-options '\-lp'
6 changes: 0 additions & 6 deletions .ci/performance.sh

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Python package build and publish

on: push

jobs:
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz

build_wheels:
name: Build and test manylinux wheels
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build wheels
uses: pypa/[email protected]

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

publish_pypi:
name: Publish sdist and wheels to PyPI
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
39 changes: 0 additions & 39 deletions .github/workflows/manylinux.yml

This file was deleted.

2 changes: 0 additions & 2 deletions cbitstruct/_cbitstruct.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,8 +833,6 @@ typedef struct {
#include "clinic/_cbitstruct.c.37.h"
#elif PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION == 6
#include "clinic/_cbitstruct.c.36.h"
#elif PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION <= 5
#include "clinic/_cbitstruct.c.35.h"
#else
#error "Unsupported python version"
#endif
Expand Down
Loading

0 comments on commit d96b078

Please sign in to comment.