-
Notifications
You must be signed in to change notification settings - Fork 9
119 lines (111 loc) · 3.11 KB
/
deploy.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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Deploy to PyPI
on:
release:
types: [published]
push:
branches: [main]
pull_request:
merge_group:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
BOOST_VERSION_MAJOR: 1
BOOST_VERSION_MINOR: 76
BOOST_VERSION_PATCH: 0
jobs:
build_ubuntu_wheels:
name: Build wheels on Ubuntu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Build wheels
uses: pypa/cibuildwheel@v2.16
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-ubuntu-latest-${{ strategy.job-index }}
path: wheelhouse/*.whl
build_macos_wheels:
name: Build wheels on macOS
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install boost
run: brew install boost
- name: Build wheels
uses: pypa/cibuildwheel@v2.16
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-macos-latest-${{ strategy.job-index }}
path: wheelhouse/*.whl
build_windows_wheels:
name: Build wheels on Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- uses: ilammy/msvc-dev-cmd@v1
- name: Install boost
uses: MarkusJx/install-boost@v2.4.4
id: install-boost
with:
boost_version: ${{ env.BOOST_VERSION_MAJOR }}.${{ env.BOOST_VERSION_MINOR }}.${{ env.BOOST_VERSION_PATCH }}
platform_version: 2019
- name: Build wheels
uses: pypa/cibuildwheel@v2.16
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-windows-latest-${{ strategy.job-index }}
path: wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Install boost
run: sudo apt-get update && sudo apt-get -y install libboost-all-dev
- name: Build SDist
run: pipx run build --sdist
- name: Check metadata
run: pipx run twine check dist/*
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: dist/*.tar.gz
upload_pypi:
needs:
[
build_ubuntu_wheels,
build_macos_wheels,
build_windows_wheels,
build_sdist,
]
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
name: 🚀 Deploy to PyPI
environment:
name: pypi
url: https://pypi.org/p/mqt.qmap
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
pattern: cibw-*
path: dist
merge-multiple: true
- uses: pypa/gh-action-pypi-publish@release/v1