Skip to content

Commit

Permalink
moved over to cibuildwheel to support systems; Bump version to 1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkusRainerSchmidt committed Oct 24, 2023
1 parent f444a46 commit 5ff650b
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 254 deletions.
98 changes: 21 additions & 77 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ permissions:
contents: read

jobs:
build-sourcedist:
build_sourcedist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -40,88 +40,32 @@ jobs:
name: dist
path: ./dist

build-ubuntu:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
build_wheels:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["cp36-cp36m", "cp37-cp37m", "cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311", "cp312-cp312"]
steps:
- uses: actions/checkout@v3
- name: Update submodules
run: |
git config --global --add safe.directory '*'
git submodule update --init --recursive
- name: Install dependencies
run: |
/opt/python/${{ matrix.python-version }}/bin/python -m pip install --upgrade pip
/opt/python/${{ matrix.python-version }}/bin/python -m pip install wheel pybind11 auditwheel
- name: Build package
run: |
/opt/python/${{ matrix.python-version }}/bin/python -m pip wheel . -w dist
- name: Audit wheel
run: |
/opt/python/${{ matrix.python-version }}/bin/python -m auditwheel repair --strip --plat manylinux2014_x86_64 --exclude libgomp.so.1 dist/*.whl
rm -r dist
mv wheelhouse dist
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist
os: [ubuntu-20.04, windows-2019, macos-11]

build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Update submodules
run: git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel pybind11
- name: Build package
run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist

build-mac:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Update submodules
run: git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel pybind11
- name: Build package
run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist
- uses: actions/checkout@v3
with:
submodules: true

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_BUILD: '{cp37-*,cp38-*,cp39-*,cp310-*,cp311-*}'
CIBW_BEFORE_BUILD: 'pip install pybind11'
MACOSX_DEPLOYMENT_TARGET : '10.13'
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"

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

publish-pypi:
needs: [build-ubuntu, build-windows, build-mac, build-sourcedist]
needs: [build_wheels, build_sourcedist]
runs-on: ubuntu-20.04

steps:
Expand Down
76 changes: 0 additions & 76 deletions .github/workflows/test-cibuildwheel.yml

This file was deleted.

120 changes: 20 additions & 100 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,112 +15,32 @@ permissions:
contents: read

jobs:
build-sourcedist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Update submodules
run: |
git config --global --add safe.directory '*'
git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.9
- name: Install dependencies
run: |
pip install --upgrade pip
pip install wheel pybind11 auditwheel build
- name: Build package
run: |
python -m build --sdist -o dist
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist

build-ubuntu:
runs-on: ubuntu-latest
container: quay.io/pypa/manylinux2014_x86_64
build_wheels:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ["cp36-cp36m", "cp37-cp37m", "cp38-cp38", "cp39-cp39", "cp310-cp310", "cp311-cp311", "cp312-cp312"]
steps:
- uses: actions/checkout@v3
- name: Update submodules
run: |
git config --global --add safe.directory '*'
git submodule update --init --recursive
- name: Install dependencies
run: |
/opt/python/${{ matrix.python-version }}/bin/python -m pip install --upgrade pip
/opt/python/${{ matrix.python-version }}/bin/python -m pip install wheel auditwheel pybind11
- name: Build package
run: |
/opt/python/${{ matrix.python-version }}/bin/python setup.py bdist_wheel -vvv
- name: Audit wheel
run: |
/opt/python/${{ matrix.python-version }}/bin/python -m auditwheel repair --strip --plat manylinux2014_x86_64 --exclude libgomp.so.1 dist/*.whl
rm -r dist
mv wheelhouse dist
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist
os: [ubuntu-20.04, windows-2019, macos-11]

build-windows:
runs-on: windows-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Update submodules
run: git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install wheel pybind11
- name: Build package
run: python setup.py bdist_wheel -vvv
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist
- uses: actions/checkout@v3
with:
submodules: true

- name: Build wheels
uses: pypa/cibuildwheel@v2.16.2
env:
CIBW_BUILD: '{cp37-*,cp38-*,cp39-*,cp310-*,cp311-*}'
CIBW_BEFORE_BUILD: 'pip install pybind11'
MACOSX_DEPLOYMENT_TARGET : '10.13'
CIBW_ARCHS_MACOS: "x86_64 universal2 arm64"

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

build-mac:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- name: Update submodules
run: git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install wheel pybind11
- name: Build package
run: python setup.py bdist_wheel
- uses: actions/upload-artifact@v3
with:
name: dist
path: ./dist

publish-testpypi:
needs: [build-ubuntu, build-windows, build-mac, build-sourcedist]
needs: [build_wheels]
runs-on: ubuntu-20.04
steps:
- uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.0.0
1.0.1

0 comments on commit 5ff650b

Please sign in to comment.