Skip to content

Commit

Permalink
even more extended build
Browse files Browse the repository at this point in the history
  • Loading branch information
N-Maas committed Nov 28, 2024
1 parent 326e3c1 commit c07f083
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 9 deletions.
52 changes: 43 additions & 9 deletions .github/workflows/python_build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,10 @@ on:
- master

jobs:
mt_kahypar_compiler_version_test:
name: Python Package
strategy:
matrix:
os: [ ubuntu-24.04 ]
package_linux:
name: Python Package Linux

runs-on: ${{ matrix.os }}
runs-on: ubuntu-24.04
env:
CI_ACTIVE : 1
TBB_INSTALL_DIR: /tmp/tbb_build
Expand All @@ -21,14 +18,20 @@ jobs:
- 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 scikit-build-core>=0.10
- name: Build Python Wheels
env:
CIBW_BUILD: cp3*-manylinux_x86_64
CIBW_ARCHS_LINUX: x86_64 i686 aarch64
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
Expand All @@ -37,7 +40,38 @@ jobs:
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
name: cibw-wheels-ubuntu-24.04
path: ./wheels/*.whl

# TODO: tests

package_macos:
name: Python Package MacOS

runs-on: macos-latest
env:
CI_ACTIVE : 1
TBB_INSTALL_DIR: /tmp/tbb_build

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

- name: Install Dependencies
run: |
brew install tbb boost hwloc
python3 -m pip install cibuildwheel>=2.22.0 scikit-build-core>=0.10
- name: Build Python Wheels
env:
CIBW_ARCHS_MACOS: x86_64 arm64
CIBW_BUILD: cp3*-macos*
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
rm -rf configure_python
python3 -m cibuildwheel --output-dir wheels
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-macos
path: ./wheels/*.whl
7 changes: 7 additions & 0 deletions pyproject.toml.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,10 @@ repair-wheel-command = """
export LD_LIBRARY_PATH="@KAHYPAR_TBB_DIR@:$LD_LIBRARY_PATH"
auditwheel repair -w {dest_dir} {wheel}
"""

[tool.cibuildwheel.macos]
before-build = "brew install hwloc"
repair-wheel-command = """
export LD_LIBRARY_PATH="@KAHYPAR_TBB_DIR@:$LD_LIBRARY_PATH"
delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}
"""

0 comments on commit c07f083

Please sign in to comment.