Skip to content

Commit

Permalink
remove cibw
Browse files Browse the repository at this point in the history
  • Loading branch information
pchanial committed Nov 27, 2024
1 parent e989555 commit 384095f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 41 deletions.
76 changes: 37 additions & 39 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,60 +8,58 @@ on:
branches:
- main
release:
types: [published]
types:
- published

jobs:

build_sdist:
name: Build sdist
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.10, 3.11, 3.12, 3.13]

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout code
uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
- name: Run tests
run: pytest

build_wheels:
name: Build wheels (${{ matrix.python.version }})
build:
name: Build sdist and wheel
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python:
- version: "3.10"
cp: cp310
- version: "3.11"
cp: cp311
- version: "3.12"
cp: cp312
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check out code
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BUILD: ${{ matrix.python.cp }}-*
# CIBW_SKIP: "*-musllinux_*"
CIBW_TEST_EXTRAS: dev
CIBW_TEST_COMMAND: pytest # {package}/tests
- name: Build
run: python -m build

- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
- name: Upload
uses: actions/upload-artifact@v4
with:
path: |
dist/*.tar.gz
dist/*.whl
upload_all:
needs: [build_sdist, build_wheels]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ jobs:
name: Pre-commit hooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "pre-commit"
python -m pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files

0 comments on commit 384095f

Please sign in to comment.