From 5b0d4c7146029436749c0081f13c09764439cb4d Mon Sep 17 00:00:00 2001 From: Otto Seiskari Date: Sun, 2 Jun 2024 16:06:31 +0300 Subject: [PATCH] Add Python package build for multiple Python versions (Linux only) --- .github/workflows/build.yml | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c17d47d..119815d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,33 @@ jobs: - name: Install build dependencies run: | sudo apt-get install python3 python3-pip - pip install pybind11 + pip install pybind11 wheel - name: Build Python - run: ./build_and_test_python_library.sh \ No newline at end of file + run: ./build_and_test_python_library.sh + build_binary_packages: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] + steps: + - uses: actions/checkout@v2 + with: + submodules: 'recursive' + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Display Python version + run: python -c "import sys; print(sys.version)" + - name: Install build dependencies + run: | + sudo apt-get install python3 python3-pip + pip install pybind11 wheel + - name: Build Python + run: ./build_and_test_python_library.sh + - uses: actions/upload-artifact@v2 + with: + name: wheel-${{ matrix.python-version }} + retention-days: 5 + path: | + dist/IsoOctree*.whl \ No newline at end of file