release the Python GIL for long(er) running processes #332
Workflow file for this run
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 | |
on: | |
pull_request: | |
branches: | |
- '*' | |
push: | |
branches: | |
- '*' | |
release: | |
types: | |
- published | |
defaults: | |
run: | |
shell: bash -l -eo pipefail {0} | |
jobs: | |
build: | |
name: Build ${{ matrix.os }} py${{ matrix.python-version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
python-version: ['3.9', '3.10', '3.11', '3.12'] | |
steps: | |
- name: Check out python-pdal | |
uses: actions/checkout@v4 | |
- name: Check out python-pdal-plugins | |
uses: actions/checkout@v4 | |
with: | |
repository: PDAL/python-plugins | |
path: ./plugins | |
ref: gil-management | |
- name: Setup micromamba | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
miniforge-variant: Mambaforge | |
miniforge-version: latest | |
use-mamba: true | |
auto-update-conda: true | |
environment-file: .github/environment.yml | |
extra-specs: | | |
python=${{ matrix.python-version }} | |
- name: Install python-pdal | |
run: pip install . | |
- name: Install python-pdal-plugins | |
working-directory: ./plugins | |
run: pip install . | |
- name: Test | |
run: | | |
export PDAL_DRIVER_PATH=$(python -c "import os, skbuild; print(os.path.join('plugins', skbuild.constants.SKBUILD_DIR(), 'cmake-build'))") | |
pdal --drivers --debug | |
py.test -v test/ | |
- name: Build source distribution | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.10' | |
run: python setup.py sdist | |
- name: Upload distribution(s) | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ matrix.os }}-py${{ matrix.python-version }} | |
path: ./dist/* | |
publish: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- name: Download distributions | |
uses: actions/download-artifact@v2 | |
with: | |
path: ./artifacts | |
- name: Move artifacts to dist | |
run: | | |
mkdir dist | |
find ./artifacts -type f -exec mv {} ./dist \; | |
tree ./dist | |
- name: Publish package | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
if: github.event_name == 'release' && github.event.action == 'published' | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_TOKEN }} | |
packages_dir: ./dist | |
verbose: true |