ci: Experiment with mandatory self-hosted runners

Signed-off-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
Delan Azabani
2025-12-02 15:27:30 +08:00
parent d7354191d2
commit a9e63073dd
5 changed files with 13 additions and 177 deletions

View File

@@ -46,36 +46,9 @@ env:
BENCHER_PROJECT: ${{ vars.BENCHER_PROJECT || 'servo' }}
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:
runs-on: ubuntu-24.04
outputs:
unique-id: ${{ steps.select.outputs.unique-id }}
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
runner-type-label: ${{ steps.select.outputs.runner-type-label }}
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
steps:
- name: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@44317e3cd86c5ff2ef0b08878b90da246bc237da
with:
GITHUB_TOKEN: ${{ github.token }}
github-hosted-runner-label: ubuntu-22.04
self-hosted-image-name: servo-ubuntu2204-bench
# 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.
# No need to use self-hosted runners if were only measuring binary size.
force-github-hosted-runner: ${{ !(inputs.speedometer || inputs.dromaeo) || inputs.force-github-hosted-runner }}
bencher:
needs:
- runner-select
name: Bencher (${{ inputs.target }}) [${{ needs.runner-select.outputs.unique-id }}]
runs-on: ${{ needs.runner-select.outputs.selected-runner-label }}
name: Bencher (${{ inputs.target }})
runs-on: self-hosted-image:servo-ubuntu2204-bench # GitHub-hosted: ubuntu-22.04
steps:
- uses: servo/ci-runners/actions/checkout@44317e3cd86c5ff2ef0b08878b90da246bc237da
- uses: actions/download-artifact@v4
@@ -161,7 +134,7 @@ jobs:
continue-on-error: true
run: |
./etc/ci/bencher.py merge ${{ env.SERVO_FILE_SIZE_RESULT }} ${{ env.SERVO_STRIPPED_FILE_SIZE_RESULT }} ${{ env.SERVO_SPEEDOMETER_RESULT }} ${{ env.SERVO_DROMAEO_RESULT }} --bmf-output b.json
testbed='${{ needs.runner-select.outputs.runner-type-label }}'
testbed='${{ runner.environment == "self-hosted" && "servo-ubuntu2204-bench" || "ubuntu-22.04" }}'
bencher run --adapter json --file b.json \
--project ${{ env.BENCHER_PROJECT }} --token ${{ secrets.BENCHER_API_TOKEN }} --testbed "$testbed" \
$RUN_BENCHER_OPTIONS

View File

@@ -9,38 +9,9 @@ env:
CARGO_INCREMENTAL: 0
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:
runs-on: ubuntu-24.04
outputs:
unique-id: ${{ steps.select.outputs.unique-id }}
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
runner-type-label: ${{ steps.select.outputs.runner-type-label }}
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
steps:
- name: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@44317e3cd86c5ff2ef0b08878b90da246bc237da
with:
GITHUB_TOKEN: ${{ github.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 }}
lint:
needs:
- runner-select
name: Lint [${{ needs.runner-select.outputs.unique-id }}]
runs-on: ${{ needs.runner-select.outputs.selected-runner-label }}
name: Lint
runs-on: self-hosted-image:servo-ubuntu2204 # GitHub-hosted: ubuntu-22.04
steps:
- uses: servo/ci-runners/actions/checkout@44317e3cd86c5ff2ef0b08878b90da246bc237da
with:

View File

@@ -100,38 +100,9 @@ env:
SHELL: /bin/bash
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:
runs-on: ubuntu-24.04
outputs:
unique-id: ${{ steps.select.outputs.unique-id }}
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
runner-type-label: ${{ steps.select.outputs.runner-type-label }}
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
steps:
- name: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@44317e3cd86c5ff2ef0b08878b90da246bc237da
with:
GITHUB_TOKEN: ${{ github.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 }}
build:
needs:
- runner-select
name: Linux Build [${{ needs.runner-select.outputs.unique-id }}]
runs-on: ${{ needs.runner-select.outputs.selected-runner-label }}
name: Linux Build
runs-on: self-hosted-image:servo-ubuntu2204 # GitHub-hosted: ubuntu-22.04
steps:
- uses: servo/ci-runners/actions/checkout@44317e3cd86c5ff2ef0b08878b90da246bc237da
- name: Free Disk Space (Ubuntu)
@@ -283,37 +254,10 @@ jobs:
run: |
cargo +${{ steps.msrv.outputs.rust_version }} build -p libservo --locked --all-targets
# Runs the underlying job (“workload”) on a self-hosted runner if available.
runner-select-coverage:
if: inputs.coverage
runs-on: ubuntu-24.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: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@44317e3cd86c5ff2ef0b08878b90da246bc237da
with:
GITHUB_TOKEN: ${{ github.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.force-github-hosted-runner }}
unit-test-coverage:
if: inputs.coverage
needs: runner-select-coverage
name: Unit Test Coverage [${{ needs.runner-select-coverage.outputs.unique-id }}]
runs-on: ${{ needs.runner-select-coverage.outputs.selected-runner-label }}
name: Unit Test Coverage
runs-on: self-hosted-image:servo-ubuntu2204 # GitHub-hosted: ubuntu-22.04
continue-on-error: true
steps:
- uses: servo/ci-runners/actions/checkout@44317e3cd86c5ff2ef0b08878b90da246bc237da

View File

@@ -82,35 +82,9 @@ env:
CARGO_INCREMENTAL: 0
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:
runs-on: ubuntu-24.04
outputs:
unique-id: ${{ steps.select.outputs.unique-id }}
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
runner-type-label: ${{ steps.select.outputs.runner-type-label }}
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
steps:
- name: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@44317e3cd86c5ff2ef0b08878b90da246bc237da
with:
GITHUB_TOKEN: ${{ github.token }}
github-hosted-runner-label: macos-15-intel
self-hosted-image-name: servo-macos13
# 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.force-github-hosted-runner }}
build:
needs:
- runner-select
name: MacOS Build [${{ needs.runner-select.outputs.unique-id }}]
runs-on: ${{ needs.runner-select.outputs.selected-runner-label }}
name: MacOS Build
runs-on: self-hosted-image:servo-macos13 # GitHub-hosted: macos-15-intel
steps:
# XProtect can cause random failures if it decides that the DMG we create
# during the packaging phase is malware.

View File

@@ -73,35 +73,9 @@ env:
RUSTUP_WINDOWS_PATH_ADD_BIN: 1
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:
runs-on: ubuntu-24.04
outputs:
unique-id: ${{ steps.select.outputs.unique-id }}
selected-runner-label: ${{ steps.select.outputs.selected-runner-label }}
runner-type-label: ${{ steps.select.outputs.runner-type-label }}
is-self-hosted: ${{ steps.select.outputs.is-self-hosted }}
steps:
- name: Runner select
id: select
uses: servo/ci-runners/actions/runner-select@44317e3cd86c5ff2ef0b08878b90da246bc237da
with:
GITHUB_TOKEN: ${{ github.token }}
github-hosted-runner-label: windows-2022
self-hosted-image-name: servo-windows10
# 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.force-github-hosted-runner }}
build:
needs:
- runner-select
name: Windows Build [${{ needs.runner-select.outputs.unique-id }}]
runs-on: ${{ needs.runner-select.outputs.selected-runner-label }}
name: Windows Build
runs-on: self-hosted-image:servo-windows10 # GitHub-hosted: windows-2022
steps:
- uses: servo/ci-runners/actions/checkout@44317e3cd86c5ff2ef0b08878b90da246bc237da