Skip to content

Fix a few more crashes/type issues in compiler caching #1295

Fix a few more crashes/type issues in compiler caching

Fix a few more crashes/type issues in compiler caching #1295

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:
include:
- os: ubuntu-latest
cibw_archs_linux: x86_64
- os: ubuntu-24.04-arm
cibw_archs_linux: aarch64
- os: windows-latest
- os: macos-15-intel
- os: macos-14
steps:
- uses: actions/checkout@v6
with:
submodules: 'true'
- uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Build wheels
uses: pypa/cibuildwheel@v3.3.1
env:
CIBW_ARCHS_LINUX: ${{ matrix.cibw_archs_linux }}
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@v6
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@v6
with:
submodules: 'true'
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v6
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@v7
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1