From a9e63073dd8945a161ae9c4272eb5fbb81116b33 Mon Sep 17 00:00:00 2001 From: Delan Azabani Date: Tue, 2 Dec 2025 15:27:30 +0800 Subject: [PATCH] ci: Experiment with mandatory self-hosted runners Signed-off-by: Delan Azabani --- .github/workflows/bencher.yml | 33 ++---------------- .github/workflows/lint.yml | 33 ++---------------- .github/workflows/linux.yml | 64 +++-------------------------------- .github/workflows/mac.yml | 30 ++-------------- .github/workflows/windows.yml | 30 ++-------------- 5 files changed, 13 insertions(+), 177 deletions(-) diff --git a/.github/workflows/bencher.yml b/.github/workflows/bencher.yml index a41b3bf39b9..0cb634cc39a 100644 --- a/.github/workflows/bencher.yml +++ b/.github/workflows/bencher.yml @@ -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. - # - 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 we’re 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 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f040c1f856f..91c57e4bdbe 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -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. - # - 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: diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 1d0d3f3f23b..86bfaf80da5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -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. - # - 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. - # - 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 diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index e1949521bd4..eefd86da536 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -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. - # - 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. diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 37f3bebb71e..097aa6acf1f 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -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. - # - 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