Skip to content

Implement unified docs for Lightning Qubit and Kokkos #2791

Implement unified docs for Lightning Qubit and Kokkos

Implement unified docs for Lightning Qubit and Kokkos #2791

Workflow file for this run

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:
strategy:
matrix:
os: [ubuntu-latest]
pl_backend: ["lightning_kokkos", "lightning_qubit"]
name: ${{ matrix.os }} - Pure Python wheels - ${{ matrix.pl_backend }} (Python 3.9)
runs-on: ${{ matrix.os }}
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@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }}
with:
name: pure-python-wheels-${{ matrix.pl_backend }}.zip
path: main/dist/*.whl
upload-pypi:
needs: build-pure-python-wheel
strategy:
matrix:
pl_backend: ["lightning_qubit"]
runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' }}
steps:
- uses: actions/download-artifact@v3
with:
name: pure-python-wheels-${{ matrix.pl_backend }}.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/