Skip to content

Update baseline

Update baseline #1263

Workflow file for this run

name: Build and upload to PyPI
# Build on every branch push, tag push, and pull request change:
on:
push:
branches:
- main
tags:
- v*
pull_request:
schedule:
- cron: '17 3 * * 0'
jobs:
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-13, macos-14]
steps:
- uses: actions/checkout@v5
with:
submodules: 'true'
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.22.0
- name: Build wheels
uses: pypa/cibuildwheel@v3.2.1
env:
CIBW_ENVIRONMENT_WINDOWS: >
CL_INC_DIR='${{github.workspace}}/OpenCL-Headers/install/include'
CL_LIB_DIR="C:/Program Files/OpenCL-ICD-Loader/lib"
- uses: actions/upload-artifact@v5
with:
name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
submodules: 'true'
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v5
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs: [build_wheels, build_sdist]
environment: pypi
permissions:
id-token: write
runs-on: ubuntu-latest
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
# alternatively, to publish when a GitHub Release is created, use the following rule:
# if: github.event_name == 'release' && github.event.action == 'published'
steps:
- uses: actions/download-artifact@v6
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1