Skip to content

Commit

Permalink
Merge pull request #116 from AllenCellModeling/fix/cibuildwheel
Browse files Browse the repository at this point in the history
update cibuildwheel to fix windows build
  • Loading branch information
toloudis authored Apr 16, 2024
2 parents d6a926f + dfed18e commit 9653ae9
Showing 1 changed file with 39 additions and 40 deletions.
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/[email protected]
with:
user: aicspypi
password: ${{ secrets.PYPI_TOKEN }}
- uses: pypa/[email protected]
with:
user: aicspypi
password: ${{ secrets.PYPI_TOKEN }}

0 comments on commit 9653ae9

Please sign in to comment.