Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update cibuildwheel to fix windows build #116

Merged
merged 1 commit into from
Apr 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 39 additions & 40 deletions .github/workflows/py-build-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,20 +61,19 @@ jobs:
needs: [python-test, lint]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true

- name: Build SDist
run: pipx run build --sdist
- uses: actions/checkout@v4
with:
submodules: true

- name: Check metadata
run: pipx run twine check dist/*
- name: Build SDist
run: pipx run build --sdist

- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
- name: Check metadata
run: pipx run twine check dist/*

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

build_wheels:
name: Wheels on ${{ matrix.cibw-arch }}
Expand All @@ -96,26 +95,26 @@ jobs:
cibw-arch: win_amd64

steps:
- uses: actions/checkout@v4
with:
submodules: true

- uses: pypa/cibuildwheel@v2.12.1
env:
CIBW_BUILD: "*-${{ matrix.cibw-arch }}"
CIBW_BEFORE_ALL_LINUX: yum install -y zlib-devel libpng-devel
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: pytest {project}/aicspylibczi/tests
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CMAKE_OSX_ARCHITECTURES: ${{ matrix.cibw-arch == 'macosx_x86_64' && 'x86_64' || matrix.cibw-arch == 'macosx_arm64' && 'arm64' || matrix.cibw-arch == 'macosx_universal2' && 'arm64;x86_64' || '' }}
- name: Verify clean directory
run: git diff --exit-code
shell: bash

- name: Upload wheels
uses: actions/upload-artifact@v3
with:
path: wheelhouse/*.whl
- uses: actions/checkout@v4
with:
submodules: true

- uses: pypa/cibuildwheel@v2.17.0
env:
CIBW_BUILD: "*-${{ matrix.cibw-arch }}"
CIBW_BEFORE_ALL_LINUX: yum install -y zlib-devel libpng-devel
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: pytest {project}/aicspylibczi/tests
CIBW_ARCHS_MACOS: x86_64 universal2 arm64
CMAKE_OSX_ARCHITECTURES: ${{ matrix.cibw-arch == 'macosx_x86_64' && 'x86_64' || matrix.cibw-arch == 'macosx_arm64' && 'arm64' || matrix.cibw-arch == 'macosx_universal2' && 'arm64;x86_64' || '' }}
- name: Verify clean directory
run: git diff --exit-code
shell: bash

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

upload_all:
name: Upload if release
Expand All @@ -124,14 +123,14 @@ jobs:
if: "contains(github.event.head_commit.message, 'Bump version')"

steps:
- uses: actions/setup-python@v5
- uses: actions/setup-python@v5

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

- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: aicspypi
password: ${{ secrets.PYPI_TOKEN }}
- uses: pypa/gh-action-pypi-publish@v1.4.2
with:
user: aicspypi
password: ${{ secrets.PYPI_TOKEN }}
Loading