Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compat workflows. #498

Merged
merged 40 commits into from
Sep 22, 2023
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
d029474
Add compat workflows.
vincentmr Sep 11, 2023
7f7f3bb
Auto update version
github-actions[bot] Sep 11, 2023
c8f80a3
Comment on pull_request
vincentmr Sep 11, 2023
6e1d907
Compat on pull_request
vincentmr Sep 11, 2023
9bf4513
cd main
vincentmr Sep 11, 2023
ed1b8f7
Fix lightning-kokkos-version.
vincentmr Sep 11, 2023
2e94a49
Get correct version of PennyLane.
vincentmr Sep 11, 2023
e1e0ee2
Install stable pennylane.
vincentmr Sep 11, 2023
8ab1bd5
Fix pennylane stable case.
vincentmr Sep 11, 2023
c76112c
git log | head -1
vincentmr Sep 11, 2023
9b2bb80
Fix pip uninstall
vincentmr Sep 11, 2023
4397ba0
Fix pip uninstall
vincentmr Sep 11, 2023
a38fae1
Merge remote-tracking branch 'origin/master' into plugin-test-matrix
vincentmr Sep 14, 2023
4595021
Skip cpp test unless latest/latest.
vincentmr Sep 14, 2023
338aaf6
Add stable switch to python tests and git status.
vincentmr Sep 14, 2023
c20df9a
Update tags.
vincentmr Sep 14, 2023
429a3c9
Add tests_without_binary in compat tests.
vincentmr Sep 14, 2023
8e3bee5
Update changelog.
vincentmr Sep 14, 2023
b7874ee
Increase tests_without_binary.yml fetch_depth.
vincentmr Sep 14, 2023
45a5286
Fix inputs in compats.
vincentmr Sep 14, 2023
7ea9126
Fix compat cpp tests.
vincentmr Sep 14, 2023
b085ccd
Skip cpp workflow_call
vincentmr Sep 14, 2023
778aeb0
Fix cpp skip.
vincentmr Sep 14, 2023
0e7a2e8
Use prod if cond and revert all pull_request triggers.
vincentmr Sep 14, 2023
bf85ec0
Auto update version
github-actions[bot] Sep 14, 2023
90196eb
trigger CI
vincentmr Sep 14, 2023
754ba3a
Merge branch 'master' into plugin-test-matrix
vincentmr Sep 15, 2023
82976d9
Auto update version
github-actions[bot] Sep 15, 2023
85973f5
trigger CI
vincentmr Sep 15, 2023
6fb49f3
Use default fetch-depth and fetch-tags where necessary.
vincentmr Sep 19, 2023
e786a90
Auto update version
github-actions[bot] Sep 19, 2023
2a8e59e
Merge remote-tracking branch 'origin/master' into plugin-test-matrix
vincentmr Sep 19, 2023
3ab291a
trigger CI
vincentmr Sep 19, 2023
ab5a856
Merge branch 'master' into plugin-test-matrix
vincentmr Sep 19, 2023
a78b12d
Auto update version
github-actions[bot] Sep 19, 2023
c3ab411
trigger CI
vincentmr Sep 19, 2023
391c5d7
Update .github/CHANGELOG.md
vincentmr Sep 22, 2023
0822b58
Merge branch 'master' into plugin-test-matrix
vincentmr Sep 22, 2023
ddfb7fd
Auto update version
github-actions[bot] Sep 22, 2023
e8062ee
trigger CI
vincentmr Sep 22, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@

### Breaking changes

