-
Notifications
You must be signed in to change notification settings - Fork 35
109 lines (106 loc) · 3.35 KB
/
pypi-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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative works of this code must retain this
# copyright notice, and modified files need to carry a notice indicating
# that they have been altered from the originals.
name: Release to PyPi
on:
workflow_dispatch:
jobs:
publish_to_pypi:
name: Build and push QEC wheels
strategy:
matrix:
os: ["macOS-latest", "ubuntu-latest", "windows-2019"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.2.2
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Publish Wheels
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit
run : |
pip install -U twine
twine upload wheelhouse/*
publish_to_pypi_aarch64:
name: Build and push QEC wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
name: Install Python
with:
python-version: '3.8'
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
platforms: all
- name: Install cibuildwheel
run: |
python -m pip install cibuildwheel==2.2.2 twine
- name: Build wheels
run: |
python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_BEFORE_ALL_LINUX: "yum install -y https://dl.fedoraproject.org/pub/epel/7/aarch64/Packages/e/epel-release-7-12.noarch.rpm && yum install -y openblas-devel"
CIBW_ARCHS_LINUX: aarch64
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit
publish_to_pypi-arm64-macos:
name: Build and push QEC wheels onarm64 macos
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["macOS-latest"]
steps:
- uses: actions/checkout@v2
- name: Set up Python Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install deps
run: python -m pip install -U cibuildwheel==2.2.2 twine
- name: Build Wheels
env:
CIBW_ARCHS_MACOS: arm64
run: cibuildwheel --output-dir wheelhouse
- uses: actions/upload-artifact@v2
with:
path: ./wheelhouse/*.whl
- name: Upload to PyPI
run: twine upload ./wheelhouse/*.whl
env:
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
TWINE_USERNAME: qiskit