From 7943928e8abb7af1bdeaa3fe97b57d9487c0ef20 Mon Sep 17 00:00:00 2001 From: Ali Asadi <10773383+maliasadi@users.noreply.github.com> Date: Mon, 9 Sep 2024 15:26:11 -0400 Subject: [PATCH] Migrate wheels artifacts to v4 (#893) ### 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 https://github.com/actions/upload-artifact/issues/478 **Description of the Change:** **Benefits:** **Possible Drawbacks:** **Related GitHub Issues:** [sc-73124] --------- Co-authored-by: ringo-but-quantum --- .github/CHANGELOG.md | 5 ++++- .github/workflows/tests_lgpu_cpp.yml | 2 +- .github/workflows/tests_lgpumpi_cpp.yml | 2 +- .github/workflows/tests_lgpumpi_python.yml | 2 +- .github/workflows/tests_linux_cpp.yml | 2 +- .github/workflows/wheel_linux_aarch64.yml | 7 ++++--- .github/workflows/wheel_linux_aarch64_cuda.yml | 7 ++++--- .github/workflows/wheel_linux_ppc64le.yml | 7 ++++--- .github/workflows/wheel_linux_x86_64.yml | 7 ++++--- .github/workflows/wheel_linux_x86_64_cuda.yml | 7 ++++--- .github/workflows/wheel_macos_arm64.yml | 7 ++++--- .github/workflows/wheel_macos_x86_64.yml | 7 ++++--- .github/workflows/wheel_win_x86_64.yml | 7 ++++--- pennylane_lightning/core/_version.py | 2 +- 14 files changed, 41 insertions(+), 30 deletions(-) diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index fd7f2ec2b3..1ac970e098 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -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) @@ -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 --- diff --git a/.github/workflows/tests_lgpu_cpp.yml b/.github/workflows/tests_lgpu_cpp.yml index 235b23ef9c..46467c06ec 100644 --- a/.github/workflows/tests_lgpu_cpp.yml +++ b/.github/workflows/tests_lgpu_cpp.yml @@ -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 diff --git a/.github/workflows/tests_lgpumpi_cpp.yml b/.github/workflows/tests_lgpumpi_cpp.yml index 537c00fcfb..690af8fff2 100644 --- a/.github/workflows/tests_lgpumpi_cpp.yml +++ b/.github/workflows/tests_lgpumpi_cpp.yml @@ -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 diff --git a/.github/workflows/tests_lgpumpi_python.yml b/.github/workflows/tests_lgpumpi_python.yml index ec45f71844..fce0c1e892 100644 --- a/.github/workflows/tests_lgpumpi_python.yml +++ b/.github/workflows/tests_lgpumpi_python.yml @@ -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 diff --git a/.github/workflows/tests_linux_cpp.yml b/.github/workflows/tests_linux_cpp.yml index aa9b18e1d0..f7cc14b790 100644 --- a/.github/workflows/tests_linux_cpp.yml +++ b/.github/workflows/tests_linux_cpp.yml @@ -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 diff --git a/.github/workflows/wheel_linux_aarch64.yml b/.github/workflows/wheel_linux_aarch64.yml index 938ea82f10..3265c9cbbf 100644 --- a/.github/workflows/wheel_linux_aarch64.yml +++ b/.github/workflows/wheel_linux_aarch64.yml @@ -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' || @@ -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 diff --git a/.github/workflows/wheel_linux_aarch64_cuda.yml b/.github/workflows/wheel_linux_aarch64_cuda.yml index cd4af3214c..4069c1b3a4 100644 --- a/.github/workflows/wheel_linux_aarch64_cuda.yml +++ b/.github/workflows/wheel_linux_aarch64_cuda.yml @@ -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' || @@ -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 diff --git a/.github/workflows/wheel_linux_ppc64le.yml b/.github/workflows/wheel_linux_ppc64le.yml index 88dd125997..aae010adf2 100644 --- a/.github/workflows/wheel_linux_ppc64le.yml +++ b/.github/workflows/wheel_linux_ppc64le.yml @@ -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' || @@ -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 diff --git a/.github/workflows/wheel_linux_x86_64.yml b/.github/workflows/wheel_linux_x86_64.yml index 0da9912b9b..9324432845 100644 --- a/.github/workflows/wheel_linux_x86_64.yml +++ b/.github/workflows/wheel_linux_x86_64.yml @@ -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' || @@ -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 diff --git a/.github/workflows/wheel_linux_x86_64_cuda.yml b/.github/workflows/wheel_linux_x86_64_cuda.yml index 62d1a5ef8d..1f161faaa2 100644 --- a/.github/workflows/wheel_linux_x86_64_cuda.yml +++ b/.github/workflows/wheel_linux_x86_64_cuda.yml @@ -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' || @@ -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 diff --git a/.github/workflows/wheel_macos_arm64.yml b/.github/workflows/wheel_macos_arm64.yml index fd56822791..ae10e9b996 100644 --- a/.github/workflows/wheel_macos_arm64.yml +++ b/.github/workflows/wheel_macos_arm64.yml @@ -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' || @@ -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 diff --git a/.github/workflows/wheel_macos_x86_64.yml b/.github/workflows/wheel_macos_x86_64.yml index 27dbfefe9d..7777406d12 100644 --- a/.github/workflows/wheel_macos_x86_64.yml +++ b/.github/workflows/wheel_macos_x86_64.yml @@ -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' || @@ -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 diff --git a/.github/workflows/wheel_win_x86_64.yml b/.github/workflows/wheel_win_x86_64.yml index 16c2b0d9ed..eca482677f 100644 --- a/.github/workflows/wheel_win_x86_64.yml +++ b/.github/workflows/wheel_win_x86_64.yml @@ -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' || @@ -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 diff --git a/pennylane_lightning/core/_version.py b/pennylane_lightning/core/_version.py index 90812ebe0a..d1565457f3 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.39.0-dev8" +__version__ = "0.39.0-dev9"