diff --git a/.github/workflows/pip-packaging-linux.yml b/.github/workflows/pip-packaging-linux.yml index eb2c6edc0e..7631936517 100644 --- a/.github/workflows/pip-packaging-linux.yml +++ b/.github/workflows/pip-packaging-linux.yml @@ -19,6 +19,7 @@ jobs: # numpy~=1.21.4 means any numpy=1.21.*, but also numpy>=1.21.4 (numpy~=1.21 do not work as it means any numpy==1.*) - name: Build wheel for Python 3.8 run: | + rm -rf src/python/gudhi/*.cpp mkdir build_38 cd build_38 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON38/bin/python .. @@ -36,6 +37,7 @@ jobs: $PYTHON38/bin/python -m pytest -v src/python/test/test_rips_complex.py - name: Build wheel for Python 3.9 run: | + rm -rf src/python/gudhi/*.cpp mkdir build_39 cd build_39 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON39/bin/python .. @@ -57,6 +59,7 @@ jobs: $PYTHON39/bin/python -m pytest -v src/python/test/test_rips_complex.py - name: Build wheel for Python 3.10 run: | + rm -rf src/python/gudhi/*.cpp mkdir build_310 cd build_310 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON310/bin/python .. @@ -74,6 +77,7 @@ jobs: $PYTHON310/bin/python -m pytest -v src/python/test/test_rips_complex.py - name: Build wheel for Python 3.11 run: | + rm -rf src/python/gudhi/*.cpp mkdir build_311 cd build_311 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON311/bin/python .. @@ -91,6 +95,7 @@ jobs: $PYTHON311/bin/python -m pytest -v src/python/test/test_rips_complex.py - name: Build wheel for Python 3.12 run: | + rm -rf src/python/gudhi/*.cpp mkdir build_312 cd build_312 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON312/bin/python .. diff --git a/.github/workflows/pip-packaging-osx.yml b/.github/workflows/pip-packaging-osx.yml index c847c75fa1..b919b32bca 100644 --- a/.github/workflows/pip-packaging-osx.yml +++ b/.github/workflows/pip-packaging-osx.yml @@ -9,11 +9,9 @@ env: _PYTHON_HOST_PLATFORM: macosx-12.0-universal2 ARCHFLAGS: "-arch arm64 -arch x86_64" -# Python 3.8 specific case where NumPy 2.x will not be supported -# NumPy packages for osx x86 and arm are only available from 1.21.2, but stable for both versions from 1.21.4 and python 3.8+ -# numpy~=1.21.4 means any numpy=1.21.*, but also numpy>=1.21.4 (numpy~=1.21 do not work as it means any numpy==1.*) jobs: - build: + # Python 3.8 specific case where NumPy 2.x will not be supported + wheels_3_8: # Should use macos-latest, but python 3.8 and 3.9 is no more available from macos-14 runs-on: macos-13 name: Build wheels for Python 3.8 @@ -25,6 +23,8 @@ jobs: with: python-version: 3.8 architecture: x64 + # NumPy packages for osx x86 and arm are only available from 1.21.2, but stable for both versions from 1.21.4 and python 3.8+ + # numpy~=1.21.4 means any numpy=1.21.*, but also numpy>=1.21.4 (numpy~=1.21 do not work as it means any numpy==1.*) - name: Install dependencies run: | brew update || true @@ -65,10 +65,9 @@ jobs: delocate-wheel --require-archs universal2 -w wheelhouse build/src/python/dist/*.whl python -m twine upload wheelhouse/*.whl -# Python 3.9+ specific case where NumPy 2.x will be supported -# NumPy packages for osx x86 and arm are only available from 1.21.2, but stable for both versions from 1.21.4 and python 3.8+ -jobs: - build: + # Python 3.9+ specific case where NumPy 2.x will be supported + # NumPy packages for osx x86 and arm are only available from 1.21.2, but stable for both versions from 1.21.4 and python 3.8+ + wheels: # Should use macos-latest, but python 3.8 and 3.9 is no more available from macos-14 runs-on: macos-13 strategy: @@ -93,6 +92,8 @@ jobs: with: python-version: ${{ matrix.python-version }} architecture: x64 + # For python >=3.9, numpy >= 2.0 for package build and ABI compatibility with numpy 1.X and 2.X + # cf. https://numpy.org/doc/stable/dev/depending_on_numpy.html#numpy-2-0-specific-advice - name: Install dependencies run: | brew update || true @@ -113,6 +114,7 @@ jobs: cmake -DCMAKE_BUILD_TYPE=Release -DPython_ADDITIONAL_VERSIONS=3 .. cd src/python python -m build -n -w + # Test ABI compatibility with numpy 1.X - name: Install and test python wheel run: | python -m pip install --user numpy~=${{ matrix.numpy-version }} diff --git a/.github/workflows/pip-packaging-windows.yml b/.github/workflows/pip-packaging-windows.yml index 4b6544ad2a..f186f82ee0 100644 --- a/.github/workflows/pip-packaging-windows.yml +++ b/.github/workflows/pip-packaging-windows.yml @@ -4,10 +4,10 @@ on: release: types: [published] -# Python 3.8 specific case where NumPy 2.x will not be supported -# numpy~=1.21.4 means any numpy=1.21.*, but also numpy>=1.21.4 (numpy~=1.21 do not work as it means any numpy==1.*) jobs: - build: + # Python 3.8 specific case where NumPy 2.x will not be supported + # numpy~=1.21.4 means any numpy=1.21.*, but also numpy>=1.21.4 (numpy~=1.21 do not work as it means any numpy==1.*) + wheels_3_8: runs-on: windows-latest name: Build wheels for Python 3.8 steps: @@ -58,9 +58,8 @@ jobs: TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: python -m twine upload build/src/python/dist/*.whl -# Python 3.9+ specific case where NumPy 2.x will be supported -jobs: - build: + # Python 3.9+ specific case where NumPy 2.x will be supported + wheels: runs-on: windows-latest strategy: max-parallel: 4