Skip to content

Release on PyPI

Release on PyPI #69

Workflow file for this run

name: Release on PyPI
on:
push:
tags:
- "v*"
branches:
- cmeel
pull_request_target:
branches:
- cmeel
env:
CMEEL_LOG_LEVEL: DEBUG
jobs:
wheel:
name: "Wheel ${{ matrix.python }} ${{ matrix.os }} ${{ matrix.arch }} ${{ matrix.openmp }}"
runs-on: "${{ matrix.os }}-latest"
strategy:
matrix:
os: ["ubuntu", "macos"]
arch: ["x86_64", "aarch64", "arm64"]
python: ["cp38", "cp39", "cp310", "cp311", "cp312", "cp313"]
openmp: ["ON", "OFF"]
exclude:
- os: "macos"
arch: "x86_64"
- os: "macos"
arch: "aarch64"
- os: "macos"
python: "cp38"
- os: "ubuntu"
arch: "arm64"
- arch: "aarch64"
openmp: "ON"
- arch: "arm64"
openmp: "ON"
- arch: "x86_64"
openmp: "OFF"
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- name: Set up QEMU
if: matrix.arch == 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- run: pipx install cibuildwheel
- run: cibuildwheel --output-dir wh
env:
CIBW_BUILD: "${{ matrix.python }}-*"
CIBW_ARCHS: "${{ matrix.arch }}"
CIBW_SKIP: "*-musllinux*"
CIBW_MANYLINUX_X86_64_IMAGE: "quay.io/pypa/manylinux_2_28_x86_64"
CIBW_MANYLINUX_AARCH64_IMAGE: "quay.io/pypa/manylinux_2_28_aarch64"
CIBW_REPAIR_WHEEL_COMMAND: ""
CIBW_ENVIRONMENT: CMEEL_LOG_LEVEL="DEBUG" CMEEL_JOBS="1" CMEEL_TEST_JOBS="1" CMEEL_RUN_TESTS="false" CMEEL_CMAKE_ARGS="-DBUILD_WITH_OPENMP_SUPPORT=${{ matrix.openmp }}"
- uses: actions/upload-artifact@v4
with:
name: "artifact-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.python }}"
path: wh/pin*
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: setup
run: |
python -m pip install -U pip
python -m pip install build cmeel[build] coal-library[build] 'cmeel-urdfdom[build] < 4' scipy
- name: build sdist
run: python -m build -nso dist .
- uses: actions/upload-artifact@v4
with:
name: sdist
path: dist
release:
needs: ["wheel", "sdist"]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
- run: curl https://github.com/nim65s.gpg | gpg --import
- name: validate signature
run: >
git verify-tag --raw ${{ github.ref_name }} 2>&1
| grep -q 'VALIDSIG 9B1A79065D2F2B806C8A5A1C7D2ACDAF4653CF28'
- uses: actions/download-artifact@v4
- run: mkdir dist && mv sdist/* artifact*/* dist
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true