Skip to content

Commit

Permalink
Switching to Ubuntu 24.04 LTS for builders and testers.
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor committed Nov 27, 2024
1 parent 59c4cde commit ac8ccb7
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Build Docker
on:
push:
branches: [ 'trunk' ]
branches: ['trunk']
paths:
- 'tools/docker/Dockerfile'
- 'tools/docker/bin/run.sh'
Expand All @@ -22,11 +22,11 @@ concurrency:
jobs:
build:
name: Build and publish Jetpack Dev Environment
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
permissions:
packages: write
contents: read
timeout-minutes: 60 # 2021-10-26: Build for arm64 is S-L-O-W. Sigh.
timeout-minutes: 60 # 2021-10-26: Build for arm64 is S-L-O-W. Sigh.

steps:
- uses: actions/checkout@v4
Expand Down
18 changes: 9 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ concurrency:
cancel-in-progress: true

env:
COMPOSER_ROOT_VERSION: "dev-trunk"
COMPOSER_ROOT_VERSION: 'dev-trunk'

jobs:
build:
name: Build all projects
runs-on: ubuntu-latest
timeout-minutes: 30 # 2023-05-25: Build times have crept up to ~15–25+ minutes as we've added more projects, bump to 30.
runs-on: ubuntu-24.04
timeout-minutes: 30 # 2023-05-25: Build times have crept up to ~15–25+ minutes as we've added more projects, bump to 30.
env:
# Hard-code a specific directory to avoid paths in vendor/composer/installed.json changing every build.
BUILD_BASE: /tmp/jetpack-build
# This string is used as a unique identifier of test reminder comments on PRs.
TEST_COMMENT_INDICATOR: "<!-- wpcom-reminder-comment -->"
TEST_COMMENT_INDICATOR: '<!-- wpcom-reminder-comment -->'
outputs:
any_plugins: ${{ steps.plugins.outputs.any }}
changed_projects: ${{ steps.changed.outputs.projects }}
Expand Down Expand Up @@ -199,7 +199,7 @@ jobs:
runs-on: ubuntu-latest
needs: build
if: needs.build.outputs.any_plugins == 'true'
timeout-minutes: 10 # 2021-06-24: Successful runs should take just a few seconds now. But sometimes the upload is slow.
timeout-minutes: 10 # 2021-06-24: Successful runs should take just a few seconds now. But sometimes the upload is slow.
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -294,16 +294,16 @@ jobs:
- uses: actions/checkout@v4
with:
path: monorepo
timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds
timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds

- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: jetpack-build
timeout-minutes: 2 # 2022-03-15: Successful runs normally take a few seconds, but on occasion they've been taking 60+ recently.
timeout-minutes: 2 # 2022-03-15: Successful runs normally take a few seconds, but on occasion they've been taking 60+ recently.
- name: Extract build archive
run: tar --xz -xvvf build.tar.xz build
timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds
timeout-minutes: 1 # 2021-01-18: Successful runs seem to take a few seconds

- name: Wait for prior instances of the workflow to finish
uses: ./monorepo/.github/actions/turnstile
Expand All @@ -316,4 +316,4 @@ jobs:
upstream-ref-since: '2024-04-10' # No point in checking 12 years of earlier commits from before we started adding "Upstream-Ref".
username: matticbot
working-directory: ${{ github.workspace }}/build
timeout-minutes: 10 # 2024-04-11: Successful runs seem to take about a minute.
timeout-minutes: 10 # 2024-04-11: Successful runs seem to take about a minute.
28 changes: 13 additions & 15 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@ on:
paths-ignore:
- '**.md'
repository_dispatch:
types: [ 'e2e tests**' ]
types: ['e2e tests**']

concurrency:
group: e2e-tests-${{ github.event_name }}-${{ github.ref }}-${{ github.event.action }}
cancel-in-progress: true

