Updating test matrix #860
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
# Workflow template for testing plugins against PennyLane release candidate | |
name: lightning-latest-rc | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
env: | |
PLUGIN_REPO: PennyLaneAI/pennylane-lightning | |
PLUGIN_BRANCH: master | |
PLUGIN_PACKAGE: pennylane_lightning | |
PENNYLANE_BRANCH: master | |
GCC_VERSION: 11 | |
jobs: | |
tests: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
pl_backend: ["lightning_qubit", "lightning_kokkos"] | |
steps: | |
- name: Cancel Previous Runs | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.10" | |
- name: Install buildtools & compilers | |
run: | | |
sudo apt-get update && sudo apt-get -y -q install cmake gcc-${{ env.GCC_VERSION }} g++-${{ env.GCC_VERSION }} ninja-build | |
- name: Install requirements | |
run: | | |
pip install --upgrade pip | |
pip install --upgrade pybind11 | |
pip install pytest pytest-mock pytest-cov flaky pytest-benchmark | |
pip freeze | |
- name: Install PennyLane | |
run: | | |
pip install git+https://github.com/PennyLaneAI/[email protected] | |
- uses: actions/checkout@v2 | |
with: | |
repository: ${{ env.PLUGIN_REPO }} | |
path: plugin_repo | |
ref: ${{ env.PLUGIN_BRANCH }} | |
- name: Install Plugin | |
run: | | |
cd plugin_repo | |
SKIP_COMPILATION=True PL_BACKEND=lightning_qubit pip install . -vv | |
PL_BACKEND=${{ matrix.pl_backend }} pip install . -vv | |
- name: Run PennyLane device integration tests | |
run: | | |
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"` | |
pl-device-test --device ${DEVICENAME} --shots=None --skip-ops | |
pl-device-test --device ${DEVICENAME} --skip-ops --shots=20000 | |
- name: Run plugin tests | |
run: | | |
DEVICENAME=`echo ${{ matrix.pl_backend }} | sed "s/_/./g"` | |
PL_DEVICE=${DEVICENAME} python -m pytest plugin_repo/tests --tb=short |