From 389fee0f0d5f6b62aaed8020ba5ceac1713a83b0 Mon Sep 17 00:00:00 2001 From: puerling Date: Thu, 12 Dec 2024 10:58:03 +0100 Subject: [PATCH] add workflow to build for `manylinux` --- .github/workflows/build_wheel.yml | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build_wheel.yml diff --git a/.github/workflows/build_wheel.yml b/.github/workflows/build_wheel.yml new file mode 100644 index 000000000..3079b5c6d --- /dev/null +++ b/.github/workflows/build_wheel.yml @@ -0,0 +1,36 @@ +--- +name: Build + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + # macos-13 is an intel runner, macos-14 is apple silicon + os: [ubuntu-latest, windows-latest, macos-13, macos-14] + + steps: + - uses: actions/checkout@v4 + + - name: Build wheels + uses: pypa/cibuildwheel@v2.22.0 + env: + CIBW_BEFORE_BUILD: > + cmake -B build -S . + -DCMAKE_BUILD_TYPE=Release + -DSPIRIT_BUILD_FOR_PYTHON=ON + -DSPIRIT_BUILD_TEST=OFF + CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28 + CIBW_MANYLINUX_I686_IMAGE: manylinux_2_28 + with: + package-dir: ./core/python + output-dir: wheelhouse + config-file: "{package}/pyproject.toml" + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./core/python/wheelhouse/*.whl