Skip to content

Commit

Permalink
chore: attempt to fix build wheel pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
unmonoqueteclea committed Feb 5, 2024
1 parent 0881c0f commit 4ce3d36
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.9,3.10,3.11]
python: ['3.9','3.10','3.11']
env:
TF_CPP_MIN_LOG_LEVEL: 2

Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,24 @@ jobs:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_ARCHS_LINUX: auto aarch64
CIBW_BUILD: cp38-* cp39-* cp310-*
CIBW_BUILD: cp310-* cp311-* # build for Python 3.10 and Python 3.11
CIBW_BUILD_VERBOSITY: 1
# Right now, cp310 isn't building properly on aarch64
# right now, cp310 isn't building properly on aarch64
CIBW_SKIP: cp36-* *-win32 *-manylinux_i686 pp* *musllinux* cp310-*_aarch64
CIBW_BEFORE_ALL_LINUX: 'POLICY_JSON=$(find / -name manylinux-policy.json); sed -i "s/libresolv.so.2\"/libresolv.so.2\",\"libtensorflow_framework.so.1\", \"libtensorflow_framework.so.2\"/g" $POLICY_JSON'
CIBW_ARCHS_MACOS: x86_64 arm64 # arm64 for Apple Sillicon support
CIBW_ARCHS_LINUX: auto aarch64 # allowing arm processors
CIBW_REPAIR_WHEEL_COMMAND_MACOS: 'delocate-listdeps {wheel} && delocate-wheel --require-archs {delocate_archs} --ignore-missing-dependencies -w {dest_dir} {wheel}'
CIBW_TEST_REQUIRES: pytest scikit-learn
# not needed because those packages are already in package requirements
# CIBW_TEST_REQUIRES: pytest scikit-learn
CIBW_TEST_COMMAND: 'cd {package} && pytest -sv tests/test_tree.py && pytest -sv tests/test_wrappers.py'
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
# we will be able to include ubuntu-latest when we fix this issue
# https://github.com/bigmlcom/sensenet/issues/37
os: [macos-latest]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up QEMU
if: runner.os == 'Linux'
Expand All @@ -32,22 +34,22 @@ jobs:
platforms: all

- name: Build wheels
uses: pypa/cibuildwheel@v2.4.0
uses: pypa/cibuildwheel@v2.16.5

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

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build --sdist

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

Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,6 @@ requires=[
[tool.black]
line-length = 80
target-version = ['py311']

[tool.cibuildwheel.linux]
repair-wheel-command = "auditwheel repair --exclude libtensorflow_framework.so.2 --exclude libtensorflow_framework.so.1 --exclude libtensorflow_framework.so -w {dest_dir} {wheel}"
6 changes: 4 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
"""

import os
import sys
import platform
import sys

import pkg_resources
import setuptools

from sensenet import __version__, __tree_ext_prefix__
from sensenet import __tree_ext_prefix__, __version__

here = os.path.abspath(os.path.dirname(__file__))

Expand Down Expand Up @@ -78,6 +79,7 @@
long_description_content_type="text/markdown",
packages=setuptools.find_packages(),
package_data={"sensenet": ["sensenet_metadata.json.gz"]},
python_requires=">=3.9",
ext_modules=modules,
install_requires=deps,
)

0 comments on commit 4ce3d36

Please sign in to comment.