-
Notifications
You must be signed in to change notification settings - Fork 750
83 lines (78 loc) · 2.01 KB
/
bindings.python.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
name: Bindings Python
on:
pull_request:
branches:
- main
paths:
- "src/**"
- ".github/workflows/bindings.python.yml"
workflow_call:
inputs:
tag:
description: Tag to release
required: true
type: string
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }}
cancel-in-progress: true
jobs:
linux:
runs-on: [self-hosted, "${{ matrix.runner }}", Linux, 8c16g, gcp]
strategy:
matrix:
include:
- { arch: x86_64, runner: X64 }
# - { arch: aarch64, runner: ARM64 }
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/build_bindings_python
with:
target: ${{ matrix.arch }}-unknown-linux-gnu
version: ${{ inputs.tag }}
- name: upload
if: inputs.tag
uses: actions/upload-artifact@v4
with:
name: python-linux-${{ matrix.arch }}
path: src/bendpy/dist/*.whl
macos:
if: inputs.tag
runs-on: macos-latest
strategy:
matrix:
arch:
- aarch64
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/build_bindings_python
with:
target: ${{ matrix.arch }}-apple-darwin
version: ${{ inputs.tag }}
- name: upload
if: inputs.tag
uses: actions/upload-artifact@v4
with:
name: python-macos-${{ matrix.arch }}
path: src/bendpy/dist/*.whl
publish:
if: inputs.tag
name: Publish
needs: [linux, macos]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: python-*
merge-multiple: true
path: src/bendpy/dist
- name: Publish to PyPI
timeout-minutes: 10
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
packages-dir: src/bendpy/dist