Add Python package build for multiple Python versions (Linux only) #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & test | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Build C++ | |
run: ./build_library_and_example.sh | |
build_python: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- 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 | |
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 |