Skip to content

[pre-commit.ci] pre-commit autoupdate #297

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #297

Workflow file for this run

# https://github.com/pybind/scikit_build_example
name: Wheels
on:
workflow_dispatch:
pull_request:
release:
types:
- published
# https://stackoverflow.com/questions/66335225
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build_sdist:
name: Build SDist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/checkout@v4
with:
repository: hobu/laz-perf
ref: 3.0.0
path: libs/laz-perf
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
build_wheels:
name: Wheels on ${{ matrix.os }} ${{ matrix.pyver }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# macos-13 is an intel runner, macos-14 is apple silicon
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: actions/checkout@v4
with:
repository: hobu/laz-perf
ref: 3.0.0
path: libs/laz-perf
- uses: suisei-cn/actions-download-file@v1
name: Download autzen
with:
url: "https://github.com/PDAL/data/raw/a3d2a351ca1002c7ea4daa96b5c5fcb0fafeaa6f/autzen/autzen-classified.copc.laz"
target: test/data/
- uses: ilammy/msvc-dev-cmd@v1
- uses: pypa/cibuildwheel@v2.23.3
env:
CIBW_TEST_COMMAND: pytest {project}/test
CIBW_TEST_EXTRAS: test
CIBW_BUILD_VERBOSITY: 1
CIBW_SKIP: pp* *-musllinux* *-win32 *-manylinux_i686
- name: Verify clean directory
run: git diff --exit-code
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
upload_all:
name: Upload if release
needs: [build_wheels, build_sdist]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v4
with:
# unpacks all CIBW artifacts into dist/
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@v1.12.4
with:
user: __token__
password: ${{ secrets.pypi_password }}