Skip to content

Commit

Permalink
Merge pull request #215 from clEsperanto/update-wheel-deployement
Browse files Browse the repository at this point in the history
update pyproject and workflow
  • Loading branch information
StRigaud authored Jul 11, 2024
2 parents f3c0f8c + bf5cfe6 commit ac1d441
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 9 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ jobs:
env:
CIBW_ARCHS_MACOS: x86_64 arm64

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: artifacts-${{ matrix.os }}

build_sdist:
name: build dist
Expand All @@ -53,16 +54,15 @@ jobs:
- name: Build sdist
run: pipx run build --sdist

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

upload_all:
name: publish (PyPI)
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# upload to PyPI on release event
if: github.event_name == 'release' && success()
steps:
Expand All @@ -72,8 +72,9 @@ jobs:

- uses: actions/download-artifact@v4
with:
name: artifact
pattern: artifacts-*
path: dist
merge-multiple: true

- uses: pypa/[email protected]
with:
Expand Down
25 changes: 21 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,24 @@ addopts = "-ra -q"
testpaths = ["tests"]

[tool.cibuildwheel]
build = ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
build = [
"cp37-*",
"cp38-*",
"cp39-*",
"cp310-*",
"cp311-*",
"cp312-*",
"cp313-*",
]
skip = [
"cp27-*",
"cp36*",
"pp*",
"*-win32",
"*-musllinux*",
"*_i686",
"*_universal2",
]
build-frontend = "build"
build-verbosity = 1
test-command = "pytest {project}/tests/test_import.py"
Expand All @@ -64,16 +81,16 @@ test-requires = ["pytest", "pytest-cov", "pytest-benchmark", "scikit-image"]
[tool.cibuildwheel.linux]
before-all = ["bash {package}/scripts/build-opencl-linux.sh"]
repair-wheel-command = "auditwheel show {wheel} && auditwheel repair --lib-sdir .libs -w {dest_dir} {wheel}"
skip = ["cp27-*", "pp*", "*-musllinux*", "*_i686"]
# skip = ["cp27-*", "pp*", "*-musllinux*", "*_i686"]

[tool.cibuildwheel.windows]
before-all = "bash {package}/scripts/build-opencl-windows.sh"
environment = { SKBUILD_CMAKE_ARGS = "-DOpenCL_LIBRARIES:FILEPATH='C:/Program Files/OpenCL-ICD-Loader/lib/OpenCL.lib';-DOpenCL_INCLUDE_DIRS:PATH='C:/Program Files/OpenCL-ICD-Loader/include/'" }
skip = ["cp27-*", "pp*", "*-win32"]
# skip = ["cp27-*", "pp*", "*-win32"]

[tool.cibuildwheel.macos]
environment = { MACOSX_DEPLOYMENT_TARGET = '10.14' }
skip = ["cp27-*", "pp*", "*_universal2"]
# skip = ["cp27-*", "pp*", "*_universal2"]

[tool.isort]
profile = "black"

0 comments on commit ac1d441

Please sign in to comment.