diff options
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/pip-build-linux.yml | 29 | ||||
-rw-r--r-- | .github/workflows/pip-build-osx.yml | 34 | ||||
-rw-r--r-- | .github/workflows/pip-build-windows.yml | 45 | ||||
-rw-r--r-- | .github/workflows/pip-packaging-linux.yml | 86 | ||||
-rw-r--r-- | .github/workflows/pip-packaging-osx.yml | 34 | ||||
-rw-r--r-- | .github/workflows/pip-packaging-windows.yml | 38 |
6 files changed, 190 insertions, 76 deletions
diff --git a/.github/workflows/pip-build-linux.yml b/.github/workflows/pip-build-linux.yml index cf8ddadf..88ca7db3 100644 --- a/.github/workflows/pip-build-linux.yml +++ b/.github/workflows/pip-build-linux.yml @@ -4,18 +4,31 @@ on: [push, pull_request] jobs: build: - name: build pip wheels + name: build pip wheel runs-on: ubuntu-latest + # cf. https://github.com/GUDHI/gudhi-deploy/blob/main/Dockerfile_for_pip container: gudhi/pip_for_gudhi steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - name: Build wheels for Python 3.9 + - name: Build wheel for Python 3.11 run: | - mkdir build_39 - cd build_39 - cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON39/bin/python .. + mkdir build_311 + cd build_311 + cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON311/bin/python .. cd src/python - $PYTHON39/bin/python setup.py bdist_wheel - auditwheel repair dist/*.whl
\ No newline at end of file + $PYTHON311/bin/python -m build -n + auditwheel show dist/*.whl + auditwheel repair dist/*.whl + ls wheelhouse/*.whl + - name: Install and test wheel for Python 3.11 + run: | + $PYTHON311/bin/python -m pip install --user pytest build_311/src/python/wheelhouse/*.whl + $PYTHON311/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON311/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Upload linux python wheel + uses: actions/upload-artifact@v3 + with: + name: linux python wheel + path: build_311/src/python/wheelhouse/*.whl diff --git a/.github/workflows/pip-build-osx.yml b/.github/workflows/pip-build-osx.yml index 50b8b09c..81f516cd 100644 --- a/.github/workflows/pip-build-osx.yml +++ b/.github/workflows/pip-build-osx.yml @@ -2,19 +2,24 @@ name: pip build osx on: [push, pull_request] +env: + MACOSX_DEPLOYMENT_TARGET: 10.14 + _PYTHON_HOST_PLATFORM: macosx-10.14-universal2 + ARCHFLAGS: "-arch arm64 -arch x86_64" + jobs: build: runs-on: macos-latest strategy: max-parallel: 4 matrix: - python-version: ['3.9'] + python-version: ['3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 @@ -22,13 +27,30 @@ jobs: run: | brew update || true brew install boost eigen gmp mpfr cgal || true - python -m pip install --user -r .github/build-requirements.txt - python -m pip install --user twine delocate + python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt + python -m pip install --user build twine delocate + ./scripts/build_osx_universal_gmpfr.sh + # Now the universal libraries are in $PWD/deps-uni/lib - name: Build python wheel run: | + export GMP_LIB_DIR=$PWD/deps-uni/lib + export GMPXX_LIB_DIR=$PWD/deps-uni/lib + export MPFR_LIB_DIR=$PWD/deps-uni/lib python --version mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DPython_ADDITIONAL_VERSIONS=3 .. cd src/python - python setup.py bdist_wheel + python -m build -n + export PATH="$PATH:`python -m site --user-base`/bin" + delocate-wheel --require-archs universal2 -v dist/*.whl + - name: Install and test python wheel + run: | + python -m pip install --user pytest build/src/python/dist/*.whl + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest src/python/test/test_alpha_complex.py + - name: Upload OSx python wheel + uses: actions/upload-artifact@v3 + with: + name: osx python wheel + path: build/src/python/dist/*.whl diff --git a/.github/workflows/pip-build-windows.yml b/.github/workflows/pip-build-windows.yml index aacbbc52..02617e31 100644 --- a/.github/workflows/pip-build-windows.yml +++ b/.github/workflows/pip-build-windows.yml @@ -8,30 +8,45 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.9'] + python-version: ['3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 - name: Install dependencies run: | - vcpkg update - vcpkg upgrade --no-dry-run - type c:/vcpkg/ports/cgal/portfile.cmake + set VCPKG_BUILD_TYPE=release vcpkg install eigen3 cgal --triplet x64-windows - python -m pip install --user -r .github/build-requirements.txt - python -m pip list - - name: Build python wheel + vcpkg version + ls "C:\vcpkg\installed\x64-windows\bin\" + python -m pip install --user -r .\ext\gudhi-deploy\build-requirements.txt + python -m pip install --user build + - name: Build python wheel and install it run: | mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release -DGMP_INCLUDE_DIR="c:/vcpkg/installed/x64-windows/include" -DGMP_LIBRARIES="c:/vcpkg/installed/x64-windows/lib/mpir.lib" -DGMP_LIBRARIES_DIR="c:/vcpkg/installed/x64-windows/lib" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DPython_ADDITIONAL_VERSIONS=3 .. - cd src/python - cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/ - cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/ - python setup.py bdist_wheel
\ No newline at end of file + cd ".\build\" + cmake -DCMAKE_BUILD_TYPE=Release -DFORCE_EIGEN_DEFAULT_DENSE_INDEX_TYPE_TO_INT=ON -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows .. + cd ".\src\python\" + cp "C:\vcpkg\installed\x64-windows\bin\mpfr*.dll" ".\gudhi\" + cp "C:\vcpkg\installed\x64-windows\bin\gmp*.dll" ".\gudhi\" + python -m build -n + ls ".\dist\" + cd ".\dist\" + Get-ChildItem *.whl | ForEach-Object{python -m pip install --user $_.Name} + - name: Test python wheel + run: | + Get-Location + dir + python -m pip install --user pytest + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest ".\src\python\test\test_alpha_complex.py" + - name: Upload Windows python wheel + uses: actions/upload-artifact@v3 + with: + name: windows python wheel + path: build/src/python/dist/*.whl diff --git a/.github/workflows/pip-packaging-linux.yml b/.github/workflows/pip-packaging-linux.yml index 469c3b3b..866f4335 100644 --- a/.github/workflows/pip-packaging-linux.yml +++ b/.github/workflows/pip-packaging-linux.yml @@ -6,60 +6,100 @@ on: jobs: build: - name: build pip wheels + name: build pip wheel runs-on: ubuntu-latest + # cf. https://github.com/GUDHI/gudhi-deploy/blob/main/Dockerfile_for_pip container: gudhi/pip_for_gudhi steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - name: Build wheels for Python 3.5 - run: | - mkdir build_35 - cd build_35 - cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON35/bin/python .. - cd src/python - $PYTHON35/bin/python setup.py bdist_wheel - auditwheel repair dist/*.whl - - name: Build wheels for Python 3.6 + - name: Build wheel for Python 3.6 run: | mkdir build_36 cd build_36 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON36/bin/python .. cd src/python - $PYTHON36/bin/python setup.py bdist_wheel + $PYTHON36/bin/python -m build -n auditwheel repair dist/*.whl - - name: Build wheels for Python 3.7 + - name: Install and test wheel for Python 3.6 + run: | + $PYTHON36/bin/python -m pip install --user pytest build_36/src/python/dist/*.whl + $PYTHON36/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON36/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.7 run: | mkdir build_37 cd build_37 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON37/bin/python .. cd src/python - $PYTHON37/bin/python setup.py bdist_wheel + $PYTHON37/bin/python -m build -n auditwheel repair dist/*.whl - - name: Build wheels for Python 3.8 + - name: Install and test wheel for Python 3.7 + run: | + $PYTHON37/bin/python -m pip install --user pytest build_37/src/python/dist/*.whl + $PYTHON37/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON37/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.8 run: | mkdir build_38 cd build_38 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON38/bin/python .. cd src/python - $PYTHON38/bin/python setup.py bdist_wheel + $PYTHON38/bin/python -m build -n auditwheel repair dist/*.whl - - name: Build wheels for Python 3.9 + - name: Install and test wheel for Python 3.8 + run: | + $PYTHON38/bin/python -m pip install --user pytest build_38/src/python/dist/*.whl + $PYTHON38/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON38/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.9 run: | mkdir build_39 cd build_39 cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON39/bin/python .. cd src/python - $PYTHON39/bin/python setup.py bdist_wheel + $PYTHON39/bin/python -m build -n auditwheel repair dist/*.whl + - name: Install and test wheel for Python 3.9 + run: | + $PYTHON39/bin/python -m pip install --user pytest build_39/src/python/dist/*.whl + $PYTHON39/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON39/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.10 + run: | + mkdir build_310 + cd build_310 + cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON310/bin/python .. + cd src/python + $PYTHON310/bin/python -m build -n + auditwheel repair dist/*.whl + - name: Install and test wheel for Python 3.10 + run: | + $PYTHON310/bin/python -m pip install --user pytest build_310/src/python/dist/*.whl + $PYTHON310/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON310/bin/python -m pytest src/python/test/test_alpha_complex.py + - name: Build wheel for Python 3.11 + run: | + mkdir build_311 + cd build_311 + cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON_EXECUTABLE=$PYTHON311/bin/python .. + cd src/python + $PYTHON311/bin/python -m build -n + auditwheel repair dist/*.whl + - name: Install and test wheel for Python 3.11 + run: | + $PYTHON311/bin/python -m pip install --user pytest build_311/src/python/dist/*.whl + $PYTHON311/bin/python -c "import gudhi; print(gudhi.__version__)" + $PYTHON311/bin/python -m pytest src/python/test/test_alpha_complex.py - name: Publish on PyPi env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | - $PYTHON39/bin/python -m twine upload build_35/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_36/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_37/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_38/src/python/wheelhouse/* - $PYTHON39/bin/python -m twine upload build_39/src/python/wheelhouse/*
\ No newline at end of file + $PYTHON36/bin/python -m twine upload build_36/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_37/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_38/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_39/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_310/src/python/wheelhouse/* + $PYTHON36/bin/python -m twine upload build_311/src/python/wheelhouse/* diff --git a/.github/workflows/pip-packaging-osx.yml b/.github/workflows/pip-packaging-osx.yml index 46441e65..15840c9a 100644 --- a/.github/workflows/pip-packaging-osx.yml +++ b/.github/workflows/pip-packaging-osx.yml @@ -4,19 +4,24 @@ on: release: types: [published] +env: + MACOSX_DEPLOYMENT_TARGET: 10.15 + _PYTHON_HOST_PLATFORM: macosx-10.15-universal2 + ARCHFLAGS: "-arch arm64 -arch x86_64" + jobs: build: runs-on: macos-latest strategy: max-parallel: 4 matrix: - python-version: ['3.5', '3.6', '3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 @@ -24,22 +29,33 @@ jobs: run: | brew update || true brew install boost eigen gmp mpfr cgal || true - python -m pip install --user -r .github/build-requirements.txt - python -m pip install --user twine delocate + python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt + python -m pip install --user build twine delocate + ./scripts/build_osx_universal_gmpfr.sh + # Now the universal libs are in $PWD/deps-uni/lib - name: Build python wheel run: | + export GMP_LIB_DIR=$PWD/deps-uni/lib + export GMPXX_LIB_DIR=$PWD/deps-uni/lib + export MPFR_LIB_DIR=$PWD/deps-uni/lib python --version mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DPython_ADDITIONAL_VERSIONS=3 .. cd src/python - python setup.py bdist_wheel + python -m build -n + - name: Install and test python wheel + run: | + python -m pip install --user pytest build/src/python/dist/*.whl + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest src/python/test/test_alpha_complex.py - name: Publish on PyPi env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} run: | mkdir wheelhouse - /Users/runner/.local/bin/delocate-listdeps build/src/python/dist/* - /Users/runner/.local/bin/delocate-wheel --require-archs x86_64 -w wheelhouse build/src/python/dist/* - python -m twine upload wheelhouse/*
\ No newline at end of file + export PATH="$PATH:`python -m site --user-base`/bin" + delocate-listdeps build/src/python/dist/* + delocate-wheel --require-archs universal2 -w wheelhouse build/src/python/dist/* + python -m twine upload wheelhouse/* diff --git a/.github/workflows/pip-packaging-windows.yml b/.github/workflows/pip-packaging-windows.yml index 3a751486..e5a7d817 100644 --- a/.github/workflows/pip-packaging-windows.yml +++ b/.github/workflows/pip-packaging-windows.yml @@ -10,34 +10,42 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: ['3.5', '3.6', '3.7', '3.8', '3.9'] + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] name: Build wheels for Python ${{ matrix.python-version }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 with: submodules: true - - uses: actions/setup-python@v1 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} architecture: x64 - name: Install dependencies run: | - vcpkg update - vcpkg upgrade --no-dry-run - type c:/vcpkg/ports/cgal/portfile.cmake + set VCPKG_BUILD_TYPE=release vcpkg install eigen3 cgal --triplet x64-windows - python -m pip install --user -r .github/build-requirements.txt - python -m pip install --user twine + vcpkg version + ls "C:\vcpkg\installed\x64-windows\bin\" + python -m pip install --user -r .\ext\gudhi-deploy\build-requirements.txt + python -m pip install --user build twine python -m pip list - - name: Build python wheel + - name: Build python wheel and install it run: | mkdir build - cd build - cmake -DCMAKE_BUILD_TYPE=Release -DGMP_INCLUDE_DIR="c:/vcpkg/installed/x64-windows/include" -DGMP_LIBRARIES="c:/vcpkg/installed/x64-windows/lib/mpir.lib" -DGMP_LIBRARIES_DIR="c:/vcpkg/installed/x64-windows/lib" -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DPython_ADDITIONAL_VERSIONS=3 .. - cd src/python - cp c:/vcpkg/installed/x64-windows/bin/mpfr.dll gudhi/ - cp c:/vcpkg/installed/x64-windows/bin/mpir.dll gudhi/ - python setup.py bdist_wheel + cd ".\build\" + cmake -DCMAKE_BUILD_TYPE=Release -DFORCE_EIGEN_DEFAULT_DENSE_INDEX_TYPE_TO_INT=ON -DCMAKE_TOOLCHAIN_FILE=c:\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows .. + cd ".\src\python\" + cp "C:\vcpkg\installed\x64-windows\bin\mpfr*.dll" ".\gudhi\" + cp "C:\vcpkg\installed\x64-windows\bin\gmp*.dll" ".\gudhi\" + python -m build -n + ls ".\dist\" + cd ".\dist\" + Get-ChildItem *.whl | ForEach-Object{python -m pip install --user $_.Name} + - name: Test python wheel + run: | + python -m pip install --user pytest + python -c "import gudhi; print(gudhi.__version__)" + python -m pytest ".\src\python\test\test_alpha_complex.py" - name: Publish on PyPi env: TWINE_USERNAME: __token__ |