-
Notifications
You must be signed in to change notification settings - Fork 305
95 lines (83 loc) · 2.56 KB
/
uploadWheels.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
87
88
89
90
91
92
93
94
95
name: Upload Wheels
on:
release:
types: [created]
workflow_dispatch:
schedule:
- cron: 0 12 * * *
jobs:
build_wheels:
name: Build wheels with ${{ matrix.config.cibw_build }}
runs-on: ${{ matrix.config.os }}
if: github.repository == 'llvm/circt'
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-20.04
cibw_build: cp38-manylinux_x86_64
- os: ubuntu-20.04
cibw_build: cp39-manylinux_x86_64
- os: ubuntu-20.04
cibw_build: cp310-manylinux_x86_64
- os: ubuntu-20.04
cibw_build: cp311-manylinux_x86_64
- os: macos-12
cibw_build: cp38-macosx_x86_64
- os: macos-12
cibw_build: cp39-macosx_x86_64
- os: macos-12
cibw_build: cp310-macosx_x86_64
- os: macos-12
cibw_build: cp311-macosx_x86_64
steps:
- name: Get CIRCT
uses: actions/checkout@v3
with:
fetch-depth: 2
submodules: "true"
- name: Unshallow CIRCT
run: |
git fetch --force --unshallow --tags --no-recurse-submodules
- name: Setup Python
uses: actions/setup-python@v3
- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse ./lib/Bindings/Python
env:
CIBW_BUILD: ${{ matrix.config.cibw_build }}
CIBW_MANYLINUX_X86_64_IMAGE: manylinux2014
CIBW_BUILD_FRONTEND: build
SETUPTOOLS_SCM_DEBUG: True
- name: Upload (stage) wheels as artifacts
uses: actions/upload-artifact@v3
with:
name: python-wheels
path: ./wheelhouse/*.whl
retention-days: 7
if-no-files-found: error
push_wheels:
name: Push wheels (Tag or Nightly)
runs-on: ubuntu-20.04
if: github.repository == 'llvm/circt' && (github.ref_type == 'tag' || github.event_name == 'schedule')
needs: build_wheels
environment:
name: pypi
url: https://pypi.org/p/circt
permissions:
id-token: write
steps:
- name: Download wheels
uses: actions/download-artifact@v3
with:
name: python-wheels
path: ./wheelhouse/
- name: List downloaded wheels
run: ls -laR
working-directory: ./wheelhouse/
- name: Upload wheels to pypi
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: wheelhouse/
verify-metadata: false