Build/Test Tools: Avoid using *-latest tags for runner images.

While using the `ubuntu-latest`, `macos-latest`, and `windows-latest` runner image tags is convenient, it has proven to be problematic in a number of instances as the runners are slowly updated (see #62808 and #62843).

This switches all workflows to using specific version tags representing the latest non-preview versions, which currently are as follows:
- `ubuntu-24.04`
- `windows-2022`
- `macos-14`

Props swissspidy, johnbillion.
See #62221.

git-svn-id: https://develop.svn.wordpress.org/trunk@59720 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Jonathan Desrosiers 2025-01-28 14:00:16 +00:00
parent 1af0e6cbcb
commit 015148da1d
33 changed files with 69 additions and 69 deletions

View File

@ -80,7 +80,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ phpcs, jshint, slack-notifications ]

View File

@ -67,7 +67,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ e2e-tests, slack-notifications ]

View File

@ -23,7 +23,7 @@ jobs:
# - Restarts all failed jobs when the workflow fails or is cancelled for the first time.
failed-workflow:
name: Rerun a workflow
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
timeout-minutes: 30

View File

@ -69,7 +69,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: ${{ fromJSON( needs.build-test-matrix.outputs.php-versions ) }}
db-type: [ 'mysql' ]
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}
@ -152,7 +152,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -70,7 +70,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -82,7 +82,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
memcached: [ false, true ]
php: ${{ fromJSON( needs.build-test-matrix.outputs.php-versions ) }}
db-version: ${{ fromJSON( needs.build-test-matrix.outputs.mysql-versions ) }}
@ -123,7 +123,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ build-test-matrix, environment-tests-mysql, slack-notifications ]

View File

