Skip to content

Commit

Permalink
Merge branch 'master' into fix_Windows_wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentmr authored Apr 22, 2024
2 parents 3800b1c + 43bed84 commit c762242
Show file tree
Hide file tree
Showing 9 changed files with 95 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
* Improve support for new operator arithmetic with `QuantumScriptSerializer.serialize_observables`.
[(#670)](https://github.com/PennyLaneAI/pennylane-lightning/pull/670)

* Add `workflow_dispatch` to wheels recipes; allowing developers to build wheels manually on a branch instead of temporarily changing the headers.
[(#679)](https://github.com/PennyLaneAI/pennylane-lightning/pull/679)

### Documentation

### Bug fixes
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/wheel_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- master
release:
types: [published]
workflow_dispatch:

concurrency:
group: wheel_linux_aarch64-${{ github.ref }}
Expand Down Expand Up @@ -161,7 +162,10 @@ jobs:
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'

- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }}
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master'
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
Expand All @@ -174,7 +178,9 @@ jobs:
pl_backend: ["lightning_qubit"]
runs-on: ubuntu-latest

if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
if: |
github.event_name == 'release' ||
github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/wheel_linux_ppc64le.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- master
release:
types: [published]
workflow_dispatch:

concurrency:
group: wheel_linux_ppc64le-${{ github.ref }}
Expand Down Expand Up @@ -152,7 +153,11 @@ jobs:
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'

- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' || steps.rc_build.outputs.match != ''}}
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
Expand All @@ -165,7 +170,9 @@ jobs:
pl_backend: ["lightning_qubit"]
runs-on: ubuntu-latest

if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
if: |
github.event_name == 'release' ||
github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/wheel_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ on:
- master
release:
types: [published]
workflow_dispatch:

concurrency:
group: wheel_linux_x86_64-${{ github.ref }}
cancel-in-progress: true

jobs:
set_wheel_build_matrix:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels')
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') ||
github.event_name == 'workflow_dispatch'
name: "Set wheel build matrix"
uses: ./.github/workflows/set_wheel_build_matrix.yml
with:
Expand Down Expand Up @@ -176,7 +180,11 @@ jobs:
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'

- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' || steps.rc_build.outputs.match != ''}}
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
Expand All @@ -189,7 +197,9 @@ jobs:
pl_backend: ["lightning_qubit"]
runs-on: ubuntu-latest

if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
if: |
github.event_name == 'release' ||
github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/wheel_linux_x86_64_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,18 @@ on:
- master
release:
types: [published]
workflow_dispatch:

concurrency:
group: wheel_linux_x86_64_cu12-${{ github.ref }}
cancel-in-progress: true

jobs:
set_wheel_build_matrix:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels')
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') ||
github.event_name == 'workflow_dispatch'
name: "Set wheel build matrix"
uses: ./.github/workflows/set_wheel_build_matrix.yml
with:
Expand Down Expand Up @@ -106,7 +110,11 @@ jobs:
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'

- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' || steps.rc_build.outputs.match != ''}}
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}
path: ./wheelhouse/*.whl
Expand All @@ -120,7 +128,9 @@ jobs:
cuda_version: ["12"]

runs-on: ubuntu-latest
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
if: |
github.event_name == 'release' ||
github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
15 changes: 12 additions & 3 deletions .github/workflows/wheel_macos_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- master
release:
types: [published]
workflow_dispatch:

env:
ARCHS: 'arm64'
Expand All @@ -24,7 +25,10 @@ concurrency:

jobs:
mac-set-matrix-arm:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels')
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') ||
github.event_name == 'workflow_dispatch'
timeout-minutes: 30
name: Set builder matrix
runs-on: ubuntu-latest
Expand Down Expand Up @@ -111,7 +115,10 @@ jobs:
python -m twine check ./wheelhouse/*.whl
- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' }}
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master'
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
Expand All @@ -124,7 +131,9 @@ jobs:
pl_backend: ["lightning_qubit"]
runs-on: ubuntu-latest

if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
if: |
github.event_name == 'release' ||
github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/wheel_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- master
release:
types: [published]
workflow_dispatch:

env:
MACOSX_DEPLOYMENT_TARGET: 10.15
Expand All @@ -22,7 +23,10 @@ concurrency:

jobs:
set_wheel_build_matrix:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels')
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') ||
github.event_name == 'workflow_dispatch'
name: "Set wheel build matrix"
uses: ./.github/workflows/set_wheel_build_matrix.yml
with:
Expand Down Expand Up @@ -165,7 +169,11 @@ jobs:
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'

- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' || steps.rc_build.outputs.match != ''}}
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
Expand All @@ -178,7 +186,9 @@ jobs:
pl_backend: ["lightning_qubit"]
runs-on: ubuntu-latest

if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
if: |
github.event_name == 'release' ||
github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/wheel_noarch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,18 @@ on:
- master
release:
types: [published]
workflow_dispatch:

concurrency:
group: wheel_noarch-${{ github.ref }}
cancel-in-progress: true

jobs:
build-pure-python-wheel:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels')
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') ||
github.event_name == 'workflow_dispatch'
strategy:
matrix:
os: [ubuntu-latest]
Expand Down Expand Up @@ -62,7 +66,9 @@ jobs:
python -m twine check main/dist/*.whl
- uses: actions/upload-artifact@v3
if: ${{ matrix.pl_backend == 'lightning_qubit' && (github.event_name == 'release' || github.ref == 'refs/heads/master') }}
if: |
matrix.pl_backend == 'lightning_qubit' &&
(github.event_name == 'release' || github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/master')
with:
name: pure-python-wheels-${{ matrix.pl_backend }}.zip
path: main/dist/*.whl
Expand Down Expand Up @@ -91,7 +97,9 @@ jobs:

steps:
- uses: actions/download-artifact@v3
if: ${{ matrix.pl_backend == 'lightning_qubit' && github.event_name == 'release' }}
if: |
matrix.pl_backend == 'lightning_qubit' &&
github.event_name == 'release'
with:
name: pure-python-wheels-${{ matrix.pl_backend }}.zip
path: dist
Expand Down
16 changes: 13 additions & 3 deletions .github/workflows/wheel_win_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- master
release:
types: [published]
workflow_dispatch:

env:
DISTUTILS_USE_SDK: 1
Expand All @@ -23,7 +24,10 @@ concurrency:

jobs:
set_wheel_build_matrix:
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'ci:build_wheels')
if: |
github.event_name != 'pull_request' ||
contains(github.event.pull_request.labels.*.name, 'ci:build_wheels') ||
github.event_name == 'workflow_dispatch'
name: "Set wheel build matrix"
uses: ./.github/workflows/set_wheel_build_matrix.yml
with:
Expand Down Expand Up @@ -189,7 +193,11 @@ jobs:
regex: '.*[0-9]+.[0-9]+.[0-9]+[-_]?rc[0-9]+'

- uses: actions/upload-artifact@v3
if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master' || steps.rc_build.outputs.match != ''}}
if: |
github.event_name == 'release' ||
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
Expand All @@ -202,7 +210,9 @@ jobs:
pl_backend: ["lightning_kokkos", "lightning_qubit"]
runs-on: ubuntu-latest

if: ${{ github.event_name == 'release' || github.ref == 'refs/heads/master'}}
if: |
github.event_name == 'release' ||
github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@v3
with:
Expand Down

0 comments on commit c762242

Please sign in to comment.