mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
ci: Convert runner select to composite action (#39270)
to run bencher builds on self-hosted runners (#39269), we will need to do a self-hosted runner select, but that would exceed the workflow call depth limit (try → dispatch-workflow → linux → bencher → self-hosted-runner-select). this patch converts the self-hosted runner select from a [reusable workflow](https://docs.github.com/en/actions/concepts/workflows-and-actions/reusable-workflows) to a [composite action](https://docs.github.com/en/actions/tutorials/create-actions/create-a-composite-action), much like #38503 did for the runner timeout. Testing: - self-hosted <https://github.com/servo/servo/actions/runs/17674919359/job/50235098986> - GitHub-hosted <https://github.com/delan/servo/actions/runs/17674928875/job/50234708810> Fixes: part of #39269 --------- Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
eb03fb743c
commit
059a2fd86d
5 changed files with 172 additions and 121 deletions
35
.github/workflows/linux.yml
vendored
35
.github/workflows/linux.yml
vendored
|
@ -99,15 +99,32 @@ jobs:
|
|||
# Runs the underlying job (“workload”) on a self-hosted runner if available,
|
||||
# with the help of a `runner-select` job and a `runner-timeout` job.
|
||||
runner-select:
|
||||
uses: ./.github/workflows/self-hosted-runner-select.yml
|
||||
secrets: inherit
|
||||
with:
|
||||
# Before updating the GH action runner image for the nightly job, ensure
|
||||
# that the system has a glibc version that is compatible with the one
|
||||
# used by the wpt.fyi runners.
|
||||
github-hosted-runner-label: ubuntu-22.04
|
||||
self-hosted-image-name: servo-ubuntu2204
|
||||
force-github-hosted-runner: ${{ inputs.upload || inputs.force-github-hosted-runner }}
|
||||
runs-on: ubuntu-22.04
|
||||
outputs:
|
||||
unique-id: ${{ steps.select.outputs.unique-id }}
|
||||
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
|
||||
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
sparse-checkout: '.github'
|
||||
- name: Runner select
|
||||
id: select
|
||||
uses: ./.github/actions/runner-select
|
||||
with:
|
||||
monitor-api-token: ${{ secrets.SERVO_CI_MONITOR_API_TOKEN }}
|
||||
# Before updating the GH action runner image for the nightly job, ensure
|
||||
# that the system has a glibc version that is compatible with the one
|
||||
# used by the wpt.fyi runners.
|
||||
github-hosted-runner-label: ubuntu-22.04
|
||||
self-hosted-image-name: servo-ubuntu2204
|
||||
# You can disable self-hosted runners globally by creating a repository variable named
|
||||
# NO_SELF_HOSTED_RUNNERS with any non-empty value.
|
||||
# <https://github.com/servo/servo/settings/variables/actions>
|
||||
NO_SELF_HOSTED_RUNNERS: ${{ vars.NO_SELF_HOSTED_RUNNERS }}
|
||||
# Any other boolean conditions that disable self-hosted runners go here.
|
||||
force-github-hosted-runner: ${{ inputs.upload || inputs.force-github-hosted-runner }}
|
||||
runner-timeout:
|
||||
needs:
|
||||
- runner-select
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue