catch up to new scikit-build-core (#15) #212
This file contains hidden or 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: ${{ matrix.os }} py${{ matrix.python-version }} numpy${{ matrix.numpy-version }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | |
| python-version: ['3.10', '3.11', '3.12', '3.13'] | |
| numpy-version: ['1.24', '2.1', '2.2'] | |
| exclude: | |
| - python-version: '3.12' | |
| numpy-version: '1.24' | |
| - python-version: '3.13' | |
| numpy-version: '1.24' | |
| steps: | |
| - name: Check out | |
| uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v8.3.1 | |
| with: | |
| enable-cache: true | |
| - name: Setup micromamba | |
| uses: conda-incubator/setup-miniconda@v3 | |
| with: | |
| miniforge-variant: Miniforge3 | |
| miniforge-version: latest | |
| use-mamba: true | |
| python-version: ${{ matrix.python-version }} | |
| auto-update-conda: true | |
| environment-file: .github/environment.yml | |
| - name: Install Numpy ${{ matrix.numpy-version }} | |
| shell: bash -l {0} | |
| run: | | |
| PYTHON=$(python -c 'import sys; print(sys.executable)') | |
| uv pip install --python "$PYTHON" --reinstall "numpy==${{ matrix.numpy-version }}.*" | |
| - name: Install | |
| shell: bash -l {0} | |
| run: | | |
| PYTHON=$(python -c 'import sys; print(sys.executable)') | |
| uv pip install --python "$PYTHON" --no-build-isolation -Ccmake.define.WITH_TESTS=ON . | |
| - name: Test Unix | |
| shell: bash -l {0} | |
| if: matrix.os != 'windows-latest' | |
| run: | | |
| export PYTHONHOME=$CONDA_PREFIX | |
| export WHEEL_DIR=$(python -m "scikit_build_core.builder.wheel_tag") | |
| export PDAL_DRIVER_PATH=`pwd`/build/$WHEEL_DIR/Release | |
| echo $PDAL_DRIVER_PATH | |
| ls $PDAL_DRIVER_PATH | |
| pdal --drivers | |
| $PDAL_DRIVER_PATH/pdal_filters_python_test | |
| $PDAL_DRIVER_PATH/pdal_io_numpy_test | |
| - name: Build Source Distribution | |
| shell: bash -l {0} | |
| if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12' | |
| run: | | |
| sudo apt-get update -y | |
| sudo apt-get install pkg-config libssl-dev -y | |
| PYTHON=$(python -c 'import sys; print(sys.executable)') | |
| uv build --python "$PYTHON" --sdist -Ccmake.define.CMAKE_BUILD_WITH_INSTALL_RPATH=ON | |
| - name: Test Windows | |
| if: matrix.os == 'windows-latest' | |
| shell: bash -l {0} | |
| env: | |
| EXT: ${{ matrix.os == 'windows-latest' && '.exe' || '' }} | |
| run: | | |
| export PYTHONHOME=$CONDA_PREFIX | |
| export WHEEL_DIR=$(python -m "scikit_build_core.builder.wheel_tag") | |
| export PDAL_DRIVER_PATH=`pwd`/build/$WHEEL_DIR/Release/Release | |
| echo $PDAL_DRIVER_PATH | |
| ls $PDAL_DRIVER_PATH | |
| pdal --drivers | |
| $PDAL_DRIVER_PATH/pdal_filters_python_test$EXT | |
| $PDAL_DRIVER_PATH/pdal_io_numpy_test$EXT |