jobs:
create-test-matrix:
name: "Determine tests matrix"
runs-on: ubuntu-latest
timeout-minutes: 5 # 2023-09-15: The pnpm install may take a few minutes on cache miss.
name: 'Determine tests matrix'
runs-on: ubuntu-24.04
timeout-minutes: 5 # 2023-09-15: The pnpm install may take a few minutes on cache miss.
# Only run tests in the main repository
if: github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name
outputs:
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
echo "build-matrix=$BUILD_MATRIX" >> "$GITHUB_OUTPUT"
build-projects:
name: "E2E: Build ${{ matrix.buildGroup }}"
name: 'E2E: Build ${{ matrix.buildGroup }}'
runs-on: ubuntu-latest
needs: create-test-matrix
timeout-minutes: 30
Expand Down Expand Up @@ -98,7 +98,7 @@ jobs:
id: build-step
if: steps.jetpack-build-cache.outputs.cache-hit != 'true'
env:
COMPOSER_ROOT_VERSION: "dev-trunk"
COMPOSER_ROOT_VERSION: 'dev-trunk'
BUILD_DIR: ./build-output
PROJECT_PATH: ${{ matrix.path }}
run: |
Expand Down Expand Up @@ -133,9 +133,9 @@ jobs:
key: ${{ steps.jetpack-build-cache.outputs.cache-primary-key }}

e2e-tests:
name: "${{ matrix.project }} e2e tests"
name: '${{ matrix.project }} e2e tests'
runs-on: ubuntu-latest
needs: [ create-test-matrix, build-projects ]
needs: [create-test-matrix, build-projects]
# The "always() && ! cancelled() && ! failure()" bit is needed to still run if the build was skipped.
if: >
always() && ! cancelled() && ! failure() &&
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:

- name: Prepare build
env:
COMPOSER_ROOT_VERSION: "dev-trunk"
COMPOSER_ROOT_VERSION: 'dev-trunk'
BUILD_DIR: ./build-output
PROJECT_PATH: ${{ matrix.path }}
SUITE: ${{ matrix.suite }}
Expand Down Expand Up @@ -303,7 +303,7 @@ jobs:
include-hidden-files: true

test-report:
name: "Test report"
name: 'Test report'
runs-on: ubuntu-latest
if: ${{ success() || failure() }}
needs: [e2e-tests]
Expand Down Expand Up @@ -340,7 +340,7 @@ jobs:
client-payload: ${{ steps.report-context.outputs.client_payload }}

slack-notification:
name: "Slack notification"
name: 'Slack notification'
runs-on: ubuntu-latest
if: ${{ success() || failure() }}
needs: [e2e-tests]
Expand Down Expand Up @@ -376,16 +376,14 @@ jobs:
VERSION: ${{ github.event.client_payload.ref_name }}
run: echo "NOTIFICATION_SUITE=rc-${VERSION}" >> $GITHUB_ENV

- name: "Send notification"
- name: 'Send notification'
uses: ./projects/github-actions/test-results-to-slack
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
slack_token: ${{ secrets.SLACK_TOKEN }}
slack_channel: ${{ secrets.SLACK_E2E_CHANNEL }}
slack_icon_emoji: ":jetpack:"
slack_icon_emoji: ':jetpack:'
suite_name: ${{ env.NOTIFICATION_SUITE }}
playwright_report_path: test-output/**/summary.json
playwright_output_dir: test-output/**/results
rules_configuration_path: .github/files/e2e-tests/notification-rules.json


14 changes: 7 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@ name: Tests
on:
pull_request:
push:
branches: [ 'trunk', '*/branch-*' ]
branches: ['trunk', '*/branch-*']
concurrency:
group: tests-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

env:
COMPOSER_ROOT_VERSION: "dev-trunk"
COMPOSER_ROOT_VERSION: 'dev-trunk'

jobs:
create-matrix:
name: "Determine tests matrix"
runs-on: ubuntu-latest
timeout-minutes: 1 # 2021-02-03: Should only take a second.
name: 'Determine tests matrix'
runs-on: ubuntu-24.04
timeout-minutes: 1 # 2021-02-03: Should only take a second.
outputs:
matrix: ${{ steps.create-matrix.outputs.matrix }}
steps:
Expand Down Expand Up @@ -330,7 +330,7 @@ jobs:
plugin-deps:
name: Check plugin monorepo dep versions
runs-on: ubuntu-latest
timeout-minutes: 2 # 2022-09-08: Should only take a few seconds.
timeout-minutes: 2 # 2022-09-08: Should only take a few seconds.
steps:
- uses: actions/checkout@v4
- name: Setup tools
Expand Down Expand Up @@ -369,7 +369,7 @@ jobs:
phan:
name: Static analysis
runs-on: ubuntu-latest
timeout-minutes: 20 # 2024-05-02: Up to about 8 minutes now that we're running against the old WP stubs too.
timeout-minutes: 20 # 2024-05-02: Up to about 8 minutes now that we're running against the old WP stubs too.
steps:
- uses: actions/checkout@v4
- name: Setup tools
Expand Down

0 comments on commit ac8ccb7

Please sign in to comment.