-
Notifications
You must be signed in to change notification settings - Fork 51
Adding nightly RC builds #1344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Adding nightly RC builds #1344
Changes from 14 commits
Commits
Show all changes
66 commits
Select commit
Hold shift + click to select a range
37d54e4
Adding nightly RC builds
runora95 2eed0fb
Auto update version from '0.45.0-dev18' to '0.45.0-dev19'
ringo-but-quantum d8fe40a
Fix indentation
runora95 fb1d155
typo
runora95 f5a431d
fix names
runora95 e6685fb
fix names 2
runora95 b55f443
fix branches
runora95 8f3b740
true
runora95 6a79203
fix path
runora95 c2b7283
trigger catalyst
runora95 541573b
concurrency
runora95 335eb98
change concurrency
runora95 83d4204
run catalyst workflow
runora95 574b61b
checkout
runora95 ec3bbdf
Trigger Build
runora95 25b0ec4
change token
runora95 d9cb869
Trigger Build
runora95 c45245a
Trigger Build
runora95 d77c57e
Auto update version from '0.45.0-dev19' to '0.45.0-dev20'
ringo-but-quantum a94ddf9
Trigger Build
runora95 e7227da
Trigger Build
runora95 bcf290a
Trigger Build
runora95 193e501
Trigger Build
runora95 2234e8e
Auto update version from '0.45.0-dev20' to '0.45.0-dev21'
ringo-but-quantum ac4aa5b
use workflow file name
runora95 65b915a
cip false'
runora95 aa508d4
rmv concurrency
runora95 3b7f684
chng conc group name
runora95 c0ada13
Merge branch 'master' into sc-111638-rc-nightly
runora95 3ca05cd
conc name branch
runora95 0a2b9f9
reduce builds
runora95 8b5ca7f
Trigger Build
runora95 3b01506
Auto update version from '0.45.0-dev21' to '0.45.0-dev22'
ringo-but-quantum 0e40beb
rmv if and add work disp
runora95 348a932
github.workflow conc
runora95 e56a188
run id concurrency
runora95 cdbd92d
set conc group
runora95 d1dba9f
adding workflow to conc group
runora95 57a6a86
change wklfw name
runora95 502489f
check conc with prs
runora95 486d079
other wheels
runora95 58329ae
rmv comments
runora95 84c9a15
run other builds
runora95 8281be0
adding workflow name
runora95 2be77d0
cleanup inputs
runora95 9cfcba5
add needs
runora95 85336c4
cleanup
runora95 063e989
add schedule to ifs
runora95 2dacb11
check event name
runora95 6d40596
cleanup
runora95 de88efb
cleanup again
runora95 98899ab
Merge branch 'master' into sc-111638-rc-nightly
runora95 a090b8e
rmv comment
runora95 9aa31f6
fix checkout branch
runora95 d0a5da1
rmv defaults
runora95 764a084
updates
runora95 34dc4dd
Auto update version from '0.45.0-dev22' to '0.45.0-dev23'
ringo-but-quantum 78077d4
Merge branch 'master' into sc-111638-rc-nightly
runora95 9089de9
change rc branch pattern
runora95 b59838b
rmv schedule if
runora95 b40aaf3
fix typos and regex
runora95 0eac947
fix path
runora95 1b38a1f
cleanup setup build matrix
runora95 94c2194
cleanup setup build matrix
runora95 cbfef09
Update .github/workflows/upload-nightly-rc-release.yml
runora95 c966b35
Update .github/workflows/upload-nightly-rc-release.yml
runora95 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Copyright 2025 Xanadu Quantum Technologies Inc. | ||
|
|
||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
|
|
||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| """ | ||
| This module bumps the PennyLane development version by one unit. | ||
runora95 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| """ | ||
|
|
||
| import os | ||
| import re | ||
|
|
||
| version_file_path = os.path.join(os.path.dirname(__file__), "../../pennylane_lightning/core/_version.py") | ||
|
|
||
| assert os.path.isfile(version_file_path) | ||
|
|
||
| with open(version_file_path, "r+", encoding="UTF-8") as f: | ||
| lines = f.readlines() | ||
|
|
||
| version_line = lines[-1] | ||
| assert "__version__ = " in version_line | ||
| pattern = r"(\d+).(\d+).(\d+)-rc(\d+)" | ||
| match = re.search(pattern, version_line) | ||
| if match: | ||
| # Case 1: Version has RC suffix | ||
| major, minor, bug, rc = match.groups() | ||
| replacement = f'__version__ = "{major}.{minor}.{bug}-rc{int(rc)+1}"\n' | ||
| else: | ||
| # Case 2: Version has no RC suffix | ||
| base_pattern = r"(\d+).(\d+).(\d+)" | ||
runora95 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| base_match = re.search(base_pattern, version_line) | ||
| assert base_match, "Version string must be in format X.Y.Z or X.Y.Z-rcN" | ||
| major, minor, bug = base_match.groups() | ||
| replacement = f'__version__ = "{major}.{minor}.{bug}-rc0"\n' | ||
|
|
||
| lines[-1] = replacement | ||
|
|
||
| f.seek(0) | ||
| f.writelines(lines) | ||
| f.truncate() | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,146 @@ | ||
| name: Build nightly Lightning RC releases for TestPyPI | ||
|
|
||
| on: | ||
| schedule: | ||
| # Run every weekday at 5:50 EDT (cron is in UTC) | ||
| - cron: "50 9 * * 1-5" | ||
| workflow_dispatch: | ||
| push: | ||
|
|
||
| concurrency: | ||
| group: nightly-rc-release-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| setup-rc: | ||
| name: Setup the release | ||
| runs-on: ubuntu-24.04 | ||
| outputs: | ||
| rc_branch: ${{ steps.check_rc.outputs.rc_branch }} | ||
| branch_exists: ${{ steps.check_rc.outputs.branch_exists }} | ||
| steps: | ||
| - name: Checkout Lightning repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: master | ||
|
|
||
| # Sets up Python environment | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.11" | ||
|
|
||
| # Ensure setuptools is up-to-date for pyproject.toml processing | ||
| - name: Install latest setuptools | ||
| run: | | ||
| python -m pip install --upgrade pip | ||
| pip install --upgrade setuptools | ||
|
|
||
| - name: Check for rc branch | ||
| id: check_rc | ||
| run: | | ||
| VERSION=$(python setup.py --version) | ||
| IFS=. read MAJ MIN PAT <<< "${VERSION%-dev[0-9]*}" | ||
| RC_BRANCH="v${MAJ}.$((MIN-1)).${PAT}-rc0" | ||
runora95 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| if git ls-remote --exit-code origin "refs/heads/$RC_BRANCH"; then | ||
| echo "branch_exists=true" >> $GITHUB_OUTPUT | ||
| echo "rc_branch=$RC_BRANCH" >> $GITHUB_OUTPUT | ||
| echo "Found rc branch: $RC_BRANCH" | ||
| else | ||
| echo "branch_exists=true" >> $GITHUB_OUTPUT | ||
| fi | ||
|
|
||
| - name: Checkout Lightning repo | ||
| if: ${{ steps.check_rc.outputs.branch_exists == 'true' }} | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ssh-key: ${{ secrets.NIGHTLY_VERSION_UPDATE_DEPLOY_KEY }} | ||
| ref: ${{ steps.check_rc.outputs.rc_branch }} | ||
|
|
||
| - name: Bump rc version | ||
| if: ${{ steps.check_rc.outputs.branch_exists == 'true' }} | ||
| run: | | ||
| echo "rc_branch is ${{ steps.check_rc.outputs.rc_branch }}" | ||
| python $GITHUB_WORKSPACE/.github/workflows/set_nightly_version_rc.py | ||
| # git config --global user.email '${{ secrets.AUTO_UPDATE_VERSION_RINGO_EMAIL }}' | ||
| # git config --global user.name "ringo-but-quantum" | ||
| # git add $GITHUB_WORKSPACE/pennylane/_version.py | ||
| # git commit -m "[no ci] bump nightly version" | ||
| # git push | ||
|
|
||
| build-linux-aarch64-cuda: | ||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_linux_aarch64_cuda.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
|
||
| build-linux-x86_64: | ||
|
||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_linux_x86_64.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
|
||
| build-linux-x86_64-cuda: | ||
|
||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_linux_x86_64_cuda.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
|
||
| build-linux-aarch64: | ||
|
||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_linux_aarch64.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
|
||
| build-macos-arm64: | ||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_macos_arm64.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
|
||
| build-windows-x86_64: | ||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_win_x86_64.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
|
||
| build-windows-x86_64_rocm: | ||
runora95 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_linux_x86_64_rocm.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
|
||
| build-noarch: | ||
|
||
| needs: setup-rc | ||
| if: ${{ needs.setup-rc.outputs.branch_exists == 'true' }} | ||
| uses: ./.github/workflows/wheel_noarch.yml | ||
| with: | ||
| branch: ${{ needs.setup-rc.outputs.rc_branch }} | ||
|
||
|
|
||
| check-wheel-uploads: | ||
|
||
| # needs: [build-linux-aarch64-cuda, build-linux-x86_64, build-linux-x86_64-cuda, build-linux-aarch64, build-macos-arm64, build-windows-x86_64, build-windows-x86_64_rocm, build-noarch] | ||
| name: Check wheel uploads | ||
| runs-on: ubuntu-24.04 | ||
|
|
||
| steps: | ||
| - name: Checkout Lightning repo | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| ref: master | ||
|
|
||
| - name: Check for uploaded wheels | ||
| env: | ||
| GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
| run: | | ||
| # Check if any wheel artifacts were uploaded | ||
| git config user.name "GitHub Actions Bot" | ||
| git config user.email "<>" | ||
| gh workflow run "Build Release Branch Nightly for TestPyPI" --repo PennyLaneAI/catalyst --ref sc-111637-sync-rc | ||
|
|
||
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.