Fix RPATH in pybind11 module for 0.33 #3730
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Testing without binary | |
on: | |
workflow_call: | |
inputs: | |
lightning-version: | |
type: string | |
required: true | |
description: The version of lightning to use. Valid values are either 'stable' (most recent git-tag) or 'latest' (most recent commit from master) | |
pennylane-version: | |
type: string | |
required: true | |
description: The version of PennyLane to use. Valid values are either 'stable' (most recent git-tag) or 'latest' (most recent commit from master) | |
pull_request: | |
push: | |
branches: | |
- master | |
env: | |
COVERAGE_FLAGS: "--cov=pennylane_lightning --cov-report=term-missing --cov-report=xml:./coverage.xml --no-flaky-report -p no:warnings --tb=native" | |
concurrency: | |
group: tests_without_binary-${{ github.ref }}-${{ inputs.lightning-version }}-${{ inputs.pennylane-version }} | |
cancel-in-progress: true | |
jobs: | |
pythontests: | |
timeout-minutes: 30 | |
name: Python tests | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
pl_backend: ["lightning_qubit", "lightning_kokkos", "lightning_gpu"] | |
steps: | |
- name: Checkout PennyLane-Lightning | |
uses: actions/checkout@v3 | |
with: | |
fetch-tags: true | |
path: main | |
- name: Switch to stable build of Lightning | |
if: inputs.lightning-version == 'stable' | |
run: | | |
cd main | |
git fetch --tags --force | |
git checkout $(git tag | sort -V | tail -1) | |
git log -1 --format='%H' | |
git status | |
- uses: actions/setup-python@v4 | |
name: Install Python | |
with: | |
python-version: '3.9' | |
- name: Get required Python packages | |
run: | | |
cd main | |
python -m pip install -r requirements-dev.txt | |
- name: Install Stable PennyLane | |
if: inputs.pennylane-version == 'stable' | |
run: | | |
cd main | |
python -m pip uninstall -y pennylane && python -m pip install -U pennylane | |
- name: Install the pennylane_lightning package | |
if: ${{ matrix.pl_backend == 'lightning_kokkos' || matrix.pl_backend == 'lightning_gpu'}} | |
run: | | |
cd main | |
SKIP_COMPILATION=True PL_BACKEND="lightning_qubit" pip install -e . -vv | |
- name: Install backend device | |
env: | |
SKIP_COMPILATION: True | |
PL_BACKEND: ${{ matrix.pl_backend }} | |
run: | | |
cd main | |
python -m pip install -e . -vv | |
- name: Run PennyLane-Lightning unit tests | |
run: | | |
cd main/ | |
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"` | |
PL_DEVICE=${DEVICENAME} python -m pytest tests/ $COVERAGE_FLAGS | |
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 $COVERAGE_FLAGS --cov-append | |
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops $COVERAGE_FLAGS --cov-append | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
files: ./main/coverage.xml | |
fail_ci_if_error: true | |
token: ${{ secrets.CODECOV_TOKEN }} |