Skip to content

Commit d9da016

Browse files
rashidnhmringo-but-quantumAmintorDusko
authored
Update determine runner workflow to use large runners if the branch name matches a certain format (#769)
**Context:** This PR is being opened under sc-66351. It introduces a new change to CI ahead of release where a local branch (not forked) that matches the regex pattern `vX.Y.Z-rcN` (The `N` after rc being optional) is auto ported over to the large runners. Though this may provide a minor bump to the runtimes of the workflows themselves, the bigger objective (right now at least) is to not wait long times to get a runner. **Description of the Change:** The change is a minor one within the `determine-runner` workflow. It now checks for both a label present on a pr OR if the pr branch names matches the rc branching format above. **Benefits:** Faster queue times for rc branches. **Possible Drawbacks:** Though the large runners and standard runners should have parity in theory. We do not live in a perfect world. There is a none-zero chance that workflows might break. But we can test that out as part of this PR. **Related GitHub Issues:** None. --------- Co-authored-by: ringo-but-quantum <[email protected]> Co-authored-by: Amintor Dusko <[email protected]>
1 parent 73bfee7 commit d9da016

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/CHANGELOG.md

+3
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535

3636
### Improvements
3737

38+
* Release candidate branches are automatically switched over to using the new large GitHub runner pool.
39+
[(#769)](https://github.com/PennyLaneAI/pennylane-lightning/pull/769)
40+
3841
* LightningKokkos dev wheels for MacOS (x86_64, ARM64) and Linux (aarch64) are uploaded to TestPyPI upon PR merge.
3942
[(#765)](https://github.com/PennyLaneAI/pennylane-lightning/pull/765)
4043

.github/workflows/determine-workflow-runner.yml

+8-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,14 @@ jobs:
3333
if: >-
3434
${{
3535
github.event_name == 'pull_request'
36-
&& contains(github.event.pull_request.labels.*.name, 'urgent')
3736
&& startsWith(inputs.default_runner, 'ubuntu')
3837
}}
3938
id: runner_group
40-
run: echo "runner_group=$LARGE_RUNNER_GROUP_NAME" >> $GITHUB_OUTPUT
39+
env:
40+
# We are not able to use \d to check numeric values as bash does not allow them (not POSIX compliant)
41+
RC_BRANCH_FORMAT_REGEX: v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]?
42+
REPO_FULL_NAME: PennyLaneAI/pennylane-lightning
43+
run: |
44+
if [[ '${{ contains(github.event.pull_request.labels.*.name, 'urgent') }}' == 'true' || ('${{ github.event.pull_request.head.repo.full_name }}' == "$REPO_FULL_NAME" && "${{ github.event.pull_request.head.ref }}" =~ "$RC_BRANCH_FORMAT_REGEX") ]]; then
45+
echo "runner_group=$LARGE_RUNNER_GROUP_NAME" >> $GITHUB_OUTPUT
46+
fi

pennylane_lightning/core/_version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@
1616
Version number (major.minor.patch[-label])
1717
"""
1818

19-
__version__ = "0.37.0-dev43"
19+
__version__ = "0.37.0-dev44"

0 commit comments

Comments
 (0)