Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions .github/workflows/build_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,54 +30,56 @@
path: dist/*.tar.gz

build_wheels:
name: Build ${{ matrix.cibw_build }} wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
name: Build ${{ matrix.cibw_build }} wheels on ${{ matrix.os.name }}
runs-on: ${{ matrix.os.name }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-13, macos-latest]
vcpkg: [none]
os:
- name: ubuntu-latest
- name: ubuntu-24.04-arm
- name: macos-13
- name: macos-latest
- name: windows-latest
vcpkg: 'C:/vcpkg/installed/x64-windows'
- name: windows-11-arm
vcpkg: 'C:/vcpkg/installed/arm64-windows'
cibw_build: ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "cp314-*"]
include:
- os: windows-latest
vcpkg: 'C:/vcpkg/installed/x64-windows'
- os: windows-11-arm
vcpkg: 'C:/vcpkg/installed/arm64-windows'

steps:
- uses: actions/checkout@v4

- uses: mad9000/actions-find-and-replace-string@5
# Escaping '*'...
id: articafact_name
with:
source: cibw-wheels-${{ matrix.os }}-${{ matrix.cibw_build }}
source: cibw-wheels-${{ matrix.os.name }}-${{ matrix.cibw_build }}
find: '*'
replace: '_'

- name: Build wheels
uses: pypa/cibuildwheel@v3.3.0
env:
CIBW_ENABLE: cpython-freethreading
CIBW_ARCHS: native
CIBW_BUILD: ${{ matrix.cibw_build }}
CIBW_SKIP: "*musllinux*"
CIBW_TEST_REQUIRES: pytest pytest-httpserver
CIBW_TEST_COMMAND: pytest {project}/test
CIBW_BUILD_FRONTEND: build
CIBW_BEFORE_BUILD_LINUX: yum install -y expat-devel boost-devel zlib-devel bzip2-devel lz4-devel
CIBW_BEFORE_BUILD_MACOS: brew install boost
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0 SKBUILD_CMAKE_ARGS=-DWITH_LZ4=OFF
CIBW_BEFORE_BUILD_WINDOWS: vcpkg install bzip2 expat zlib boost-variant boost-iterator lz4
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake"'
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: 'pipx run delvewheel repair --add-path ${{ matrix.vcpkg }}/bin/ --add-path ${{ matrix.vcpkg }}/debug/bin -w {dest_dir} {wheel}'
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: 'pipx run delvewheel repair --add-path ${{ matrix.os.vcpkg }}/bin/ --add-path ${{ matrix.os.vcpkg }}/debug/bin -w {dest_dir} {wheel}'

- uses: actions/upload-artifact@v4
with:
name: ${{ steps.articafact_name.outputs.value }}
path: ./wheelhouse/*.whl

pypi-publish:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {contents: read}
name: Upload release to PyPI
if: github.event_name == 'release' && github.event.action == 'published' # only publish to PyPI on github release publication
runs-on: ubuntu-latest
Expand Down
Loading