Skip to content

Commit

Permalink
Add macOS CI
Browse files Browse the repository at this point in the history
Also do CI testing on macOS 12, 13, and 14. Not using "macos-latest"
because that currently refers to macOS 12 which is not the latest
version. It is good to test on multiple versions and on multiple
architectures. The macOS 12 and 13 runners are x86_64 while the macOS 14
runner is arm64. This list can be updated annually as new macOS versions
are released and old versions are removed from CI, or switched to
"macos-latest" once that actually points to the latest version again.

Do not fail fast; this ensures that a build failure on one runner does
not cancel the other runners so that temporarily expected failures on
one runner do not mask unexpected failures on other runners.

Use Homebrew (pre-installed on macOS runners) to install dependencies
for macOS.

Explicitly mention dependencies that are used, like autoconf, automake,
and libtool, even if they are in the set of dependencies already
pre-installed on the runners, because who knows if that will always be
the case.

Fixes opencog#1496
  • Loading branch information
ryandesign committed Apr 25, 2024
1 parent 8970953 commit 6537f9e
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,24 @@ on:

jobs:
build:

runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
os: [macos-12, macos-13, macos-14, ubuntu-latest]
name: ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: install packages
run: sudo apt-get install autoconf-archive flex libpcre2-dev
run: |
case $RUNNER_OS in
Linux)
sudo apt-get install autoconf autoconf-archive automake flex libpcre2-dev libtool
;;
macOS)
brew install autoconf autoconf-archive automake pcre2 libtool
;;
esac
- name: autogen
run: ./autogen.sh --no-configure
- name: configure
Expand Down

0 comments on commit 6537f9e

Please sign in to comment.