Skip to content

Commit

Permalink
Update determine runner workflow to use large runners if the branch n…
Browse files Browse the repository at this point in the history
…ame 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]>
  • Loading branch information
3 people authored Jun 20, 2024
1 parent 73bfee7 commit d9da016
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
3 changes: 3 additions & 0 deletions .github/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@

### Improvements

* Release candidate branches are automatically switched over to using the new large GitHub runner pool.
[(#769)](https://github.com/PennyLaneAI/pennylane-lightning/pull/769)

* LightningKokkos dev wheels for MacOS (x86_64, ARM64) and Linux (aarch64) are uploaded to TestPyPI upon PR merge.
[(#765)](https://github.com/PennyLaneAI/pennylane-lightning/pull/765)

Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/determine-workflow-runner.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,14 @@ jobs:
if: >-
${{
github.event_name == 'pull_request'
&& contains(github.event.pull_request.labels.*.name, 'urgent')
&& startsWith(inputs.default_runner, 'ubuntu')
}}
id: runner_group
run: echo "runner_group=$LARGE_RUNNER_GROUP_NAME" >> $GITHUB_OUTPUT
env:
# We are not able to use \d to check numeric values as bash does not allow them (not POSIX compliant)
RC_BRANCH_FORMAT_REGEX: v[0-9]+\.[0-9]+\.[0-9]+-rc[0-9]?
REPO_FULL_NAME: PennyLaneAI/pennylane-lightning
run: |
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
echo "runner_group=$LARGE_RUNNER_GROUP_NAME" >> $GITHUB_OUTPUT
fi
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.37.0-dev43"
__version__ = "0.37.0-dev44"

0 comments on commit d9da016

Please sign in to comment.