Skip to content

Commit

Permalink
[ci] Add macOS versions to build matrix
Browse files Browse the repository at this point in the history
**Why this change was necessary**
The GitHub workflows were only testing against `macos-latest`, which
still points to macOS 10.15 Catalina[1]. Now that M1 Macs running
macOS 11.0 Big Sur have reached consumers, Emacs Plus should also
include that OS (and CPU arch) in its CI tests.

**What this change does**
 - Adds macOS 11.0 as an option to the build matrix for every
 workflow.
 - Explicitly names macOS 10.15 (Catalina) as an option to the build
 matrix.
 - Explicitly sets Xcode 12.2 if the OS version is 11.0, since
 previous XCode versions cannot build for Big Sur[2].

**Any side-effects?**
None.

**Additional context/notes/links**
[1] https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources
[2] actions/runner-images#2056
  • Loading branch information
jidicula committed Nov 28, 2020
1 parent 5ac3bb6 commit 860a92d
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 5 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/emacs-26.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15, macos-11.0]
build_opts:
- ""
- "--build-from-source"
Expand All @@ -35,6 +36,10 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Use XCode 12.2 for Big Sur
if: contains(matrix.os, "macos-11.0")
run: sudo xcode-select -s "/Applications/Xcode_12.2.app"

- name: Build emacs-plus@26 ${{ matrix.build_opts }}
run: brew install emacs-plus@26.rb ${{ matrix.build_opts }}
working-directory: Formula
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/emacs-27.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11.0]
build_opts:
- ""
- "--with-xwidgets"
Expand All @@ -41,6 +42,10 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Use XCode 12.2 for Big Sur
if: contains(matrix.os, "macos-11.0")
run: sudo xcode-select -s "/Applications/Xcode_12.2.app"

- name: Install xquartz
if: contains(matrix.build_opts, '--with-x11')
run: brew cask install xquartz
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/emacs-28.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-10.15, macos-11.0]
build_opts:
- ""
- "--with-xwidgets"
Expand All @@ -37,6 +38,10 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Use XCode 12.2 for Big Sur
if: contains(matrix.os, "macos-11.0")
run: sudo xcode-select -s "/Applications/Xcode_12.2.app"

- name: Build emacs-plus@28 ${{ matrix.build_opts }}
run: brew install emacs-plus@28.rb ${{ matrix.build_opts }}
working-directory: Formula
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/emacs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15, macos-11.0]
build_opts:
- ""
- "--build-from-source"
Expand All @@ -31,6 +32,10 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Use XCode 12.2 for Big Sur
if: contains(matrix.os, "macos-11.0")
run: sudo xcode-select -s "/Applications/Xcode_12.2.app"

- name: Build emacs-plus ${{ matrix.build_opts }}
uses: nick-invision/retry@v1
with:
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/online.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,18 @@ on:

jobs:
build:
runs-on: macos-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-10.15, macos-11.0]

steps:
- uses: actions/checkout@v1

- name: Use XCode 12.2 for Big Sur
if: contains(matrix.os, "macos-11.0")
run: sudo xcode-select -s "/Applications/Xcode_12.2.app"

- name: Tap emacs-plus
run: brew tap d12frosted/emacs-plus

Expand Down

0 comments on commit 860a92d

Please sign in to comment.