Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux: make ubuntu 24.04 the latest version #19221

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
"homebrew/ubuntu${{matrix.version}}:${brew_version}"
"homebrew/ubuntu${{matrix.version}}:latest"
)
if [[ "${{ matrix.version }}" == "22.04" ]]; then
if [[ "${{ matrix.version }}" == "24.04" ]]; then
tags+=(
"ghcr.io/homebrew/brew:${brew_version}"
"ghcr.io/homebrew/brew:latest"
Expand All @@ -76,7 +76,7 @@ jobs:
fi
elif [[ "${GITHUB_EVENT_NAME}" == "merge_group" &&
"${GITHUB_REF}" == "refs/heads/master" &&
"${{ matrix.version }}" == "22.04" ]]; then
"${{ matrix.version }}" == "24.04" ]]; then
tags+=(
"ghcr.io/homebrew/brew:master"
"ghcr.io/homebrew/ubuntu${{ matrix.version }}:master"
Expand All @@ -86,7 +86,7 @@ jobs:
fi
if [[ "${{ matrix.version }}" == "18.04" ]]; then
# odeprecated: remove this in Homebrew >=4.5
echo "The homebrew/ubuntu18.04 image is deprecated and will soon be retired. Use homebrew/ubuntu22.04 or homebrew/ubuntu24.04 or homebrew/ubuntu20.04 or homebrew/brew." > .docker-deprecate
echo "The homebrew/ubuntu18.04 image is deprecated and will soon be retired. Use homebrew/ubuntu24.04 or homebrew/ubuntu22.04 or homebrew/ubuntu20.04 or homebrew/brew." > .docker-deprecate
fi

{
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -371,9 +371,12 @@ jobs:
strategy:
matrix:
include:
- name: test default formula (Ubuntu 24.04)
runs-on: ubuntu-latest
container: ghcr.io/homebrew/ubuntu24.04:master
- name: test default formula (Ubuntu 22.04)
runs-on: ubuntu-latest
container: ghcr.io/homebrew/ubuntu22.04:master
container: ghcr.io/homebrew/ubuntu22.04
- name: test default formula (Ubuntu 20.04)
runs-on: ubuntu-latest
container: ghcr.io/homebrew/ubuntu20.04
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG version=22.04
ARG version=24.04
# version is passed through by Docker.
# shellcheck disable=SC2154
FROM ubuntu:"${version}"
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/dev-cmd/dispatch-build-bottle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def run
end

if args.linux?
runners << "ubuntu-22.04"
runners << "ubuntu-24.04"
elsif args.linux_self_hosted?
runners << "linux-self-hosted-1"
end
Expand Down
4 changes: 2 additions & 2 deletions Library/Homebrew/dev-cmd/tap-new.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def run
test-bot:
strategy:
matrix:
os: [ubuntu-22.04, macos-13, macos-15]
os: [ubuntu-24.04, macos-13, macos-15]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Homebrew
Expand Down Expand Up @@ -139,7 +139,7 @@ def run
jobs:
pr-pull:
if: contains(github.event.pull_request.labels.*.name, '#{label}')
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
permissions:
#{pr_pull_permissions.sort.map { |k, v| " #{k}: #{v}" }.join("\n")}
steps:
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/github_runner_matrix.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def linux_runner_spec
name: "Linux",
runner: linux_runner,
container: {
image: "ghcr.io/homebrew/ubuntu22.04:master",
image: "ghcr.io/homebrew/ubuntu24.04:master",
options: "--user=linuxbrew -e GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED",
},
workdir: "/github/home",
Expand Down
10 changes: 5 additions & 5 deletions Library/Homebrew/os.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,11 @@ def self.kernel_name
::OS_VERSION = T.let(ENV.fetch("HOMEBREW_OS_VERSION").freeze, String)

# See Linux-CI.md
LINUX_CI_OS_VERSION = "Ubuntu 22.04"
LINUX_GLIBC_CI_VERSION = "2.35"
LINUX_GLIBC_NEXT_CI_VERSION = "2.35"
LINUX_GCC_CI_VERSION = "11.0"
LINUX_PREFERRED_GCC_COMPILER_FORMULA = "gcc@11" # https://packages.ubuntu.com/jammy/gcc
LINUX_CI_OS_VERSION = "Ubuntu 24.04"
LINUX_GLIBC_CI_VERSION = "2.39"
LINUX_GLIBC_NEXT_CI_VERSION = "2.39"
LINUX_GCC_CI_VERSION = "13.0"
LINUX_PREFERRED_GCC_COMPILER_FORMULA = "gcc@13" # https://packages.ubuntu.com/noble/gcc
LINUX_PREFERRED_GCC_RUNTIME_FORMULA = "gcc"

if OS.mac?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def get_runners(file)
FileUtils.rm_f github_output
end

let(:linux_runner) { "ubuntu-22.04" }
let(:linux_runner) { "ubuntu-24.04" }
# We need to make sure we write to a different path for each example.
let(:github_output) { "#{TEST_TMPDIR}/github_output#{DetermineRunnerTestHelper.new.number}" }
let(:ephemeral_suffix) { "-12345" }
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/linux_runner_spec_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
described_class.new(
name: "Linux",
runner: "ubuntu-latest",
container: { image: "ghcr.io/homebrew/ubuntu22.04:master", options: "--user=linuxbrew" },
container: { image: "ghcr.io/homebrew/ubuntu24.04:master", options: "--user=linuxbrew" },
workdir: "/github/home",
timeout: 360,
cleanup: false,
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/unpack_strategy/zstd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# `UnpackStrategy.detect(path)` for a `.tar.XXX` file returns either `UnpackStrategy::Tar` if
# the host's `tar` is able to extract that compressed file or `UnpackStrategy::XXX` otherwise,
# such as `UnpackStrategy::Zstd`. On macOS `UnpackStrategy.detect("container.tar.zst")`
# returns `UnpackStrategy::Zstd` and on Ubuntu 22.04 it returns `UnpackStrategy::Tar`,
# returns `UnpackStrategy::Zstd` and on Ubuntu 24.04 it returns `UnpackStrategy::Tar`,
# because the host's version of `tar` is recent enough and `zstd` is installed.
expect(UnpackStrategy.detect(path)).to(be_a(described_class).or(be_a(UnpackStrategy::Tar)))
end
Expand Down
12 changes: 3 additions & 9 deletions docs/Linux-CI.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ last_review_date: "1970-01-01"

# Linux CI in `homebrew/core`

We currently use Ubuntu 22.04 for bottling in `homebrew/core`.
We currently use Ubuntu 24.04 for bottling in `homebrew/core`.

We try to use the latest Ubuntu LTS version for our CI no earlier than 3 months after its release and, ideally, no more than 12 months after its release.

## Ubuntu vs. other Linux distributions

Expand All @@ -16,14 +18,6 @@ Our bottles are compatible with other distributions like Debian/CentOS, even whe

## Past and next versions

We have moved our CI to Ubuntu 22.04

Moving from Ubuntu 16.04 to Ubuntu 22.04 (and thus skipping version 18.04 and 20.04) took longer than expected.

We plan to proceed with regular updates from 2022 onwards. We aim to use the latest Ubuntu LTS version for our CI.

We will start using the latest Ubuntu LTS version for our CI no earlier than 3 months after its release and, ideally, no more than 12 months after its release.

| Distribution | Glibc | GCC | LTS standard security maintenance |
|---|---|---|---|
| Ubuntu 14.04 | 2.19 | 4 | From 2014 to 2017 |
Expand Down
Loading