Skip to content

Commit

Permalink
try a full python run
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Maas committed Dec 4, 2024
1 parent 9e3e230 commit 72b304a
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 41 deletions.
71 changes: 36 additions & 35 deletions .github/workflows/debian_build_ci.yml
Original file line number Diff line number Diff line change
@@ -1,43 +1,44 @@
name: Mt-KaHyPar Debian Package

on:
push
release:
types: [published]

jobs:
# package_x86:
# name: Debian Package x86

# runs-on: ubuntu-20.04 # use old ubuntu for better backwards compatibility with system libraries
# env:
# CI_ACTIVE : 1

# steps:
# - uses: actions/checkout@v4

# - name: Install Dependencies
# run: |
# echo "deb http://cz.archive.ubuntu.com/ubuntu jammy main universe" | sudo tee -a /etc/apt/sources.list
# sudo apt-get -y update
# sudo apt-get -y install libtbb-dev libhwloc-dev gcc-9 g++-9

# - name: Build Mt-KaHyPar Debian Package
# env:
# CC: gcc-9
# CXX: g++-9
# run: |
# rm -rf build
# mkdir build
# cd build
# cmake .. --preset=default -DCMAKE_POSITION_INDEPENDENT_CODE=On -DKAHYPAR_CI_BUILD=ON \
# -DKAHYPAR_DOWNLOAD_BOOST=ON -DKAHYPAR_STATIC_LINK_DEPENDENCIES=ON \
# -DKAHYPAR_ENABLE_ARCH_COMPILE_OPTIMIZATIONS=OFF -DKAHYPAR_ENABLE_THREAD_PINNING=OFF -DKAHYPAR_BUILD_PACKAGE=ON
# make -j4
# make package-mtkahypar-deb

# - uses: actions/upload-artifact@v4
# with:
# name: debian-package
# path: ./build/packages/*.deb
package_x86:
name: Debian Package x86

runs-on: ubuntu-20.04 # use old ubuntu for better backwards compatibility with system libraries
env:
CI_ACTIVE : 1

steps:
- uses: actions/checkout@v4

- name: Install Dependencies
run: |
echo "deb http://cz.archive.ubuntu.com/ubuntu jammy main universe" | sudo tee -a /etc/apt/sources.list
sudo apt-get -y update
sudo apt-get -y install libtbb-dev libhwloc-dev gcc-9 g++-9
- name: Build Mt-KaHyPar Debian Package
env:
CC: gcc-9
CXX: g++-9
run: |
rm -rf build
mkdir build
cd build
cmake .. --preset=default -DCMAKE_POSITION_INDEPENDENT_CODE=On -DKAHYPAR_CI_BUILD=ON \
-DKAHYPAR_DOWNLOAD_BOOST=ON -DKAHYPAR_STATIC_LINK_DEPENDENCIES=ON \
-DKAHYPAR_ENABLE_ARCH_COMPILE_OPTIMIZATIONS=OFF -DKAHYPAR_ENABLE_THREAD_PINNING=OFF -DKAHYPAR_BUILD_PACKAGE=ON
make -j4
make package-mtkahypar-deb
- uses: actions/upload-artifact@v4
with:
name: debian-package
path: ./build/packages/*.deb


package_arm64:
Expand Down
82 changes: 76 additions & 6 deletions .github/workflows/python_build_ci.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,44 @@
name: Mt-KaHyPar Python Package

on:
release:
types: [published]
push

jobs:
package_linux:
name: Python Package Linux
package_linux_x86:
name: Python Package Linux x86

runs-on: ubuntu-24.04
env:
CI_ACTIVE : 1
TBB_INSTALL_DIR: /tmp/tbb_build

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

- name: Install Dependencies
run: |
sudo apt-get install libtbb-dev libhwloc-dev libboost-program-options-dev
python3 -m pip install cibuildwheel>=2.22.0
- name: Build Python Wheels
env:
CIBW_ARCHS_LINUX: x86_64
CIBW_BUILD: cp3*-manylinux*
run: |
# run cmake to create pyproject.toml from pyproject.toml.in
cmake -B configure_python --preset=minimal -DKAHYPAR_SETUP_PYTHON=On -DKAHYPAR_TBB_DIR=$TBB_INSTALL_DIR -DKAHYPAR_DISABLE_HWLOC=Off
rm -rf configure_python
python3 -m cibuildwheel --output-dir wheels
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-ubuntu-24.04
path: ./wheels/*.whl


package_linux_arm_1:
name: Python Package Linux ARM 1

runs-on: ubuntu-24.04
env:
Expand All @@ -29,8 +61,46 @@ jobs:
- name: Build Python Wheels
env:
CIBW_ARCHS_LINUX: x86_64 aarch64
CIBW_ARCHS_LINUX: aarch64
CIBW_BUILD: cp3{9,10,11}-manylinux*
run: |
# run cmake to create pyproject.toml from pyproject.toml.in
cmake -B configure_python --preset=minimal -DKAHYPAR_SETUP_PYTHON=On -DKAHYPAR_TBB_DIR=$TBB_INSTALL_DIR -DKAHYPAR_DISABLE_HWLOC=Off
rm -rf configure_python
python3 -m cibuildwheel --output-dir wheels
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-ubuntu-24.04-arm1
path: ./wheels/*.whl

package_linux_arm_2:
name: Python Package Linux ARM 2

runs-on: ubuntu-24.04
env:
CI_ACTIVE : 1
TBB_INSTALL_DIR: /tmp/tbb_build

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Install Dependencies
run: |
sudo apt-get install libtbb-dev libhwloc-dev libboost-program-options-dev
python3 -m pip install cibuildwheel>=2.22.0
- name: Build Python Wheels
env:
CIBW_ARCHS_LINUX: aarch64
CIBW_BUILD: cp3*-manylinux*
CIBW_PROJECT_REQUIRES_PYTHON: ">=3.12"
run: |
# run cmake to create pyproject.toml from pyproject.toml.in
cmake -B configure_python --preset=minimal -DKAHYPAR_SETUP_PYTHON=On -DKAHYPAR_TBB_DIR=$TBB_INSTALL_DIR -DKAHYPAR_DISABLE_HWLOC=Off
Expand All @@ -39,7 +109,7 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-ubuntu-24.04
name: cibw-wheels-ubuntu-24.04-arm2
path: ./wheels/*.whl


Expand Down

0 comments on commit 72b304a

Please sign in to comment.