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

Update LINUX_CI_OS_VERSION to Ubuntu 22.04 #13733

Merged
merged 4 commits into from
Sep 6, 2022
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
permissions:
actions: read
contents: read
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ permissions:
jobs:
ubuntu:
if: startsWith(github.repository, 'Homebrew/')
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/maintainers-man-completions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ permissions:

jobs:
updates:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: github.repository == 'Homebrew/brew'
steps:
- name: Setup Homebrew
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spdx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ permissions:
jobs:
spdx:
if: github.repository == 'Homebrew/brew'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Set up Homebrew
id: set-up-homebrew
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ concurrency:
jobs:
syntax:
if: github.repository == 'Homebrew/brew'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Set up Homebrew
id: set-up-homebrew
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
name: tap syntax (Linux)
needs: syntax
if: startsWith(github.repository, 'Homebrew/')
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Set up Homebrew
id: set-up-homebrew
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:

vendored-gems:
name: vendored gems (Linux)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Set up Homebrew
id: set-up-homebrew
Expand All @@ -167,31 +167,31 @@ jobs:

docker:
needs: syntax
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Set up Homebrew
id: set-up-homebrew
uses: Homebrew/actions/setup-homebrew@master

- name: Build Docker image
run: docker build -t brew --build-arg=version=16.04 .
run: docker build -t brew --build-arg=version=22.04 .

- name: Deploy the Docker image to GitHub Packages and Docker Hub
if: github.ref == 'refs/heads/master'
run: |
echo ${{secrets.HOMEBREW_BREW_GITHUB_PACKAGES_TOKEN}} |
docker login ghcr.io -u BrewTestBot --password-stdin
docker tag brew "ghcr.io/homebrew/ubuntu16.04:master"
docker push "ghcr.io/homebrew/ubuntu16.04:master"
docker tag brew "ghcr.io/homebrew/ubuntu22.04:master"
docker push "ghcr.io/homebrew/ubuntu22.04:master"
echo ${{secrets.HOMEBREW_BREW_DOCKER_TOKEN}} |
docker login -u brewtestbot --password-stdin
docker tag brew "homebrew/ubuntu16.04:master"
docker push "homebrew/ubuntu16.04:master"
docker tag brew "homebrew/ubuntu22.04:master"
docker push "homebrew/ubuntu22.04:master"

tests:
name: ${{ matrix.name }}
needs: syntax
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
strategy:
matrix:
include:
Expand Down Expand Up @@ -244,7 +244,7 @@ jobs:

test-default-formula-linux:
name: test default formula (Linux)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
env:
HOMEBREW_BOOTSNAP: 1
steps:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/triage-issues.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'stale')
)
)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Mark/Close Stale Issues and Pull Requests
uses: actions/stale@v5
Expand All @@ -55,7 +55,7 @@ jobs:
contains(github.event.pull_request.labels.*.name, 'stale')
)
)
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Mark/Close Stale `bump-formula-pr` and `bump-cask-pr` Pull Requests
uses: actions/stale@v5
Expand All @@ -72,7 +72,7 @@ jobs:

lock-threads:
if: startsWith(github.repository, 'Homebrew/') && github.event_name != 'issue_comment'
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- name: Lock Outdated Threads
uses: dessant/lock-threads@e460dfeb36e731f3aeb214be6b0c9a9d9a67eda6
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ concurrency: triage-${{ github.head_ref }}

jobs:
review:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
if: startsWith(github.repository, 'Homebrew/')
steps:
- name: Re-run this workflow
Expand Down
13 changes: 5 additions & 8 deletions Library/Homebrew/os.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,12 @@ def self.kernel_name

::OS_VERSION = ENV.fetch("HOMEBREW_OS_VERSION").freeze

LINUX_CI_OS_VERSION = "Ubuntu 16.04"
LINUX_GLIBC_CI_VERSION = "2.23"
LINUX_GCC_CI_VERSION = "5.0"
LINUX_PREFERRED_GCC_FORMULA = "gcc@5"

# Ubuntu 22.04 (see Linux-CI.md)
# 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_FORMULA = "gcc@11"
LINUX_GCC_CI_VERSION = "11.0"
LINUX_PREFERRED_GCC_FORMULA = "gcc@11"

if OS.mac?
require "os/mac"
Expand Down
6 changes: 3 additions & 3 deletions Library/Homebrew/test/compiler_selector_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,22 +52,22 @@

it "returns gcc-5 if gcc formula offers gcc-5 on linux", :needs_linux do
software_spec.fails_with(:clang)
allow(Formulary).to receive(:factory).with("gcc@5").and_return(double(version: Version.new("5.0")))
allow(Formulary).to receive(:factory).with("gcc@11").and_return(double(version: Version.new("5.0")))
expect(selector.compiler).to eq("gcc-5")
end

it "returns gcc-6 if gcc formula offers gcc-5 and fails with gcc-5 and gcc-7 on linux", :needs_linux do
software_spec.fails_with(:clang)
software_spec.fails_with(gcc: "5")
software_spec.fails_with(gcc: "7")
allow(Formulary).to receive(:factory).with("gcc@5").and_return(double(version: Version.new("5.0")))
allow(Formulary).to receive(:factory).with("gcc@11").and_return(double(version: Version.new("5.0")))
expect(selector.compiler).to eq("gcc-6")
end

it "returns gcc-7 if gcc formula offers gcc-5 and fails with gcc <= 6 on linux", :needs_linux do
software_spec.fails_with(:clang)
software_spec.fails_with(:gcc) { version "6" }
allow(Formulary).to receive(:factory).with("gcc@5").and_return(double(version: Version.new("5.0")))
allow(Formulary).to receive(:factory).with("gcc@11").and_return(double(version: Version.new("5.0")))
expect(selector.compiler).to eq("gcc-7")
end

Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/formula_installer_bottle_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def temporarily_install_bottle(formula)

stub_formula_loader formula
stub_formula_loader formula("gcc") { url "gcc-1.0" }
stub_formula_loader formula("gcc@5") { url "gcc-5.0" }
stub_formula_loader formula("gcc@11") { url "gcc-11.0" }

fi = FormulaInstaller.new(formula)
fi.fetch
Expand Down
2 changes: 1 addition & 1 deletion Library/Homebrew/test/formulary_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class Wrong#{described_class.class_s(formula_name)} < Formula
before do
allow(described_class).to receive(:loader_for).and_call_original
stub_formula_loader formula("gcc") { url "gcc-1.0" }
stub_formula_loader formula("gcc@5") { url "gcc-5.0" }
stub_formula_loader formula("gcc@11") { url "gcc-11.0" }
end

let(:installed_formula) { described_class.factory(formula_path) }
Expand Down
9 changes: 8 additions & 1 deletion Library/Homebrew/test/unpack_strategy/zstd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,12 @@
describe UnpackStrategy::Zstd do
let(:path) { TEST_FIXTURE_DIR/"cask/container.tar.zst" }

include_examples "UnpackStrategy::detect"
it "is correctly detected" do
# 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,
# 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
end