Merge pull request #13929 from Homebrew/fix_ci

Cleanup and fix CI jobs
This commit is contained in:
Mike McQuaid 2022-09-27 11:36:07 +01:00 committed by GitHub
commit 76b87c4a00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 12 deletions

View File

@ -16,7 +16,7 @@ permissions:
jobs: jobs:
tapioca: tapioca:
if: github.repository == 'Homebrew/brew' if: github.repository == 'Homebrew/brew'
runs-on: macos-latest runs-on: macos-12
steps: steps:
- name: Set up Homebrew - name: Set up Homebrew
id: set-up-homebrew id: set-up-homebrew

View File

@ -49,7 +49,7 @@ jobs:
vale docs/ vale docs/
tap-syntax: tap-syntax:
name: tap syntax (Linux) name: tap syntax
needs: syntax needs: syntax
if: startsWith(github.repository, 'Homebrew/') if: startsWith(github.repository, 'Homebrew/')
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@ -145,7 +145,7 @@ jobs:
homebrew/cask-versions homebrew/cask-versions
vendored-gems: vendored-gems:
name: vendored gems (Linux) name: vendored gems
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Set up Homebrew - name: Set up Homebrew
@ -222,16 +222,23 @@ jobs:
tests: tests:
name: ${{ matrix.name }} name: ${{ matrix.name }}
needs: syntax needs: syntax
runs-on: ubuntu-22.04 runs-on: ${{ matrix.runs-on }}
strategy: strategy:
matrix: matrix:
include: include:
- name: tests (no-compatibility mode) - name: tests (no-compatibility mode)
test-flags: --no-compat --online --coverage test-flags: --no-compat --online --coverage
runs-on: ubuntu-22.04
- name: tests (generic OS) - name: tests (generic OS)
test-flags: --generic --online --coverage test-flags: --generic --online --coverage
- name: tests (Linux) runs-on: ubuntu-22.04
- name: tests (Ubuntu 22.04)
test-flags: --online --coverage 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: steps:
- name: Set up Homebrew - name: Set up Homebrew
id: set-up-homebrew id: set-up-homebrew
@ -274,10 +281,19 @@ jobs:
files: Library/Homebrew/test/coverage/coverage.xml files: Library/Homebrew/test/coverage/coverage.xml
test-default-formula-linux: test-default-formula-linux:
name: test default formula (Linux) name: ${{ matrix.name }}
runs-on: ubuntu-22.04 runs-on: ${{ matrix.runs-on }}
env: env:
HOMEBREW_BOOTSNAP: 1 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: steps:
- name: Set up Homebrew - name: Set up Homebrew
id: set-up-homebrew id: set-up-homebrew
@ -291,7 +307,7 @@ jobs:
name: test everything (macOS) name: test everything (macOS)
needs: syntax needs: syntax
if: startsWith(github.repository, 'Homebrew/') if: startsWith(github.repository, 'Homebrew/')
runs-on: macos-latest runs-on: macos-12
env: env:
HOMEBREW_BOOTSNAP: 1 HOMEBREW_BOOTSNAP: 1
steps: steps:

View File

@ -21,7 +21,7 @@ jobs:
contains(github.event.pull_request.title, '/Library/Homebrew') contains(github.event.pull_request.title, '/Library/Homebrew')
) )
) )
runs-on: macos-latest runs-on: macos-12
steps: steps:
- name: Set up Homebrew - name: Set up Homebrew
id: set-up-homebrew id: set-up-homebrew

View File

@ -69,7 +69,7 @@ module Homebrew
end end
if args.linux? if args.linux?
runners << "ubuntu-latest" runners << "ubuntu-22.04"
elsif args.linux_self_hosted? elsif args.linux_self_hosted?
runners << "linux-self-hosted-1" runners << "linux-self-hosted-1"
end end

View File

@ -74,7 +74,7 @@ module Homebrew
test-bot: test-bot:
strategy: strategy:
matrix: matrix:
os: [ubuntu-latest, macos-latest] os: [ubuntu-22.04, macos-12]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
steps: steps:
- name: Set up Homebrew - name: Set up Homebrew
@ -119,7 +119,7 @@ module Homebrew
jobs: jobs:
pr-pull: pr-pull:
if: contains(github.event.pull_request.labels.*.name, '#{label}') if: contains(github.event.pull_request.labels.*.name, '#{label}')
runs-on: ubuntu-latest runs-on: ubuntu-22.04
steps: steps:
- name: Set up Homebrew - name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master uses: Homebrew/actions/setup-homebrew@master