Skip to content

Commit

Permalink
Migrate wheels artifacts to v4 (#893)
Browse files Browse the repository at this point in the history
### Before submitting

Please complete the following checklist when submitting a PR:

- [ ] All new features must include a unit test.
If you've fixed a bug or added code that should be tested, add a test to
the
      [`tests`](../tests) directory!

- [ ] All new functions and code must be clearly commented and
documented.
If you do make documentation changes, make sure that the docs build and
      render correctly by running `make docs`.

- [ ] Ensure that the test suite passes, by running `make test`.

- [ ] Add a new entry to the `.github/CHANGELOG.md` file, summarizing
the
      change, and including a link back to the PR.

- [ ] Ensure that code is properly formatted by running `make format`. 

When all the above are checked, delete everything above the dashed
line and fill in the pull request template.


------------------------------------------------------------------------------------------------------------

**Context:**
As a followup to #887, this PR fixes the issue with the name of wheels
artifacts as per actions/upload-artifact#478

**Description of the Change:**

**Benefits:**

**Possible Drawbacks:**

**Related GitHub Issues:**
[sc-73124]

---------

Co-authored-by: ringo-but-quantum <github-ringo-but-quantum@xanadu.ai>
  • Loading branch information
maliasadi and ringo-but-quantum authored Sep 9, 2024
1 parent 70dfdf7 commit 7943928
Show file tree
Hide file tree
Showing 14 changed files with 41 additions and 30 deletions.
5 changes: 4 additions & 1 deletion .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

### Improvements

* Migrate wheels artifacts to v4.
[(#893)](https://github.com/PennyLaneAI/pennylane-lightning/pull/893)

* Prefer `tomlkit` over `toml` for building Lightning wheels, and choose `tomli` and `tomllib` over `toml` when installing the package.
[(#857)](https://github.com/PennyLaneAI/pennylane-lightning/pull/857)

Expand All @@ -38,7 +41,7 @@

This release contains contributions from (in alphabetical order):

Amintor Dusko, Luis Alfredo Nuñez Meneses, Vincent Michaud-Rioux, Lee J. O'Riordan, Shuli Shu
Ali Asadi, Amintor Dusko, Luis Alfredo Nuñez Meneses, Vincent Michaud-Rioux, Lee J. O'Riordan, Shuli Shu

---

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpu_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ jobs:
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
pattern: ubuntu-codecov*
pattern: ubuntu-codecov-*
merge-multiple: true

- name: Upload to Codecov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpumpi_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ jobs:
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
pattern: ubuntu-codecov*
pattern: ubuntu-codecov-*
merge-multiple: true

- name: Upload to Codecov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_lgpumpi_python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ jobs:
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
pattern: ubuntu-codecov*
pattern: ubuntu-codecov-*
merge-multiple: true

- name: Upload to Codecov
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_linux_cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ jobs:
- name: Download coverage reports
uses: actions/download-artifact@v4
with:
pattern: ubuntu-codecov*
pattern: ubuntu-codecov-*
merge-multiple: true

- name: Upload to Codecov
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_linux_aarch64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,17 +183,18 @@ jobs:
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master'
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: linux-wheels-aarch64
needs: [set_wheel_build_matrix, linux-wheels-aarch64]
strategy:
matrix:
arch: [aarch64]
pl_backend: ["lightning_qubit", "lightning_kokkos"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -202,7 +203,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: Linux-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: dist

- name: Upload wheels to PyPI
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_linux_aarch64_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,18 +106,19 @@ jobs:
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master'
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: linux-wheels-aarch64
needs: [set_wheel_build_matrix, linux-wheels-aarch64]
strategy:
matrix:
arch: [aarch64]
pl_backend: ["lightning_gpu"]
cuda_version: ["12"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -126,7 +127,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}.zip
path: dist

- name: Upload wheels to PyPI
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_linux_ppc64le.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,17 +171,18 @@ jobs:
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: linux-wheels-ppc64le
needs: [set_wheel_build_matrix, linux-wheels-ppc64le]
strategy:
matrix:
arch: [ppc64le]
pl_backend: ["lightning_qubit"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -190,7 +191,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: Linux-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: dist

- name: Upload wheels to PyPI
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_linux_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -203,17 +203,18 @@ jobs:
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: linux-wheels-x86-64
needs: [set_wheel_build_matrix, linux-wheels-x86-64]
strategy:
matrix:
arch: [x86_64]
pl_backend: ["lightning_qubit", "lightning_kokkos"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -222,7 +223,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: Linux-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: dist

- name: Upload wheels to PyPI
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_linux_x86_64_cuda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,19 @@ jobs:
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: linux-wheels-x86-64
needs: [set_wheel_build_matrix, linux-wheels-x86-64]
strategy:
matrix:
arch: [x86_64]
pl_backend: ["lightning_gpu"]
cuda_version: ["12"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -146,7 +147,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}-cu${{ matrix.cuda_version }}.zip
path: dist

- name: Upload wheels to PyPI
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_macos_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,17 +130,18 @@ jobs:
github.event_name == 'workflow_dispatch' ||
github.ref == 'refs/heads/master'
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: mac-wheels-arm64
needs: [mac-set-matrix-arm, mac-wheels-arm64]
strategy:
matrix:
arch: [arm64]
pl_backend: ["lightning_qubit", "lightning_kokkos"]
cibw_build: ${{ fromJson(needs.mac-set-matrix-arm.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -149,7 +150,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: macOS-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: macOS-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: dist

- name: Upload wheels to PyPI
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_macos_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,18 @@ jobs:
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: mac-wheels-x86
needs: [set_wheel_build_matrix, mac-wheels-x86]
strategy:
matrix:
arch: [x86_64]
pl_backend: ["lightning_qubit", "lightning_kokkos"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -206,7 +207,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: macOS-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: macOS-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: dist

- name: Upload wheels to PyPI
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/wheel_win_x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,18 @@ jobs:
github.ref == 'refs/heads/master' ||
steps.rc_build.outputs.match != ''
with:
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: ${{ runner.os }}-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: ./wheelhouse/*.whl
retention-days: 1
include-hidden-files: true

upload-pypi:
needs: win-wheels
needs: [set_wheel_build_matrix, win-wheels]
strategy:
matrix:
arch: [AMD64]
pl_backend: ["lightning_qubit"]
cibw_build: ${{ fromJson(needs.set_wheel_build_matrix.outputs.python_version) }}
runs-on: ubuntu-latest
if: |
github.event_name == 'release' ||
Expand All @@ -231,7 +232,7 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: Windows-wheels-${{ matrix.pl_backend }}-${{ matrix.arch }}.zip
name: Windows-wheels-${{ matrix.pl_backend }}-${{ fromJson('{ "cp310-*":"py310","cp311-*":"py311","cp312-*":"py312" }')[matrix.cibw_build] }}-${{ matrix.arch }}.zip
path: dist

- name: Upload wheels to PyPI
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.39.0-dev8"
__version__ = "0.39.0-dev9"

0 comments on commit 7943928

Please sign in to comment.