From 72b304a1f5247be69462a7b22c5d20dcb87e0a6d Mon Sep 17 00:00:00 2001 From: Nikolai Maas Date: Wed, 4 Dec 2024 14:05:34 +0100 Subject: [PATCH] try a full python run --- .github/workflows/debian_build_ci.yml | 71 +++++++++++------------ .github/workflows/python_build_ci.yml | 82 +++++++++++++++++++++++++-- 2 files changed, 112 insertions(+), 41 deletions(-) diff --git a/.github/workflows/debian_build_ci.yml b/.github/workflows/debian_build_ci.yml index b1693a351..69b9d0ccf 100644 --- a/.github/workflows/debian_build_ci.yml +++ b/.github/workflows/debian_build_ci.yml @@ -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: diff --git a/.github/workflows/python_build_ci.yml b/.github/workflows/python_build_ci.yml index ab4583555..71cfc926d 100644 --- a/.github/workflows/python_build_ci.yml +++ b/.github/workflows/python_build_ci.yml @@ -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: @@ -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 @@ -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