From 4aa765fafe010b658160efa0242509c9f178a6e6 Mon Sep 17 00:00:00 2001 From: Mike McQuaid Date: Tue, 27 Sep 2022 10:30:08 +0100 Subject: [PATCH] Cleanup and fix CI jobs - use macOS 12 or Ubuntu 22.04 wherever appropriate - don't append `(Linux)` to job names - use specific Ubuntu 22.04 and Ubuntu 18.04 jobs We may want to consider more Ubuntu 18.04 jobs in future, too. --- .github/workflows/sorbet.yml | 2 +- .github/workflows/tests.yml | 30 ++++++++++++++----- .github/workflows/vendor-gems.yml | 2 +- .../Homebrew/dev-cmd/dispatch-build-bottle.rb | 2 +- Library/Homebrew/dev-cmd/tap-new.rb | 4 +-- 5 files changed, 28 insertions(+), 12 deletions(-) diff --git a/.github/workflows/sorbet.yml b/.github/workflows/sorbet.yml index d87bf16cdc..72902fade0 100644 --- a/.github/workflows/sorbet.yml +++ b/.github/workflows/sorbet.yml @@ -16,7 +16,7 @@ permissions: jobs: tapioca: if: github.repository == 'Homebrew/brew' - runs-on: macos-latest + runs-on: macos-12 steps: - name: Set up Homebrew id: set-up-homebrew diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7e70a50763..e01422163a 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -49,7 +49,7 @@ jobs: vale docs/ tap-syntax: - name: tap syntax (Linux) + name: tap syntax needs: syntax if: startsWith(github.repository, 'Homebrew/') runs-on: ubuntu-22.04 @@ -145,7 +145,7 @@ jobs: homebrew/cask-versions vendored-gems: - name: vendored gems (Linux) + name: vendored gems runs-on: ubuntu-22.04 steps: - name: Set up Homebrew @@ -222,16 +222,23 @@ jobs: tests: name: ${{ matrix.name }} needs: syntax - runs-on: ubuntu-22.04 + runs-on: ${{ matrix.runs-on }} strategy: matrix: include: - name: tests (no-compatibility mode) test-flags: --no-compat --online --coverage + runs-on: ubuntu-22.04 - name: tests (generic OS) test-flags: --generic --online --coverage - - name: tests (Linux) + runs-on: ubuntu-22.04 + - name: tests (Ubuntu 22.04) test-flags: --online --coverage + runs-on: ubuntu-22.04 + # Enable later once this can be fixed. + # - name: tests (Ubuntu 18.04) + # test-flags: --online --coverage + # runs-on: ubuntu-18.04 steps: - name: Set up Homebrew id: set-up-homebrew @@ -274,10 +281,19 @@ jobs: files: Library/Homebrew/test/coverage/coverage.xml test-default-formula-linux: - name: test default formula (Linux) - runs-on: ubuntu-22.04 + name: ${{ matrix.name }} + runs-on: ${{ matrix.runs-on }} env: HOMEBREW_BOOTSNAP: 1 + strategy: + matrix: + include: + - name: test default formula (Ubuntu 22.04) + test-flags: --online --coverage + runs-on: ubuntu-22.04 + - name: test default formula (Ubuntu 18.04) + test-flags: --online --coverage + runs-on: ubuntu-18.04 steps: - name: Set up Homebrew id: set-up-homebrew @@ -291,7 +307,7 @@ jobs: name: test everything (macOS) needs: syntax if: startsWith(github.repository, 'Homebrew/') - runs-on: macos-latest + runs-on: macos-12 env: HOMEBREW_BOOTSNAP: 1 steps: diff --git a/.github/workflows/vendor-gems.yml b/.github/workflows/vendor-gems.yml index 00a12b3127..08ec0ded89 100644 --- a/.github/workflows/vendor-gems.yml +++ b/.github/workflows/vendor-gems.yml @@ -21,7 +21,7 @@ jobs: contains(github.event.pull_request.title, '/Library/Homebrew') ) ) - runs-on: macos-latest + runs-on: macos-12 steps: - name: Set up Homebrew id: set-up-homebrew diff --git a/Library/Homebrew/dev-cmd/dispatch-build-bottle.rb b/Library/Homebrew/dev-cmd/dispatch-build-bottle.rb index 4fd2780245..7385e5a8ba 100644 --- a/Library/Homebrew/dev-cmd/dispatch-build-bottle.rb +++ b/Library/Homebrew/dev-cmd/dispatch-build-bottle.rb @@ -69,7 +69,7 @@ module Homebrew end if args.linux? - runners << "ubuntu-latest" + runners << "ubuntu-22.04" elsif args.linux_self_hosted? runners << "linux-self-hosted-1" end diff --git a/Library/Homebrew/dev-cmd/tap-new.rb b/Library/Homebrew/dev-cmd/tap-new.rb index f09775fd0b..54f9bfad50 100644 --- a/Library/Homebrew/dev-cmd/tap-new.rb +++ b/Library/Homebrew/dev-cmd/tap-new.rb @@ -74,7 +74,7 @@ module Homebrew test-bot: strategy: matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-22.04, macos-12] runs-on: ${{ matrix.os }} steps: - name: Set up Homebrew @@ -119,7 +119,7 @@ module Homebrew jobs: pr-pull: if: contains(github.event.pull_request.labels.*.name, '#{label}') - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Set up Homebrew uses: Homebrew/actions/setup-homebrew@master