This repository has been archived by the owner on Mar 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (68 loc) · 2.22 KB
/
wheel_noarch.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
name: Wheel::Any::None
# **What it does**: Builds a pure python wheel for Linux (ubuntu-latest) and store it as an artifact.
# Python version: 3.9.
# **Why we have it**: To test the wheel build in the python layer, with no compilation.
# **Who does it impact**: Wheels to be uploaded to PyPI.
on:
pull_request:
push:
branches:
- master
release:
types: [published]
concurrency:
group: wheel_noarch-${{ github.ref }}
cancel-in-progress: true
jobs:
build-pure-python-wheel:
runs-on: ubuntu-latest
strategy:
matrix:
pl_backend: ["lightning_qubit"]
name: ${{ matrix.os }} - Pure Python wheels - ${{ matrix.pl_backend }} (Python 3.9)
steps:
- name: Checkout PennyLane-Lightning
uses: actions/checkout@v3
with:
path: main
- uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Upgrade pip
run: |
python -m pip install --upgrade pip
- name: Install CMake and ninja
run: |
python -m pip install --upgrade cmake ninja
- name: Build wheels
run: |
python -m pip install --upgrade pip wheel
cd main
python setup.py bdist_wheel
env:
SKIP_COMPILATION: True
- name: Validate wheels
run: |
python -m pip install twine
python -m twine check main/dist/*.whl
- uses: actions/upload-artifact@v2
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }}
with:
name: pure-python-wheels-${{ matrix.pl_backend }}.zip
path: main/dist/*.whl
# Refine and uncomment before merging to pennylane-lightning repository
# upload-pypi:
# needs: build-pure-python-wheel
# runs-on: ubuntu-latest
# if: ${{ github.event_name == 'release' }}
# steps:
# - uses: actions/download-artifact@v2
# with:
# name: pure-python-wheels.zip
# path: dist
# - name: Upload wheels to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.TEST_PYPI_API_TOKEN }}
# repository_url: https://test.pypi.org/legacy/