* Add workflows validating compatibility between PennyLane and Lightning's most recent stable releases and development versions.
vincentmr marked this conversation as resolved.
Show resolved Hide resolved
[(#498)](https://github.com/PennyLaneAI/pennylane-lightning/pull/498)

* Enums defined in `GateOperation.hpp` start at `1` (previously `0`). `::BEGIN` is introduced in a few places where it was assumed `0` accordingly.
[(#485)](https://github.com/PennyLaneAI/pennylane-lightning/pull/485)

Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/compat-check-latest-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Compat Check w/PL - latest/latest

on:
schedule:
- cron: "0 3 * * 1-5" # Run daily at 3am Mon-Fri
mlxd marked this conversation as resolved.
Show resolved Hide resolved
workflow_dispatch:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - latest/latest
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: latest
pennylane-version: latest
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - latest/latest
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: latest
pennylane-version: latest
20 changes: 20 additions & 0 deletions .github/workflows/compat-check-latest-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Compat Check w/PL - latest/stable

on:
schedule:
- cron: "0 3 * * 1-5" # Run daily at 3am Mon-Fri
workflow_dispatch:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - latest/stable
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: latest
pennylane-version: stable
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - latest/stable
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: latest
pennylane-version: stable
20 changes: 20 additions & 0 deletions .github/workflows/compat-check-stable-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Compat Check w/PL - stable/latest

on:
schedule:
- cron: "0 3 * * 1-5" # Run daily at 3am Mon-Fri
workflow_dispatch:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - stable/latest
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: stable
pennylane-version: latest
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - stable/latest
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: stable
pennylane-version: latest
20 changes: 20 additions & 0 deletions .github/workflows/compat-check-stable-stable.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Compat Check w/PL - stable/stable

on:
schedule:
- cron: "0 3 * * 1-5" # Run daily at 3am Mon-Fri
workflow_dispatch:

jobs:
tests_linux:
name: Lightning-Kokkos Compatibility test (tests_linux) - stable/stable
uses: ./.github/workflows/tests_linux.yml
with:
lightning-version: stable
pennylane-version: stable
tests_without_binary:
name: Lightning-Kokkos Compatibility test (tests_without_binary) - stable/stable
uses: ./.github/workflows/tests_without_binary.yml
with:
lightning-version: stable
pennylane-version: stable
63 changes: 61 additions & 2 deletions .github/workflows/tests_linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
name: Testing (Linux)
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:
Expand All @@ -13,11 +23,12 @@ env:
OMP_NUM_THREADS: "2"

concurrency:
group: tests_linux-${{ github.ref }}
group: tests_linux-${{ github.ref }}-${{ inputs.lightning-version }}-${{ inputs.pennylane-version }}
cancel-in-progress: true

jobs:
cpptests:
if: ${{ github.event_name != 'workflow_call' || (inputs.lightning-version == 'latest' && inputs.pennylane-version == 'latest') }}
strategy:
matrix:
os: [ubuntu-22.04]
Expand Down Expand Up @@ -97,7 +108,16 @@ jobs:
uses: actions/checkout@v3
with:
path: main
fetch-depth: 2
fetch-depth: ${{ inputs.lightning-version == 'stable' && 0 || 2 }}
vincentmr marked this conversation as resolved.
Show resolved Hide resolved

- name: Switch to stable build of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --all --tags
git checkout $(git tag | sort -V | tail -1)
git log -1 --format='%H'
git status

- uses: actions/setup-python@v4
name: Install Python
Expand All @@ -112,6 +132,12 @@ jobs:
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 ML libraries for interfaces
run: |
python -m pip install --upgrade torch==$TORCH_VERSION -f https://download.pytorch.org/whl/cpu/torch_stable.html
Expand Down Expand Up @@ -140,6 +166,7 @@ jobs:
path: ./main/coverage-${{ github.job }}-${{ matrix.pl_backend }}.xml

cpptestswithOpenBLAS:
if: ${{ github.event_name != 'workflow_call' || (inputs.lightning-version == 'latest' && inputs.pennylane-version == 'latest') }}
strategy:
matrix:
os: [ubuntu-22.04]
Expand Down Expand Up @@ -222,6 +249,15 @@ jobs:
path: main
fetch-depth: 2

- name: Switch to stable build of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --all --tags
git checkout $(git tag | sort -V | tail -1)
git log -1 --format='%H'
git status

- uses: actions/setup-python@v4
name: Install Python
with:
Expand All @@ -235,6 +271,12 @@ jobs:
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
mlxd marked this conversation as resolved.
Show resolved Hide resolved

- name: Install ML libraries for interfaces
run: |
python -m pip install --upgrade torch==$TORCH_VERSION -f https://download.pytorch.org/whl/cpu/torch_stable.html
Expand Down Expand Up @@ -269,6 +311,7 @@ jobs:
os: ubuntu-22.04

cpptestswithKokkos:
if: ${{ github.event_name != 'workflow_call' || (inputs.lightning-version == 'latest' && inputs.pennylane-version == 'latest') }}
needs: [build_and_cache_Kokkos]
strategy:
matrix:
Expand Down Expand Up @@ -372,6 +415,15 @@ jobs:
path: main
fetch-depth: 2

- name: Switch to stable build of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --all --tags
git checkout $(git tag | sort -V | tail -1)
git log -1 --format='%H'
git status

- uses: actions/setup-python@v4
name: Install Python
with:
Expand All @@ -398,6 +450,12 @@ jobs:
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 ML libraries for interfaces
run: |
python -m pip install --upgrade torch==$TORCH_VERSION -f https://download.pytorch.org/whl/cpu/torch_stable.html
Expand Down Expand Up @@ -490,6 +548,7 @@ jobs:

cpptestsWithMultipleBackends:
# Device-specific tests are performed for both. Device-agnostic tests default to LightningQubit.
if: ${{ github.event_name != 'workflow_call' || (inputs.lightning-version == 'latest' && inputs.pennylane-version == 'latest') }}
needs: [build_and_cache_Kokkos]
strategy:
matrix:
Expand Down
31 changes: 29 additions & 2 deletions .github/workflows/tests_without_binary.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
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
pull_request:


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 }}
group: tests_without_binary-${{ github.ref }}-${{ inputs.lightning-version }}-${{ inputs.pennylane-version }}
cancel-in-progress: true

jobs:
Expand All @@ -26,6 +37,16 @@ jobs:
uses: actions/checkout@v3
with:
path: main
fetch-depth: 2

- name: Switch to stable build of Lightning
if: inputs.lightning-version == 'stable'
run: |
cd main
git fetch --all --tags
git checkout $(git tag | sort -V | tail -1)
git log -1 --format='%H'
git status

- uses: actions/setup-python@v4
name: Install Python
Expand All @@ -37,6 +58,12 @@ jobs:
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 lightning.qubit device
env:
SKIP_COMPILATION: True
Expand Down
2 changes: 1 addition & 1 deletion pennylane_lightning/core/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
Version number (major.minor.patch[-label])
"""

__version__ = "0.33.0-dev9"
__version__ = "0.33.0-dev10"