Skip to content

Commit 9a83046

Browse files
committed
Migrate to Ubuntu 24.04
1 parent 86fe878 commit 9a83046

File tree

6 files changed

+32
-16
lines changed

6 files changed

+32
-16
lines changed

.github/workflows/docker.yml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ defaults:
1818
shell: bash -xeuo pipefail {0}
1919

2020
env:
21+
# odeprecated: remove 22.04 image in Homebrew >=5.4
2122
VERSIONS: '["22.04", "24.04"]'
2223

2324
jobs:
@@ -71,15 +72,15 @@ jobs:
7172
"ghcr.io/homebrew/ubuntu${version}:${brew_version}"
7273
"ghcr.io/homebrew/ubuntu${version}:latest"
7374
)
74-
if [[ "${version}" == "22.04" ]]; then
75+
if [[ "${version}" == "24.04" ]]; then
7576
tags+=(
7677
"ghcr.io/homebrew/brew:${brew_version}"
7778
"ghcr.io/homebrew/brew:latest"
7879
)
7980
fi
8081
elif [[ "${GITHUB_EVENT_NAME}" == "push" &&
8182
("${GITHUB_REF}" == "refs/heads/main") ]]; then
82-
if [[ "${version}" == "22.04" ]]; then
83+
if [[ "${version}" == "24.04" ]]; then
8384
tags+=("ghcr.io/homebrew/brew:main")
8485
fi
8586
tags+=("ghcr.io/homebrew/ubuntu${version}:main")
@@ -138,6 +139,7 @@ jobs:
138139
strategy:
139140
fail-fast: false
140141
matrix:
142+
# odeprecated: remove 22.04 image in Homebrew >=5.4
141143
version: ["22.04", "24.04"]
142144
arch: ["x86_64", "arm64"]
143145

@@ -162,6 +164,11 @@ jobs:
162164
VERSION: ${{ matrix.version }}
163165
PUSH: ${{ needs.generate-tags.outputs.push }}
164166
run: |
167+
# odeprecated: remove 22.04 image in Homebrew >=5.4
168+
if [[ "${VERSION}" == "22.04" ]]; then
169+
echo "The homebrew/ubuntu22.04 image is deprecated and will soon be retired. Use homebrew/brew." > .docker-deprecate
170+
fi
171+
165172
filter="$(printf '.["%s"]' "${VERSION}")"
166173
echo "push=$(jq --raw-output "${filter}" <<<"${PUSH}")" >>"${GITHUB_OUTPUT}"
167174
@@ -182,8 +189,17 @@ jobs:
182189
build-args: version=${{ matrix.version }}
183190
labels: ${{ needs.generate-tags.outputs.labels }}
184191

192+
- name: Set environment variables
193+
run: |
194+
# odeprecated: remove 22.04 in Homebrew >=5.4
195+
if [[ "${VERSION}" == "22.04" ]]; then
196+
echo "HOMEBREW_GLIBC_TESTING=1" >> "$GITHUB_ENV"
197+
fi
198+
env:
199+
VERSION: ${{ matrix.version }}
200+
185201
- name: Run brew test-bot --only-setup
186-
run: docker run --rm brew brew test-bot --only-setup
202+
run: docker run --env HOMEBREW_GLIBC_TESTING --rm brew brew test-bot --only-setup
187203

188204
- name: Log in to GitHub Packages (BrewTestBot)
189205
if: fromJSON(steps.attributes.outputs.push)

.github/workflows/tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,11 +330,11 @@ jobs:
330330
container: ghcr.io/homebrew/ubuntu24.04:latest
331331
- name: test-bot (Linux x86_64)
332332
runs-on: ubuntu-latest
333-
container: ghcr.io/homebrew/brew:main
334-
# Use Debian Old Stable for testing Homebrew's glibc support.
333+
container: ghcr.io/homebrew/ubuntu24.04:main
334+
# Use older Ubuntu for testing Homebrew's glibc and gcc support.
335335
- name: test-bot (Linux Homebrew glibc)
336336
runs-on: ubuntu-latest
337-
container: debian:oldstable
337+
container: ubuntu:22.04
338338
- name: test-bot (macOS x86_64)
339339
runs-on: macos-15-intel
340340
- name: test-bot (macOS arm64)
@@ -345,7 +345,7 @@ jobs:
345345
- name: Install Homebrew and Homebrew's dependencies
346346
# All other images are built from our Homebrew Dockerfile.
347347
# This is the only one that needs to be set up manually.
348-
if: matrix.container == 'debian:oldstable'
348+
if: matrix.container == 'ubuntu:22.04'
349349
run: |
350350
# Slimmed down version from the Homebrew Dockerfile
351351
apt-get update

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG version=22.04
1+
ARG version=24.04
22
# version is passed through by Docker.
33
# shellcheck disable=SC2154
44
FROM ubuntu:"${version}"

