summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/pip-build-linux.yml27
-rw-r--r--.github/workflows/pip-build-osx.yml51
-rw-r--r--.github/workflows/pip-build-windows.yml49
-rw-r--r--.github/workflows/pip-packaging-linux.yml105
-rw-r--r--.github/workflows/pip-packaging-osx.yml61
-rw-r--r--.github/workflows/pip-packaging-windows.yml55
6 files changed, 348 insertions, 0 deletions
diff --git a/.github/workflows/pip-build-linux.yml b/.github/workflows/pip-build-linux.yml
new file mode 100644
index 00000000..bc4f999e
--- /dev/null
+++ b/.github/workflows/pip-build-linux.yml
@@ -0,0 +1,27 @@
+name: pip build linux
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ 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@v3
+ with:
+ submodules: true
+ - 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 setup.py bdist_wheel
+ 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
diff --git a/.github/workflows/pip-build-osx.yml b/.github/workflows/pip-build-osx.yml
new file mode 100644
index 00000000..a438124a
--- /dev/null
+++ b/.github/workflows/pip-build-osx.yml
@@ -0,0 +1,51 @@
+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.11']
+ name: Build wheels for Python ${{ matrix.python-version }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: x64
+ - name: Install dependencies
+ run: |
+ brew update || true
+ brew install boost eigen gmp mpfr cgal || true
+ python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt
+ python -m pip install --user 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
+ 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
diff --git a/.github/workflows/pip-build-windows.yml b/.github/workflows/pip-build-windows.yml
new file mode 100644
index 00000000..50bdfe2c
--- /dev/null
+++ b/.github/workflows/pip-build-windows.yml
@@ -0,0 +1,49 @@
+name: pip build windows
+
+on: [push, pull_request]
+
+jobs:
+ build:
+ runs-on: windows-latest
+ strategy:
+ max-parallel: 4
+ matrix:
+ python-version: ['3.11']
+ name: Build wheels for Python ${{ matrix.python-version }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: x64
+ - name: Install dependencies
+ run: |
+ set VCPKG_BUILD_TYPE=release
+ vcpkg install eigen3 cgal --triplet x64-windows
+ vcpkg version
+ ls "C:\vcpkg\installed\x64-windows\bin\"
+ python -m pip install --user -r .\ext\gudhi-deploy\build-requirements.txt
+ python -m pip list
+ - name: Build python wheel and install it
+ run: |
+ mkdir build
+ 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 ..
+ Get-Location
+ dir
+ cd ".\src\python\"
+ cp "C:\vcpkg\installed\x64-windows\bin\mpfr*.dll" ".\gudhi\"
+ cp "C:\vcpkg\installed\x64-windows\bin\gmp*.dll" ".\gudhi\"
+ python setup.py bdist_wheel
+ 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"
diff --git a/.github/workflows/pip-packaging-linux.yml b/.github/workflows/pip-packaging-linux.yml
new file mode 100644
index 00000000..14b1cf7a
--- /dev/null
+++ b/.github/workflows/pip-packaging-linux.yml
@@ -0,0 +1,105 @@
+name: pip packaging linux
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ build:
+ 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@v3
+ with:
+ submodules: true
+ - 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
+ auditwheel repair dist/*.whl
+ - 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
+ auditwheel repair dist/*.whl
+ - 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
+ auditwheel repair dist/*.whl
+ - 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
+ 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 setup.py bdist_wheel
+ 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 setup.py bdist_wheel
+ 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: |
+ $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
new file mode 100644
index 00000000..9ddbcfce
--- /dev/null
+++ b/.github/workflows/pip-packaging-osx.yml
@@ -0,0 +1,61 @@
+name: pip packaging osx
+
+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.7', '3.8', '3.9', '3.10', '3.11']
+ name: Build wheels for Python ${{ matrix.python-version }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: x64
+ - name: Install dependencies
+ run: |
+ brew update || true
+ brew install boost eigen gmp mpfr cgal || true
+ python -m pip install --user -r ext/gudhi-deploy/build-requirements.txt
+ python -m pip install --user 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
+ - 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
+ 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
new file mode 100644
index 00000000..df0db9a5
--- /dev/null
+++ b/.github/workflows/pip-packaging-windows.yml
@@ -0,0 +1,55 @@
+name: pip packaging windows
+
+on:
+ release:
+ types: [published]
+
+jobs:
+ build:
+ runs-on: windows-latest
+ strategy:
+ max-parallel: 4
+ matrix:
+ python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
+ name: Build wheels for Python ${{ matrix.python-version }}
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ submodules: true
+ - uses: actions/setup-python@v4
+ with:
+ python-version: ${{ matrix.python-version }}
+ architecture: x64
+ - name: Install dependencies
+ run: |
+ set VCPKG_BUILD_TYPE=release
+ vcpkg install eigen3 cgal --triplet x64-windows
+ 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 twine
+ python -m pip list
+ - name: Build python wheel and install it
+ run: |
+ mkdir build
+ 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 ..
+ Get-Location
+ dir
+ cd ".\src\python\"
+ cp "C:\vcpkg\installed\x64-windows\bin\mpfr*.dll" ".\gudhi\"
+ cp "C:\vcpkg\installed\x64-windows\bin\gmp*.dll" ".\gudhi\"
+ python setup.py bdist_wheel
+ 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__
+ TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
+ run: python -m twine upload build/src/python/dist/*