Update pyarrow to 24 #83
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build wheels | |
| on: | |
| push: | |
| branches: | |
| - main | |
| tags-ignore: | |
| - '[0-9]+.[0-9]+.[0-9]+' | |
| - '[0-9]+.[0-9]+' | |
| release: | |
| types: | |
| - created | |
| workflow_dispatch: | |
| inputs: | |
| isDeploy: | |
| description: 'Deploy to PyPI' | |
| required: false | |
| default: 'false' | |
| # Default parameters for all builds | |
| env: | |
| ARTIFACT_RETENTION: ${{ github.ref == 'refs/heads/main' && '30' || '7' }} | |
| jobs: | |
| cpython-linux-x86_64: | |
| name: 'Linux CPython (${{ matrix.cibw_archs }}, ${{ matrix.manylinux_image }})' | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| cibw_archs: ["x86_64"] | |
| manylinux_image: ["manylinux_2_28"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-python@v5 | |
| name: Install Python | |
| with: | |
| python-version: '3.12' | |
| - name: Setup ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: ccache-wheels-linux-${{ matrix.manylinux_image }}-${{ github.sha }} | |
| max-size: 2G | |
| restore-keys: | | |
| ccache-wheels-linux-${{ matrix.manylinux_image }}- | |
| ccache-wheels-linux- | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_BEFORE_ALL: | | |
| yum install -y epel-release || yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1).noarch.rpm | |
| yum install -y https://apache.jfrog.io/artifactory/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe)/apache-arrow-release-latest.rpm | |
| yum install -y --enablerepo=epel arrow-devel arrow-compute-devel ccache | |
| export CCACHE_DIR=/root/.ccache | |
| mkdir -p /tmp/nk_core_build /tmp/nk_core_install | |
| cmake -S {project} -B /tmp/nk_core_build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_INSTALL_PREFIX=/tmp/nk_core_install \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| cmake --build /tmp/nk_core_build --target install -j$(nproc) | |
| CIBW_BEFORE_BUILD: | | |
| pip install cython auditwheel --upgrade | |
| CIBW_ENVIRONMENT_LINUX: > | |
| NETWORKIT_EXTERNAL_CORE=1 | |
| NETWORKIT_CORE_PREFIX=/tmp/nk_core_install | |
| CCACHE_DIR=/root/.ccache | |
| CCACHE_MAXSIZE=2G | |
| CMAKE_C_COMPILER_LAUNCHER=ccache | |
| CMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| CIBW_MANYLINUX_X86_64_IMAGE: ${{ matrix.manylinux_image }} | |
| CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs }} | |
| CIBW_BUILD: ${{ github.event_name == 'release' && 'cp310-* cp311-* cp312-* cp313-* cp314-*' || 'cp313-*' }} | |
| CIBW_SKIP: "pp* *-musllinux_*" | |
| CIBW_TEST_COMMAND: python3 -c 'import networkit' | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp310-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp310*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp311-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp311*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp312-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp312*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp313-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp313*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp314-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp314*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| cpython-linux-aarch64: | |
| name: 'Linux CPython (${{ matrix.cibw_archs }}, ${{ matrix.manylinux_image }})' | |
| runs-on: ubuntu-24.04-arm | |
| strategy: | |
| matrix: | |
| cibw_archs: ["aarch64"] | |
| manylinux_image: ["manylinux_2_28"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-python@v5 | |
| name: Install Python | |
| with: | |
| python-version: '3.12' | |
| - name: Setup ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: ccache-wheels-linux-${{ matrix.manylinux_image }}-${{ matrix.cibw_archs }}-${{ github.sha }} | |
| max-size: 2G | |
| restore-keys: | | |
| ccache-wheels-linux-${{ matrix.manylinux_image }}-${{ matrix.cibw_archs }}- | |
| ccache-wheels-linux-${{ matrix.manylinux_image }}- | |
| ccache-wheels-linux- | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_BEFORE_ALL: | | |
| yum install -y epel-release || yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(cut -d: -f5 /etc/system-release-cpe | cut -d. -f1).noarch.rpm | |
| yum install -y https://apache.jfrog.io/artifactory/arrow/centos/$(cut -d: -f5 /etc/system-release-cpe)/apache-arrow-release-latest.rpm | |
| yum install -y --enablerepo=epel arrow-devel arrow-compute-devel ccache | |
| export CCACHE_DIR=/root/.ccache | |
| mkdir -p /tmp/nk_core_build /tmp/nk_core_install | |
| cmake -S {project} -B /tmp/nk_core_build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_INSTALL_PREFIX=/tmp/nk_core_install \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| cmake --build /tmp/nk_core_build --target install -j$(nproc) | |
| CIBW_BEFORE_BUILD: | | |
| pip install cython auditwheel --upgrade | |
| CIBW_ENVIRONMENT_LINUX: > | |
| NETWORKIT_EXTERNAL_CORE=1 | |
| NETWORKIT_CORE_PREFIX=/tmp/nk_core_install | |
| CCACHE_DIR=/root/.ccache | |
| CCACHE_MAXSIZE=2G | |
| CMAKE_C_COMPILER_LAUNCHER=ccache | |
| CMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| CIBW_MANYLINUX_AARCH64_IMAGE: ${{ matrix.manylinux_image }} | |
| CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs }} | |
| CIBW_BUILD: ${{ github.event_name == 'release' && 'cp310-* cp311-* cp312-* cp313-* cp314-*' || 'cp313-*' }} | |
| CIBW_SKIP: "pp* *-musllinux_*" | |
| CIBW_TEST_COMMAND: python3 -c 'import networkit' | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp310-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp310*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp311-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp311*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp312-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp312*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp313-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp313*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'linux-${{ matrix.cibw_archs }}-cp314-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp314*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| cpython-macos: | |
| name: 'macOS CPython (${{ matrix.buildplat[1] }})' | |
| runs-on: ${{ matrix.buildplat[0] }} | |
| strategy: | |
| matrix: | |
| buildplat: | |
| - [macos-15-intel, x86_64, ''] | |
| - [macos-latest, arm64, NETWORKIT_OSX_CROSSBUILD=ON] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-python@v5 | |
| name: Install Python | |
| with: | |
| python-version: '3.12' | |
| - name: Setup ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: ccache-wheels-macos-${{ matrix.buildplat[1] }}-${{ github.sha }} | |
| max-size: 2G | |
| restore-keys: | | |
| ccache-wheels-macos-${{ matrix.buildplat[1] }}- | |
| ccache-wheels-macos- | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_BEFORE_ALL: | | |
| brew install ninja ccache apache-arrow libomp | |
| export CCACHE_DIR=$HOME/.ccache | |
| mkdir -p /tmp/nk_core_build /tmp/nk_core_install | |
| cmake -S {project} -B /tmp/nk_core_build \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DCMAKE_INSTALL_PREFIX=/tmp/nk_core_install \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| -GNinja | |
| cmake --build /tmp/nk_core_build --target install | |
| CIBW_BEFORE_BUILD: | | |
| pip install cython delocate | |
| CIBW_ARCHS_MACOS: ${{ matrix.buildplat[1] }} | |
| CIBW_BUILD: ${{ github.event_name == 'release' && 'cp310-* cp311-* cp312-* cp313-* cp314-*' || 'cp313-*' }} | |
| CIBW_ENVIRONMENT: > | |
| CXX='c++' | |
| ${{ matrix.buildplat[2] }} | |
| NETWORKIT_EXTERNAL_CORE=1 | |
| NETWORKIT_CORE_PREFIX=/tmp/nk_core_install | |
| MACOSX_DEPLOYMENT_TARGET='15.0' | |
| CCACHE_DIR=$HOME/.ccache | |
| CCACHE_MAXSIZE=2G | |
| CMAKE_C_COMPILER_LAUNCHER=ccache | |
| CMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| CIBW_REPAIR_WHEEL_COMMAND_MACOS: > | |
| delocate-wheel -e libomp -w {dest_dir} {wheel} | |
| CIBW_SKIP: "pp* *-musllinux_*" | |
| CIBW_TEST_COMMAND: python3 -c 'import networkit' | |
| CIBW_TEST_SKIP: "*-macosx_x86_64 *-macosx_universal2:x86_64" | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'macos-${{ matrix.buildplat[1] }}-cp310-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp310*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'macos-${{matrix.buildplat[1] }}-cp311-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp311*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'macos-${{ matrix.buildplat[1] }}-cp312-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp312*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'macos-${{ matrix.buildplat[1] }}-cp313-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp313*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'macos-${{ matrix.buildplat[1] }}-cp314-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp314*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| cpython-windows: | |
| name: 'Windows CPython (${{ matrix.cibw_archs }})' | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| cibw_archs: [amd64] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Setup devCmd (vstools) | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - uses: actions/setup-python@v5 | |
| name: Install Python | |
| with: | |
| python-version: '3.12' | |
| - name: Create vcpkg manifest | |
| shell: bash | |
| run: | | |
| cat > vcpkg.json << 'EOF' | |
| { | |
| "name": "networkit-deps", | |
| "version": "1.0.0", | |
| "dependencies": [ | |
| "arrow" | |
| ] | |
| } | |
| EOF | |
| - name: Setup vcpkg | |
| uses: lukka/run-vcpkg@v11 | |
| with: | |
| vcpkgGitCommitId: 'b322364f06308bdd24823f9d8f03fe0cc86fd46f' | |
| - name: Authenticate vcpkg NuGet | |
| shell: pwsh | |
| run: | | |
| $nuget = & $env:VCPKG_ROOT/vcpkg fetch nuget | Out-String | |
| $nuget = $nuget.Trim() | |
| & $nuget sources add -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" -Name "GitHubPackages" -Username "${{ github.repository_owner }}" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText -Verbosity detailed | |
| & $nuget setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" | |
| - name: Install vcpkg packages | |
| shell: pwsh | |
| run: | | |
| & $env:VCPKG_ROOT/vcpkg install --recurse --clean-after-build --triplet x64-windows | |
| env: | |
| VCPKG_BINARY_SOURCES: 'clear;nuget,https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json,readwrite' | |
| - name: Setup ccache | |
| uses: hendrikmuhs/[email protected] | |
| with: | |
| key: ccache-wheels-windows-${{ matrix.cibw_archs }}-${{ github.sha }} | |
| max-size: 2G | |
| restore-keys: | | |
| ccache-wheels-windows-${{ matrix.cibw_archs }}- | |
| ccache-wheels-windows- | |
| - name: Build wheels | |
| uses: pypa/[email protected] | |
| env: | |
| CIBW_BEFORE_BUILD: pip install cython ipython delvewheel | |
| CIBW_ARCHS: "AMD64" | |
| CIBW_BUILD: ${{ github.event_name == 'release' && 'cp310-* cp311-* cp312-* cp313-* cp314-*' || 'cp313-*' }} | |
| CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: > | |
| python -m delvewheel repair --ignore-existing --analyze-existing --no-dll arrow.dll --add-path "%GITHUB_WORKSPACE%\vcpkg_installed\x64-windows\bin;%VCPKG_INSTALLATION_ROOT%\installed\x64-windows\bin" -w {dest_dir} {wheel} | |
| CIBW_ENVIRONMENT: > | |
| CCACHE_DIR=$HOME/.ccache | |
| CCACHE_MAXSIZE=2G | |
| CMAKE_C_COMPILER_LAUNCHER=ccache | |
| CMAKE_CXX_COMPILER_LAUNCHER=ccache | |
| CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" | |
| CIBW_SKIP: pp* | |
| VCPKG_BINARY_SOURCES: 'clear;nuget,https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json,readwrite' | |
| CIBW_TEST_COMMAND: python -c "import networkit" | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'win-${{ matrix.cibw_archs }}-cp310-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp310*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'win-${{ matrix.cibw_archs }}-cp311-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp311*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'win-${{ matrix.cibw_archs }}-cp312-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp312*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'win-${{ matrix.cibw_archs }}-cp313-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp313*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| - uses: actions/upload-artifact@v4 | |
| if: github.ref == 'refs/heads/main' || github.event_name == 'release' | |
| with: | |
| name: 'win-${{ matrix.cibw_archs }}-cp314-${{ github.run_id }}' | |
| path: ./wheelhouse/*cp314*.whl | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| source-distribution: | |
| name: 'Source distribution' | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - uses: actions/setup-python@v5 | |
| name: Install Python | |
| with: | |
| python-version: '3.12' | |
| - name: Install prerequisites | |
| run: | | |
| wget https://apache.jfrog.io/artifactory/arrow/ubuntu/apache-arrow-apt-source-latest-jammy.deb | |
| sudo apt-get install -y ./apache-arrow-apt-source-latest-jammy.deb | |
| sudo apt-get update | |
| sudo apt-get install -y libarrow-dev | |
| - name: Create sdist | |
| run: | | |
| pip install build cython==3.0.9 numpy | |
| python -m build --sdist | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: 'sdist-${{ github.run_id }}' | |
| path: ./dist/*icebug*.tar.gz | |
| retention-days: ${{ env.ARTIFACT_RETENTION }} | |
| upload-packages: | |
| if: github.ref_type == 'tag' && github.repository == 'Ladybug-Memory/icebug' | |
| name: 'PyPi release upload' | |
| runs-on: ubuntu-22.04 | |
| permissions: | |
| id-token: write | |
| contents: read | |
| needs: [cpython-macos, cpython-linux-x86_64, cpython-linux-aarch64, cpython-windows, source-distribution] | |
| steps: | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: macos-arm64-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: macos-x86_64-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: linux-x86_64-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: linux-aarch64-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: win-amd64-* | |
| path: dist | |
| merge-multiple: true | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| pattern: sdist-* | |
| path: dist | |
| merge-multiple: true | |
| - name: List wheels | |
| run: ls -l | |
| working-directory: dist | |
| - name: Upload wheels | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: icebug-deploy-wheels | |
| path: dist/* | |
| - name: Deploy to PyPI test | |
| if: ${{ github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' && github.event.inputs.isDeploy != 'true' }} | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| repository-url: https://test.pypi.org/legacy/ | |
| skip-existing: true | |
| - name: Deploy to PyPI | |
| if: ${{ github.event_name == 'release' || github.event.inputs.isDeploy == 'true' }} | |
| uses: pypa/gh-action-pypi-publish@release/v1 |