Library/Homebrew/os.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,12 @@ def self.kernel_name
4646
::OS_VERSION = T.let(ENV.fetch("HOMEBREW_OS_VERSION").freeze, String)
4747

4848
# See Linux-CI.md
49-
LINUX_CI_OS_VERSION = "Ubuntu 22.04"
50-
LINUX_CI_ARM_RUNNER = "ubuntu-22.04-arm"
51-
LINUX_GLIBC_CI_VERSION = "2.35"
49+
LINUX_CI_OS_VERSION = "Ubuntu 24.04"
50+
LINUX_CI_ARM_RUNNER = "ubuntu-24.04-arm"
51+
LINUX_GLIBC_CI_VERSION = "2.39"
5252
LINUX_GLIBC_NEXT_CI_VERSION = "2.39" # users below this version will be warned by `brew doctor`
53-
LINUX_GCC_CI_VERSION = "12" # https://packages.ubuntu.com/jammy/gcc-12
54-
LINUX_LIBSTDCXX_CI_VERSION = "6.0.30" # https://packages.ubuntu.com/jammy/libstdc++6
53+
LINUX_GCC_CI_VERSION = "13" # https://packages.ubuntu.com/noble/gcc
54+
LINUX_LIBSTDCXX_CI_VERSION = "6.0.33" # https://packages.ubuntu.com/noble/libstdc++6
5555
LINUX_PREFERRED_GCC_COMPILER_FORMULA = T.let("gcc@#{LINUX_GCC_CI_VERSION}".freeze, String)
5656
LINUX_PREFERRED_GCC_RUNTIME_FORMULA = "gcc"
5757

docs/Linux-CI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ last_review_date: "2026-03-19"
44

55
# Linux CI in `homebrew/core`
66

7-
We currently use Ubuntu 22.04 for bottling in `homebrew/core`.
7+
We currently use Ubuntu 24.04 for bottling in `homebrew/core`.
88

99
We aim to use the oldest supported Ubuntu LTS version for our CI that provides the GCC version we need.
1010

docs/Support-Tiers.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ To qualify as Tier 1, a Linux configuration must meet all of the following:
4343
- Running on:
4444
- Ubuntu within its [standard support window](https://ubuntu.com/about/release-cycle) or
4545
- a Homebrew-provided Docker image
46-
- Using a system `glibc` version ≥ 2.35
46+
- Using a system `glibc` version ≥ 2.39
4747
- Using a Linux kernel version ≥ 3.2
4848
- Installed in the default prefix: `/home/linuxbrew/.linuxbrew`
4949
- Using a supported architecture (ARM64/AArch64 or Intel x86_64 with SSSE3 support)
@@ -67,7 +67,7 @@ Tier 2 configurations include:
6767

6868
- macOS prerelease versions before they are promoted to Tier 1
6969
- macOS systems with outdated versions of Xcode Command Line Tools
70-
- Linux systems with `glibc` versions between 2.13 and 2.34 (Homebrew’s own `glibc` formula will be installed automatically)
70+
- Linux systems with `glibc` versions between 2.13 and 2.38 (Homebrew’s own `glibc` formula will be installed automatically)
7171
- Homebrew installed outside the default prefix, requiring source builds for official packages (i.e. installing outside `/opt/homebrew`, `/usr/local`, or `/home/linuxbrew/.linuxbrew`)
7272
- Architectures not yet officially supported by Homebrew
7373
- Macs using OpenCore Legacy Patcher with a Westmere or newer Intel CPU

0 commit comments

Comments
 (0)