Skip to content

WHL: add wheels for Windows x86 #295

WHL: add wheels for Windows x86

WHL: add wheels for Windows x86 #295

Workflow file for this run

name: CD
on:
push:
tags: v*
pull_request:
paths:
- pyproject.toml
- meson.*
- .github/workflows/cd.yml
workflow_dispatch:
permissions: {}
jobs:
build_wheels:
name: Build ${{matrix.select}}-${{ matrix.archs }} wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
archs: x86_64
select: '*manylinux*'
id: manylinux_x86_64
- os: ubuntu-latest
archs: x86_64
select: '*musllinux*'
id: musllinux_x86_64
- os: ubuntu-24.04-arm
archs: aarch64
select: '*manylinux*'
id: manylinux_aarch64
- os: ubuntu-24.04-arm
archs: aarch64
select: '*musllinux*'
id: musllinux_aarch64
- os: macos-15-intel
archs: x86_64
select: '*'
id: macos_x86_64
- os: macos-latest
archs: arm64
select: '*'
id: macos_arm64
- os: windows-latest
archs: AMD64
select: '*'
id: windows_AMD64
- os: windows-latest
archs: x86
select: '*'
id: windows_x86
- os: windows-11-arm
archs: ARM64
select: '*'
id: windows_ARM64
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- if: ${{ !startswith( matrix.os , 'ubuntu' ) }}
uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
with:
enable-cache: true
prune-cache: false
- name: Build wheels for CPython
uses: pypa/cibuildwheel@9c00cb4f6b517705a3794b22395aedc36257242c # v3.2.1
env:
CIBW_ARCHS: ${{ matrix.archs }}
CIBW_BUILD: ${{ matrix.select }}
with:
output-dir: dist
- uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: wheels-${{ matrix.os }}-${{ matrix.id }}
path: dist/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
- uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2
with:
enable-cache: true
prune-cache: false
- name: Build sdist
run: |
uv sync --only-dev
uv build --sdist
- name: Upload sdist
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: sdist
path: dist/*.tar.gz
deploy:
name: Publish to PyPI
needs:
- build_wheels
- build_sdist
environment:
name: pypi
url: https://pypi.org/p/gpgi
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
steps:
- name: Download sdist
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: sdist
path: dist
- name: Download wheels
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
path: dist
pattern: wheels-*
merge-multiple: true
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0