Skip to content

Commit 9104f69

Browse files
committed
* disabled metrics for faster build
* add mac and windows as scripts
1 parent 57cfd98 commit 9104f69

4 files changed

Lines changed: 75 additions & 2 deletions

File tree

.github/workflows/wheels.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ${{ matrix.os }}
1515
strategy:
1616
matrix:
17-
os: [ubuntu-latest]
17+
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
1818

1919
steps:
2020
- uses: actions/checkout@v4
@@ -27,14 +27,18 @@ jobs:
2727
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-*
2828
CIBW_SKIP: "*-musllinux_* *-win32 *-manylinux_i686"
2929
CIBW_ARCHS_LINUX: x86_64
30+
CIBW_ARCHS_MACOS: x86_64 arm64
31+
CIBW_ARCHS_WINDOWS: AMD64
3032
CIBW_BEFORE_ALL_LINUX: >
3133
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* &&
3234
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* &&
3335
yum install -y wget hwloc-devel
36+
CIBW_BEFORE_BUILD_LINUX: ./build.sh
37+
CIBW_BEFORE_BUILD_MACOS: ./build.sh
38+
CIBW_BEFORE_BUILD_WINDOWS: build.bat
3439
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
3540
LD_LIBRARY_PATH=/project/extern/local/kahip/lib:/project/extern/local/mt-kahypar/lib64:$LD_LIBRARY_PATH
3641
auditwheel repair --lib-sdir . -w {dest_dir} {wheel}
37-
CIBW_BEFORE_BUILD: ./build.sh
3842
CIBW_BUILD_VERBOSITY: 1
3943

4044
- uses: actions/upload-artifact@v4

build.bat

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
@echo off
2+
REM Windows build script for SharedMap
3+
4+
setlocal enabledelayedexpansion
5+
6+
REM Determine number of parallel jobs
7+
set JOBS=%NUMBER_OF_PROCESSORS%
8+
if "%MAX_THREADS%" neq "" set JOBS=%MAX_THREADS%
9+
echo Building with %JOBS% parallel jobs
10+
11+
set ROOT=%CD%
12+
echo Root: %ROOT%
13+
14+
REM Clean and create directories
15+
rmdir /s /q extern 2>nul
16+
mkdir extern\local
17+
18+
REM Download KaHIP 3.19
19+
echo Downloading KaHIP 3.19...
20+
cd extern
21+
curl -L -o v3.19.tar.gz https://github.com/KaHIP/KaHIP/archive/refs/tags/v3.19.tar.gz
22+
tar -xzf v3.19.tar.gz
23+
move KaHIP-3.19 KaHIP
24+
del v3.19.tar.gz
25+
cd %ROOT%
26+
27+
REM Download Mt-KaHyPar 1.5.3
28+
echo Downloading Mt-KaHyPar 1.5.3...
29+
cd extern
30+
curl -L -o v1.5.3.tar.gz https://github.com/kahypar/mt-kahypar/archive/refs/tags/v1.5.3.tar.gz
31+
tar -xzf v1.5.3.tar.gz
32+
move mt-kahypar-1.5.3 MtKaHyPar
33+
del v1.5.3.tar.gz
34+
cd %ROOT%
35+
36+
REM Build KaHIP
37+
echo Building KaHIP 3.19...
38+
cd extern\KaHIP
39+
mkdir build
40+
cd build
41+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%ROOT%\extern\local\kahip -DNOMPI=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -G "Visual Studio 17 2022" -A x64
42+
cmake --build . --config Release --parallel %JOBS%
43+
cmake --install . --config Release
44+
cd %ROOT%
45+
46+
REM Build Mt-KaHyPar
47+
echo Building Mt-KaHyPar 1.5.3...
48+
cd extern\MtKaHyPar
49+
mkdir build
50+
cd build
51+
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKAHYPAR_DOWNLOAD_TBB=ON -DKAHYPAR_DOWNLOAD_BOOST=ON -DKAHYPAR_USE_64_BIT_IDS=ON -DKAHYPAR_ENABLE_THREAD_PINNING=OFF -DKAHYPAR_DISABLE_ASSERTIONS=ON -DKAHYPAR_ENABLE_STEINER_TREE_METRIC=OFF -DKAHYPAR_ENABLE_SOED_METRIC=OFF -DKAHYPAR_ENABLE_GRAPH_PARTITIONING_FEATURES=OFF -DCMAKE_INSTALL_PREFIX=%ROOT%\extern\local\mt-kahypar -G "Visual Studio 17 2022" -A x64
52+
cmake --build . --config Release --parallel %JOBS% --target install-mtkahypar
53+
cd %ROOT%
54+
55+
REM Build SharedMap
56+
echo Building SharedMap...
57+
mkdir build
58+
cd build
59+
cmake .. -DCMAKE_BUILD_TYPE=Release -G "Visual Studio 17 2022" -A x64
60+
cmake --build . --config Release --parallel %JOBS% --target SharedMap
61+
cmake --build . --config Release --parallel %JOBS% --target sharedmap
62+
cd %ROOT%
63+
64+
echo Build complete!

build.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,8 @@ cmake .. \
101101
-DKAHYPAR_USE_64_BIT_IDS=ON \
102102
-DKAHYPAR_ENABLE_THREAD_PINNING=OFF \
103103
-DKAHYPAR_DISABLE_ASSERTIONS=ON \
104+
-DKAHYPAR_ENABLE_STEINER_TREE_METRIC=OFF \
105+
-DKAHYPAR_ENABLE_SOED_METRIC=OFF \
104106
-DCMAKE_INSTALL_PREFIX="${ROOT}/extern/local/mt-kahypar"
105107
cmake --build . --parallel "$JOBS" --target install-mtkahypar
106108
cd "${ROOT}"

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,6 @@ repair-wheel-command = "LD_LIBRARY_PATH=/project/extern/local/kahip/lib:/project
6565

6666
[tool.cibuildwheel.macos]
6767
archs = ["x86_64", "arm64"]
68+
69+
[tool.cibuildwheel.windows]
70+
archs = ["AMD64"]

0 commit comments

Comments
 (0)