From fc1f1aa35f008698934cea4d647d63cfe0264fad Mon Sep 17 00:00:00 2001 From: Vincent Michaud-Rioux Date: Thu, 26 Oct 2023 19:12:41 +0000 Subject: [PATCH] Add release to compat workflows. --- .../compat-check-release-release.yml | 31 ++++++++ .github/workflows/tests_gpu_cu11.yml | 28 ++++++-- .github/workflows/tests_gpu_kokkos.yml | 26 ++++++- .github/workflows/tests_linux.yml | 70 ++++++++++++++++++- .github/workflows/tests_without_binary.yml | 26 ++++++- 5 files changed, 171 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/compat-check-release-release.yml diff --git a/.github/workflows/compat-check-release-release.yml b/.github/workflows/compat-check-release-release.yml new file mode 100644 index 0000000000..00b04cc9e1 --- /dev/null +++ b/.github/workflows/compat-check-release-release.yml @@ -0,0 +1,31 @@ +name: Compat Check w/PL - release/release + +on: + pull_request: + workflow_dispatch: + +jobs: + # tests_linux: + # name: Lightning Compatibility test (tests_linux) - release/release + # uses: ./.github/workflows/tests_linux.yml + # with: + # lightning-version: release + # pennylane-version: release + # tests_lkokkos_gpu: + # name: Lightning Compatibility test (tests_lkokkos_gpu) - release/release + # uses: ./.github/workflows/tests_gpu_kokkos.yml + # with: + # lightning-version: release + # pennylane-version: release + # tests_lgpu_gpu: + # name: Lightning Compatibility test (tests_lgpu_gpu) - release/release + # uses: ./.github/workflows/tests_gpu_cu11.yml + # with: + # lightning-version: release + # pennylane-version: release + tests_without_binary: + name: Lightning Compatibility test (tests_without_binary) - release/release + uses: ./.github/workflows/tests_without_binary.yml + with: + lightning-version: release + pennylane-version: release diff --git a/.github/workflows/tests_gpu_cu11.yml b/.github/workflows/tests_gpu_cu11.yml index 384d9ca019..d390c83ec5 100644 --- a/.github/workflows/tests_gpu_cu11.yml +++ b/.github/workflows/tests_gpu_cu11.yml @@ -9,11 +9,11 @@ on: 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) + description: The version of Lightning to use. Valid values are either 'release' (most recent release candidate), '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) + description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master) env: CI_CUDA_ARCH: 86 @@ -183,14 +183,19 @@ jobs: fetch-tags: true path: main + - name: Switch to release build of Lightning + if: inputs.lightning-version == 'release' + run: | + cd main + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + - 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 @@ -233,6 +238,21 @@ jobs: python -m pip install -r requirements-dev.txt python -m pip install cmake custatevec-cu11 openfermionpyscf + - name: Checkout PennyLane for release build + if: inputs.pennylane-version == 'release' + uses: actions/checkout@v3 + with: + path: pennylane + repository: PennyLaneAI/pennylane + + - name: Switch to release build of PennyLane + if: inputs.pennylane-version == 'release' + run: | + cd pennylane + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + python -m pip uninstall -y pennylane && python -m pip install . -vv + - name: Install Stable PennyLane if: inputs.pennylane-version == 'stable' run: | diff --git a/.github/workflows/tests_gpu_kokkos.yml b/.github/workflows/tests_gpu_kokkos.yml index 2879be1c8b..9133504f29 100644 --- a/.github/workflows/tests_gpu_kokkos.yml +++ b/.github/workflows/tests_gpu_kokkos.yml @@ -5,11 +5,11 @@ on: 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) + description: The version of Lightning to use. Valid values are either 'release' (most recent release candidate), '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) + description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master) pull_request: push: branches: @@ -236,6 +236,13 @@ jobs: path: main fetch-tags: true + - name: Switch to release build of Lightning + if: inputs.lightning-version == 'release' + run: | + cd main + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + - name: Switch to stable build of Lightning if: inputs.lightning-version == 'stable' run: | @@ -259,6 +266,21 @@ jobs: python -m pip install -r requirements-dev.txt python -m pip install openfermionpyscf + - name: Checkout PennyLane for release build + if: inputs.pennylane-version == 'release' + uses: actions/checkout@v3 + with: + path: pennylane + repository: PennyLaneAI/pennylane + + - name: Switch to release build of PennyLane + if: inputs.pennylane-version == 'release' + run: | + cd pennylane + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + python -m pip uninstall -y pennylane && python -m pip install . -vv + - name: Install Stable PennyLane if: inputs.pennylane-version == 'stable' run: | diff --git a/.github/workflows/tests_linux.yml b/.github/workflows/tests_linux.yml index b5df17d2ea..529193c594 100644 --- a/.github/workflows/tests_linux.yml +++ b/.github/workflows/tests_linux.yml @@ -5,11 +5,11 @@ on: 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) + description: The version of Lightning to use. Valid values are either 'release' (most recent release candidate), '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) + description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master) pull_request: push: branches: @@ -97,6 +97,13 @@ jobs: fetch-tags: true path: main + - name: Switch to release build of Lightning + if: inputs.lightning-version == 'release' + run: | + cd main + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + - name: Switch to stable build of Lightning if: inputs.lightning-version == 'stable' run: | @@ -120,6 +127,21 @@ jobs: python -m pip install -r requirements-dev.txt python -m pip install openfermionpyscf + - name: Checkout PennyLane for release build + if: inputs.pennylane-version == 'release' + uses: actions/checkout@v3 + with: + path: pennylane + repository: PennyLaneAI/pennylane + + - name: Switch to release build of PennyLane + if: inputs.pennylane-version == 'release' + run: | + cd pennylane + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + python -m pip uninstall -y pennylane && python -m pip install . -vv + - name: Install Stable PennyLane if: inputs.pennylane-version == 'stable' run: | @@ -224,6 +246,13 @@ jobs: fetch-tags: true path: main + - name: Switch to release build of Lightning + if: inputs.lightning-version == 'release' + run: | + cd main + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + - name: Switch to stable build of Lightning if: inputs.lightning-version == 'stable' run: | @@ -247,6 +276,21 @@ jobs: python -m pip install -r requirements-dev.txt python -m pip install openfermionpyscf + - name: Checkout PennyLane for release build + if: inputs.pennylane-version == 'release' + uses: actions/checkout@v3 + with: + path: pennylane + repository: PennyLaneAI/pennylane + + - name: Switch to release build of PennyLane + if: inputs.pennylane-version == 'release' + run: | + cd pennylane + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + python -m pip uninstall -y pennylane && python -m pip install . -vv + - name: Install Stable PennyLane if: inputs.pennylane-version == 'stable' run: | @@ -380,6 +424,13 @@ jobs: fetch-tags: true path: main + - name: Switch to release build of Lightning + if: inputs.lightning-version == 'release' + run: | + cd main + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + - name: Switch to stable build of Lightning if: inputs.lightning-version == 'stable' run: | @@ -418,6 +469,21 @@ jobs: python -m pip install -r requirements-dev.txt python -m pip install openfermionpyscf + - name: Checkout PennyLane for release build + if: inputs.pennylane-version == 'release' + uses: actions/checkout@v3 + with: + path: pennylane + repository: PennyLaneAI/pennylane + + - name: Switch to release build of PennyLane + if: inputs.pennylane-version == 'release' + run: | + cd pennylane + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + python -m pip uninstall -y pennylane && python -m pip install . -vv + - name: Install Stable PennyLane if: inputs.pennylane-version == 'stable' run: | diff --git a/.github/workflows/tests_without_binary.yml b/.github/workflows/tests_without_binary.yml index bb21da4cfb..32df6a50e8 100644 --- a/.github/workflows/tests_without_binary.yml +++ b/.github/workflows/tests_without_binary.yml @@ -5,11 +5,11 @@ on: 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) + description: The version of Lightning to use. Valid values are either 'release' (most recent release candidate), '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) + description: The version of PennyLane to use. Valid values are either 'release' (most recent release candidate), 'stable' (most recent git-tag) or 'latest' (most recent commit from master) pull_request: push: branches: @@ -40,6 +40,13 @@ jobs: fetch-tags: true path: main + - name: Switch to release build of Lightning + if: inputs.lightning-version == 'release' + run: | + cd main + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + - name: Switch to stable build of Lightning if: inputs.lightning-version == 'stable' run: | @@ -59,6 +66,21 @@ jobs: cd main python -m pip install -r requirements-dev.txt + - name: Checkout PennyLane for release build + if: inputs.pennylane-version == 'release' + uses: actions/checkout@v3 + with: + path: pennylane + repository: PennyLaneAI/pennylane + + - name: Switch to release build of PennyLane + if: inputs.pennylane-version == 'release' + run: | + cd pennylane + git fetch --all + git checkout $(git branch -a --list origin/v*rc* | tail -1) + python -m pip uninstall -y pennylane && python -m pip install . -vv + - name: Install Stable PennyLane if: inputs.pennylane-version == 'stable' run: |