From e133401c47a0b01708ee8aefe8cd55c9624db03f Mon Sep 17 00:00:00 2001 From: Alex Petty Date: Tue, 27 Feb 2024 23:32:13 -0600 Subject: [PATCH] Add a github actions workflow that will build wheels for Pgenlib python package. --- .github/workflows/build_python_wheel.yaml | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/build_python_wheel.yaml diff --git a/.github/workflows/build_python_wheel.yaml b/.github/workflows/build_python_wheel.yaml new file mode 100644 index 00000000..88d3ff64 --- /dev/null +++ b/.github/workflows/build_python_wheel.yaml @@ -0,0 +1,38 @@ +# Builds Python wheels for Pgenlib + +# At this time, builds only on macOS aarch64 +# because of problems with symlinks and the +# dockerized cibuildwheel Linux build + +name: Build Python Wheel + +on: [push, pull_request] + +jobs: + build_wheels: + name: Build wheels on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [macos-14] + + steps: + - uses: actions/checkout@v4 + + - name: Set up QEMU for aarch64 emulation + if: runner.os == 'Linux' + uses: docker/setup-qemu-action@v3 + with: + platforms: all + + - name: Build wheels + uses: pypa/cibuildwheel@v2.16.5 + with: + package-dir: './2.0/Python' + env: + CIBW_ARCHS_LINUX: auto aarch64 + + - uses: actions/upload-artifact@v4 + with: + name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} + path: ./wheelhouse/*.whl \ No newline at end of file