Skip to content

Commit a2e974b

Browse files
Initial commit
0 parents  commit a2e974b

File tree

168 files changed

+38511
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+38511
-0
lines changed

.github/workflows/build-wheels.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Build wheels
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
env:
10+
# VieCut's bundled tlx uses cmake_minimum_required(VERSION 2.8) which
11+
# CMake 4.x rejects. This env var tells CMake to accept older policies.
12+
CMAKE_ARGS: "-DCMAKE_POLICY_VERSION_MINIMUM=3.5"
13+
14+
jobs:
15+
build-linux:
16+
name: Linux ${{ matrix.python-version }}
17+
runs-on: ubuntu-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: ["cp39", "cp310", "cp311", "cp312", "cp313", "cp314"]
22+
steps:
23+
- uses: actions/checkout@v4
24+
with:
25+
submodules: recursive
26+
27+
- uses: pypa/cibuildwheel@v3.3
28+
env:
29+
CIBW_BUILD: "${{ matrix.python-version }}-manylinux_x86_64"
30+
CIBW_SKIP: "cp31?t-*"
31+
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
32+
CIBW_BEFORE_ALL: >-
33+
yum install -y hwloc-devel &&
34+
bash {project}/scripts/build_mtkahypar.sh &&
35+
bash {project}/scripts/build_sharedmap_mtkahypar.sh
36+
CIBW_ENVIRONMENT: >-
37+
CXX=g++
38+
CMAKE_ARGS=-DCMAKE_POLICY_VERSION_MINIMUM=3.5
39+
LD_LIBRARY_PATH={project}/external_repositories/HeiCut/extern/mt-kahypar-library:{project}/external_repositories/HeiCut/extern/mt-kahypar-library/tbb_lib/intel64/gcc4.8:{project}/external_repositories/SharedMap/extern/local/mt-kahypar/lib:$LD_LIBRARY_PATH
40+
CIBW_TEST_REQUIRES: pytest
41+
CIBW_TEST_COMMAND: >-
42+
cp -r {project}/tests /tmp/_cibw_tests && pytest /tmp/_cibw_tests -v -s --tb=long && rm -rf /tmp/_cibw_tests
43+
CIBW_REPAIR_WHEEL_COMMAND: >-
44+
LD_LIBRARY_PATH={project}/external_repositories/HeiCut/extern/mt-kahypar-library:{project}/external_repositories/HeiCut/extern/mt-kahypar-library/tbb_lib/intel64/gcc4.8:{project}/external_repositories/SharedMap/extern/local/mt-kahypar/lib:$LD_LIBRARY_PATH
45+
auditwheel repair -w {dest_dir} {wheel}
46+
47+
- uses: actions/upload-artifact@v4
48+
with:
49+
name: wheel-linux-${{ matrix.python-version }}
50+
path: wheelhouse/*.whl
51+
52+
build-macos-arm64:
53+
name: macOS arm64 ${{ matrix.python-version }}
54+
runs-on: macos-14
55+
strategy:
56+
fail-fast: false
57+
matrix:
58+
python-version: ["cp39", "cp310", "cp311", "cp312", "cp313", "cp314"]
59+
steps:
60+
- uses: actions/checkout@v4
61+
with:
62+
submodules: recursive
63+
64+
- uses: pypa/cibuildwheel@v3.3
65+
env:
66+
CIBW_BUILD: "${{ matrix.python-version }}-macosx_arm64"
67+
CIBW_SKIP: "cp31?t-*"
68+
CIBW_BEFORE_ALL: >-
69+
brew install libomp hwloc tbb boost &&
70+
bash {project}/scripts/build_mtkahypar.sh &&
71+
bash {project}/scripts/build_sharedmap_mtkahypar.sh
72+
CIBW_ENVIRONMENT: >-
73+
CC=clang
74+
CXX=clang++
75+
MACOSX_DEPLOYMENT_TARGET=14.0
76+
OpenMP_ROOT=/opt/homebrew/opt/libomp
77+
CMAKE_ARGS="-DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DOpenMP_ROOT=/opt/homebrew/opt/libomp"
78+
KAHYPAR_DOWNLOAD_TBB=OFF
79+
KAHYPAR_DOWNLOAD_BOOST=OFF
80+
CIBW_TEST_REQUIRES: pytest
81+
CIBW_TEST_COMMAND: >-
82+
cp -r {project}/tests /tmp/_cibw_tests && pytest /tmp/_cibw_tests -v -s --tb=long && rm -rf /tmp/_cibw_tests
83+
CIBW_REPAIR_WHEEL_COMMAND: >-
84+
DYLD_LIBRARY_PATH={project}/external_repositories/HeiCut/extern/mt-kahypar-library:{project}/external_repositories/SharedMap/extern/local/mt-kahypar/lib:$DYLD_LIBRARY_PATH
85+
delocate-wheel --require-archs arm64 -w {dest_dir} {wheel}
86+
87+
- uses: actions/upload-artifact@v4
88+
with:
89+
name: wheel-macos-arm64-${{ matrix.python-version }}
90+
path: wheelhouse/*.whl
91+
92+
# Windows builds are disabled: the bundled C++ graph algorithm libraries
93+
# (KaHIP, HeiStream, HyperMIS, etc.) rely on POSIX headers (sys/time.h,
94+
# sys/mman.h, execinfo.h) that are not available on MSVC/Windows.
95+
96+
build-sdist:
97+
name: Source distribution
98+
runs-on: ubuntu-latest
99+
steps:
100+
- uses: actions/checkout@v4
101+
with:
102+
submodules: recursive
103+
104+
- uses: actions/setup-python@v5
105+
with:
106+
python-version: "3.12"
107+
108+
- run: pip install build
109+
- run: python -m build --sdist
110+
111+
- uses: actions/upload-artifact@v4
112+
with:
113+
name: sdist
114+
path: dist/*.tar.gz
115+
116+
create-release:
117+
name: Create GitHub Release
118+
needs: [build-linux, build-macos-arm64, build-sdist]
119+
runs-on: ubuntu-latest
120+
permissions:
121+
contents: write
122+
steps:
123+
- uses: actions/download-artifact@v4
124+
with:
125+
path: dist
126+
merge-multiple: true
127+
128+
- uses: softprops/action-gh-release@v2
129+
with:
130+
files: dist/*
131+
generate_release_notes: true

.github/workflows/publish-pypi.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish to PyPI
2+
3+
on:
4+
release:
5+
types: [published]
6+
workflow_dispatch:
7+
inputs:
8+
tag:
9+
description: "Release tag to publish (e.g. v0.0.20)"
10+
required: true
11+
12+
jobs:
13+
publish:
14+
name: Upload to PyPI
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: read
18+
id-token: write
19+
steps:
20+
- name: Download release assets
21+
env:
22+
GH_TOKEN: ${{ github.token }}
23+
run: |
24+
TAG="${{ github.event.release.tag_name || github.event.inputs.tag }}"
25+
mkdir -p dist
26+
gh release download "${TAG}" \
27+
--repo "${{ github.repository }}" \
28+
--dir dist \
29+
--pattern "*.whl"
30+
31+
- uses: pypa/gh-action-pypi-publish@release/v1
32+
with:
33+
packages-dir: dist/

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
build/
2+
dist/
3+
*.egg-info/
4+
__pycache__/
5+
*.pyc
6+
*.so
7+
*.whl
8+
.venv/
9+
test_env/
10+
build-mtkahypar/
11+
report.md
12+
summary.md
13+
docs/plans/
14+
benchmarks/

.gitmodules

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
[submodule "KaHIP"]
2+
path = external_repositories/KaHIP
3+
url = https://github.com/KaHIP/KaHIP.git
4+
branch = master
5+
[submodule "VieClus"]
6+
path = external_repositories/VieClus
7+
url = https://github.com/VieClus/VieClus.git
8+
branch = master
9+
[submodule "VieCut"]
10+
path = external_repositories/VieCut
11+
url = https://github.com/VieCut/VieCut.git
12+
branch = master
13+
[submodule "CHILS"]
14+
path = external_repositories/CHILS
15+
url = https://github.com/KarlsruheMIS/CHILS.git
16+
branch = main
17+
[submodule "KaMIS"]
18+
path = external_repositories/KaMIS
19+
url = https://github.com/KarlsruheMIS/KaMIS.git
20+
[submodule "SCC"]
21+
path = external_repositories/SCC
22+
url = https://github.com/ScalableCorrelationClustering/ScalableCorrelationClustering.git
23+
[submodule "HeiOrient"]
24+
path = external_repositories/HeiOrient
25+
url = https://github.com/HeiOrient/HeiOrient.git
26+
[submodule "fpt-max-cut"]
27+
path = external_repositories/fpt-max-cut
28+
url = https://github.com/DataReductionMaxCut/fpt-max-cut.git
29+
[submodule "HeidelbergMotifClustering"]
30+
path = external_repositories/HeidelbergMotifClustering
31+
url = https://github.com/LocalClustering/HeidelbergMotifClustering.git
32+
[submodule "HeiStream"]
33+
path = external_repositories/HeiStream
34+
url = https://github.com/KaHIP/HeiStream.git
35+
[submodule "external_repositories/HyperMIS"]
36+
path = external_repositories/HyperMIS
37+
url = https://github.com/KarlsruheMIS/HyperMIS
38+
[submodule "external_repositories/HeiCut"]
39+
path = external_repositories/HeiCut
40+
url = https://github.com/heicut/heicut
41+
[submodule "external_repositories/CluStRE"]
42+
path = external_repositories/CluStRE
43+
url = https://github.com/KaHIP/CluStRE
44+
[submodule "external_repositories/HeiHGM_Bmatching"]
45+
path = external_repositories/HeiHGM_Bmatching
46+
url = https://github.com/HeiHGM/Bmatching.git
47+
[submodule "external_repositories/HeiHGM_Streaming"]
48+
path = external_repositories/HeiHGM_Streaming
49+
url = https://github.com/HeiHGM/Streaming.git
50+
[submodule "external_repositories/DynDeltaApprox"]
51+
path = external_repositories/DynDeltaApprox
52+
url = https://github.com/DynGraphLab/DynDeltaApprox.git
53+
[submodule "external_repositories/DynDeltaOrientation"]
54+
path = external_repositories/DynDeltaOrientation
55+
url = https://github.com/DynGraphLab/DynDeltaOrientation.git
56+
[submodule "external_repositories/DynMatch"]
57+
path = external_repositories/DynMatch
58+
url = https://github.com/DynGraphLab/DynMatch.git
59+
branch = master
60+
[submodule "external_repositories/DynWMIS"]
61+
path = external_repositories/DynWMIS
62+
url = https://github.com/DynGraphLab/DynWMIS.git
63+
[submodule "external_repositories/SharedMap"]
64+
path = external_repositories/SharedMap
65+
url = https://github.com/HenningWoydt/SharedMap.git
66+
[submodule "external_repositories/FREIGHT"]
67+
path = external_repositories/FREIGHT
68+
url = https://github.com/KaHIP/FREIGHT
69+
[submodule "external_repositories/LearnAndReduce"]
70+
path = external_repositories/LearnAndReduce
71+
url = https://github.com/KarlsruheMIS/LearnAndReduce.git
72+
[submodule "external_repositories/red2pack"]
73+
path = external_repositories/red2pack
74+
url = https://github.com/KarlsruheMIS/red2pack.git

0 commit comments

Comments
 (0)