From 21cc89ffd044ab41753581293d3b8d9808098cee Mon Sep 17 00:00:00 2001 From: Vincent Michaud-Rioux Date: Wed, 20 Mar 2024 14:15:33 -0400 Subject: [PATCH] Only build wheels when label build_wheels is activated. (#648) * Init commit * Auto update version * Update changelog. * trigger ci * trigger ci * Add condition to run when merging to master. * Update .github/workflows/wheel_linux_x86_64.yml Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com> * Use Rashid's expression. * Update .github/CHANGELOG.md Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> --------- Co-authored-by: Dev version update bot Co-authored-by: Rashid N H M <95639609+rashidnhm@users.noreply.github.com> Co-authored-by: Ali Asadi <10773383+maliasadi@users.noreply.github.com> --- .github/CHANGELOG.md | 3 +++ .github/workflows/wheel_linux_x86_64.yml | 1 + .github/workflows/wheel_linux_x86_64_cuda.yml | 1 + .github/workflows/wheel_macos_arm64.yml | 1 + .github/workflows/wheel_macos_x86_64.yml | 1 + .github/workflows/wheel_noarch.yml | 1 + .github/workflows/wheel_win_x86_64.yml | 1 + pennylane_lightning/core/_version.py | 2 +- 8 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 0f64e15764..74bdecc135 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -23,6 +23,9 @@ ### Breaking changes +* Introduce `ci:build_wheels` label, which controls wheel building on `pull_request` and other triggers. + [(#648)](https://github.com/PennyLaneAI/pennylane-lightning/pull/648) + ### Improvements * Initialize the private attributes `gates_indices_` and `generators_indices_` of `StateVectorKokkos` using the definitions of the `Pennylane::Gates::Constant` namespace. diff --git a/.github/workflows/wheel_linux_x86_64.yml b/.github/workflows/wheel_linux_x86_64.yml index 35e48a29f7..9101665494 100644 --- a/.github/workflows/wheel_linux_x86_64.yml +++ b/.github/workflows/wheel_linux_x86_64.yml @@ -22,6 +22,7 @@ concurrency: jobs: set_wheel_build_matrix: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') name: "Set wheel build matrix" uses: ./.github/workflows/set_wheel_build_matrix.yml with: diff --git a/.github/workflows/wheel_linux_x86_64_cuda.yml b/.github/workflows/wheel_linux_x86_64_cuda.yml index 4f6570380c..f537e53b31 100644 --- a/.github/workflows/wheel_linux_x86_64_cuda.yml +++ b/.github/workflows/wheel_linux_x86_64_cuda.yml @@ -22,6 +22,7 @@ concurrency: jobs: set_wheel_build_matrix: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') name: "Set wheel build matrix" uses: ./.github/workflows/set_wheel_build_matrix.yml with: diff --git a/.github/workflows/wheel_macos_arm64.yml b/.github/workflows/wheel_macos_arm64.yml index a381e5305a..1d5e9f097a 100644 --- a/.github/workflows/wheel_macos_arm64.yml +++ b/.github/workflows/wheel_macos_arm64.yml @@ -24,6 +24,7 @@ concurrency: jobs: mac-set-matrix-arm: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') timeout-minutes: 30 name: Set builder matrix runs-on: ubuntu-latest diff --git a/.github/workflows/wheel_macos_x86_64.yml b/.github/workflows/wheel_macos_x86_64.yml index e727468fe4..7bcf05a793 100644 --- a/.github/workflows/wheel_macos_x86_64.yml +++ b/.github/workflows/wheel_macos_x86_64.yml @@ -22,6 +22,7 @@ concurrency: jobs: set_wheel_build_matrix: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') name: "Set wheel build matrix" uses: ./.github/workflows/set_wheel_build_matrix.yml with: diff --git a/.github/workflows/wheel_noarch.yml b/.github/workflows/wheel_noarch.yml index d30145161d..ed4bfbdff4 100644 --- a/.github/workflows/wheel_noarch.yml +++ b/.github/workflows/wheel_noarch.yml @@ -19,6 +19,7 @@ concurrency: jobs: build-pure-python-wheel: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') strategy: matrix: os: [ubuntu-latest] diff --git a/.github/workflows/wheel_win_x86_64.yml b/.github/workflows/wheel_win_x86_64.yml index 7ba0704c0b..086c81c1e2 100644 --- a/.github/workflows/wheel_win_x86_64.yml +++ b/.github/workflows/wheel_win_x86_64.yml @@ -23,6 +23,7 @@ concurrency: jobs: set_wheel_build_matrix: + if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') name: "Set wheel build matrix" uses: ./.github/workflows/set_wheel_build_matrix.yml with: diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index fb85e127e0..000566162d 100644 --- a/pennylane_lightning/core/_version.py +++ b/pennylane_lightning/core/_version.py @@ -16,4 +16,4 @@ Version number (major.minor.patch[-label]) """ -__version__ = "0.36.0-dev12" +__version__ = "0.36.0-dev13"