@ -66,7 +66,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -67,7 +67,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -44,7 +44,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4' ]
@ -54,14 +54,14 @@ jobs:
include:
# Include jobs that test with memcached.
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org'
multisite: false
memcached: true
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mysql'
db-version: '8.4'
@ -69,14 +69,14 @@ jobs:
multisite: true
memcached: true
# Include jobs with a port on the test domain for both single and multisite.
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.4'
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org:8889'
multisite: false
memcached: false
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.4'
db-type: 'mysql'
db-version: '8.4'
@ -84,7 +84,7 @@ jobs:
multisite: true
memcached: false
# Report test results to the Host Test Results.
- os: ubuntu-latest
- os: ubuntu-24.04
db-type: 'mysql'
db-version: '8.4'
tests-domain: 'example.org'
@ -115,7 +115,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mariadb' ]
db-version: [ '5.5', '10.3', '10.4', '10.5', '10.6', '10.11', '11.4' ]
@ -124,13 +124,13 @@ jobs:
include:
# Include jobs that test with memcached.
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mariadb'
db-version: '11.4'
multisite: false
memcached: true
- os: ubuntu-latest
- os: ubuntu-24.04
php: '8.3'
db-type: 'mariadb'
db-version: '11.4'
@ -165,7 +165,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
os: [ ubuntu-24.04 ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql', 'mariadb' ]
db-version: [ '9.1', '11.6' ]
@ -236,7 +236,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -48,7 +48,7 @@ jobs:
# - Removes the props-bot label, if necessary.
props-bot:
name: Generate a list of props
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
# The action needs permission `write` permission for PRs in order to add a comment.
pull-requests: write

View File

@ -22,7 +22,7 @@ permissions: {}
jobs:
# Comments on a pull request when the author is a first time contributor.
post-welcome-message:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
@ -80,7 +80,7 @@ jobs:
# Leaves a comment on a pull request with a link to test the changes in a WordPress Playground instance.
playground-details:
name: Comment on a pull request with Playground details
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
@ -170,7 +170,7 @@ jobs:
# Manages comments reminding contributors to include a Trac ticket link when opening a pull request.
trac-ticket-check:
name: Manage Trac ticket reminders for pull requests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write

View File

@ -22,7 +22,7 @@ jobs:
# - Leaves a comment on each PR before closing.
close-prs:
name: Find and close PRs
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
pull-requests: write

View File

@ -27,7 +27,7 @@ jobs:
# - Ensures version-controlled files are not modified or deleted.
jshint:
name: Run coding standards checks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20

View File

@ -39,7 +39,7 @@ jobs:
# - Ensures version-controlled files are not modified or deleted.
phpcs:
name: Run coding standards checks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20

View File

@ -59,7 +59,7 @@ jobs:
# - Ensures version-controlled files are not modified or deleted.
e2e-tests:
name: Run E2E tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20

View File

@ -28,7 +28,7 @@ jobs:
# - Ensures version-controlled files are not modified or deleted.
test-js:
name: Run QUnit tests
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20

View File

@ -115,7 +115,7 @@ jobs:
# - Ensure version-controlled files are not modified or deleted.
performance:
name: ${{ inputs.multisite && 'Multisite' || 'Single site' }} / ${{ inputs.memcached && 'Memcached' || 'Default' }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
if: ${{ ! contains( github.event.before, '00000000' ) }}

View File

@ -33,7 +33,7 @@ jobs:
# - Ensures version-controlled files are not modified or deleted.
php-compatibility:
name: Run compatibility checks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 20

View File

@ -14,7 +14,7 @@ on:
description: 'Operating system to run tests on'
required: false
type: 'string'
default: 'ubuntu-latest'
default: 'ubuntu-24.04'
php:
description: 'The version of PHP to use, in the format of X.Y'
required: true

View File

@ -14,7 +14,7 @@ on:
description: 'Operating system to run tests on'
required: false
type: 'string'
default: 'ubuntu-latest'
default: 'ubuntu-24.04'
php:
description: 'The version of PHP to use, in the format of X.Y'
required: true

View File

@ -12,7 +12,7 @@ on:
description: 'Operating system to run tests on'
required: false
type: 'string'
default: 'ubuntu-latest'
default: 'ubuntu-24.04'
php:
description: 'The version of PHP to use, in the format of X.Y'
required: true

View File

@ -42,7 +42,7 @@ jobs:
name: Determine major WordPress version
permissions:
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 5
outputs:
version: ${{ steps.major-wp-version.outputs.version }}
@ -78,7 +78,7 @@ jobs:
name: Determine PHP versions
permissions:
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [ major-wp-version ]
timeout-minutes: 5
outputs:
@ -121,7 +121,7 @@ jobs:
name: Determine MySQL versions
permissions:
contents: read
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
needs: [ major-wp-version ]
timeout-minutes: 5
outputs:

View File

@ -10,7 +10,7 @@ on:
description: 'Operating system to run tests on'
required: false
type: 'string'
default: 'ubuntu-latest'
default: 'ubuntu-24.04'
directory:
description: 'Directory to run WordPress from. Valid values are `src` or `build`'
required: false
@ -98,7 +98,7 @@ jobs:
run: git diff --exit-code
- name: Create ZIP of built files
if: ${{ inputs.directory == 'build' && 'ubuntu-latest' == inputs.os }}
if: ${{ inputs.directory == 'build' && 'ubuntu-24.04' == inputs.os }}
run: zip -r wordpress.zip build/.
- name: Clean after building to run from ${{ inputs.directory }}

View File

@ -10,7 +10,7 @@ on:
description: 'Operating system to run tests on'
required: false
type: 'string'
default: 'ubuntu-latest'
default: 'ubuntu-24.04'
directory:
description: 'Directory to run WordPress from. Valid values are `src` or `build`'
required: false

View File

@ -12,7 +12,7 @@ on:
description: 'Operating system to test'
required: false
type: 'string'
default: 'ubuntu-latest'
default: 'ubuntu-24.04'
php:
description: 'The version of PHP to use, in the format of X.Y'
required: false

View File

@ -8,7 +8,7 @@ on:
description: 'Operating system to run tests on.'
required: false
type: 'string'
default: 'ubuntu-latest'
default: 'ubuntu-24.04'
wp:
description: 'The version of WordPress to start with.'
required: true

View File

@ -15,7 +15,7 @@ jobs:
# - Runs actionlint.
actionlint:
name: Run actionlint
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 5

View File

@ -47,7 +47,7 @@ jobs:
# - Constructs and stores a message payload as an output.
prepare:
name: Prepare notifications
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
@ -171,7 +171,7 @@ jobs:
failure:
name: Failure notifications
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: [ prepare ]
if: ${{ needs.prepare.outputs.previous_conclusion != 'first-failure' && inputs.calling_status == 'failure' || failure() }}
@ -188,7 +188,7 @@ jobs:
fixed:
name: Fixed notifications
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: [ prepare ]
if: ${{ contains( fromJson( '["failure", "cancelled", "none"]' ), needs.prepare.outputs.previous_conclusion ) && inputs.calling_status == 'success' && success() }}
@ -205,7 +205,7 @@ jobs:
success:
name: Success notifications
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: [ prepare ]
if: ${{ inputs.calling_status == 'success' && success() }}
@ -222,7 +222,7 @@ jobs:
cancelled:
name: Cancelled notifications
permissions: {}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 10
needs: [ prepare ]
if: ${{ inputs.calling_status == 'cancelled' || cancelled() }}

View File

@ -59,7 +59,7 @@ jobs:
# - Checks for zero-byte (empty) files.
check-for-empty-files:
name: ${{ matrix.theme }} empty file check
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 10
@ -109,7 +109,7 @@ jobs:
# - Ensures version-controlled files are not modified or deleted.
test-build-scripts:
name: Test ${{ matrix.theme }} build script
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
timeout-minutes: 10
@ -158,7 +158,7 @@ jobs:
# - Uploads the theme files as a workflow artifact (files uploaded as an artifact are automatically zipped).
bundle-theme:
name: Create ${{ matrix.theme }} ZIP file
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
contents: read
needs: [ check-for-empty-files, test-build-scripts ]
@ -219,7 +219,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -38,11 +38,11 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
os: [ ubuntu-24.04, windows-2022 ]
directory: [ 'src', 'build' ]
include:
# Only prepare artifacts for Playground once.
- os: ubuntu-latest
- os: ubuntu-24.04
directory: 'build'
save-build: true
prepare-playground: ${{ github.event_name == 'pull_request' && true || '' }}
@ -70,7 +70,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-latest ]
os: [ macos-14 ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
@ -86,7 +86,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
os: [ ubuntu-24.04, windows-2022 ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
@ -109,7 +109,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ macos-latest ]
os: [ macos-14 ]
directory: [ 'src', 'build' ]
with:
os: ${{ matrix.os }}
@ -133,7 +133,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -83,7 +83,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]

View File

@ -30,7 +30,7 @@ env:
jobs:
dispatch-workflows-for-old-branches:
name: ${{ matrix.workflow }} for ${{ matrix.branch }}
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
timeout-minutes: 20

View File

@ -62,7 +62,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.1' ]
@ -97,7 +97,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.4', '8.0', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
@ -125,7 +125,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
@ -157,7 +157,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
os: [ 'ubuntu-24.04' ]
php: [ '8.0', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
@ -182,7 +182,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
@ -216,7 +216,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
os: [ 'ubuntu-24.04' ]
php: [ '8.0', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.4' ]
@ -240,7 +240,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ 'ubuntu-latest' ]
os: [ 'ubuntu-24.04' ]
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4' ]
db-type: [ 'mysql' ]
db-version: [ '5.7', '8.0', '8.4', '9.1' ]
@ -285,7 +285,7 @@ jobs:
failed-workflow:
name: Failed workflow tasks
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
actions: write
needs: [ slack-notifications ]