Skip to content

refactor: fix compile errors when used from ddtrace #482

refactor: fix compile errors when used from ddtrace

refactor: fix compile errors when used from ddtrace #482

Workflow file for this run

name: Build and publish
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
build_wheels_linux:
name: Build wheels on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_BEFORE_ALL: './.github/workflows/cibw_before_all.sh'
# TODO: libunwind fails to compile on aarch64
CIBW_ARCHS_LINUX: x86_64 i686 # aarch64 ppc64le s390x
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*
CIBW_SKIP: "*-musllinux_i686"
- uses: actions/upload-artifact@v4
with:
name: artifact-wheel-linux
path: ./wheelhouse/*.whl
build_wheels_macos:
name: Build wheels on macos-latest
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS: x86_64 arm64 universal2
CIBW_BUILD: cp38-* cp39-* cp310-* cp311-* cp312-* cp313-*
CIBW_SKIP: "*-macosx_10_9_*"
- uses: actions/upload-artifact@v4
with:
name: artifact-wheel-macos
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: artifact-dist
path: dist/*.tar.gz
upload_pypi:
name: Upload to PyPI
needs: [build_wheels_linux, build_wheels_macos, build_sdist]
runs-on: ubuntu-latest
environment: pypi
permissions:
id-token: write
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v4
with:
name: artifact-*
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1