forked from stack-of-tasks/pinocchio
-
Notifications
You must be signed in to change notification settings - Fork 1
86 lines (81 loc) · 2.54 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Release on PyPI
on:
push:
tags:
- "v*"
branches:
- cmeel
pull_request_target:
branches:
- cmeel
env:
CMEEL_LOG_LEVEL: DEBUG
jobs:
wheel:
name: "${{ matrix.build }} ${{ matrix.os }} ${{ matrix.arch }}"
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: ["ubuntu-latest", "macos-latest"]
arch: ["x86_64", "aarch64"]
build: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*"]
exclude:
- os: "macos-latest"
arch: "aarch64"
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.build }}
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_SKIP: "*-musllinux_aarch64"
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"
- uses: actions/upload-artifact@v3
with:
path: wh
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-python@v4
with:
python-version: 3.11
- name: setup
run: |
python -m pip install -U pip
python -m pip install build cmeel[build] hpp-fcl[build] cmeel-urdfdom[build]
- name: build sdist
run: python -m build -nso dist .
- uses: actions/upload-artifact@v3
with:
path: dist
release:
needs: ["wheel", "sdist"]
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-latest
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@v3
- run: pipx install twine
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/pin*.whl
- run: twine upload -u __token__ -p "${{ secrets.PYPI_TOKEN }}" artifact/pin*.tar.gz || true