Lukas Fleischer 98ff4dbacb Fix Mac OS GitHub workflow
Prior to this change, CI was failing with the following error:

    ==> Installing asciidoc dependency: python@3.11
    ==> Pouring python@3.11--3.11.3.monterey.bottle.tar.gz
    Error: The `brew link` step did not complete successfully
    The formula built, but is not symlinked into /usr/local
    Could not symlink bin/2to3
    Target /usr/local/bin/2to3
    already exists. You may want to remove it:
      rm '/usr/local/bin/2to3'

    To force the link and overwrite all conflicting files:
      brew link --overwrite python@3.11

    To list all files that would be deleted:
      brew link --overwrite --dry-run python@3.11

Explicitly link with overwrite.

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
2023-04-11 15:55:39 -04:00

52 lines
1.2 KiB
YAML

name: Build and test
on:
push:
branches: [master, pu]
paths-ignore:
- 'contrib/**'
- 'doc/**'
- 'po/**'
pull_request:
branches: [master, pu]
paths-ignore:
- 'contrib/**'
- 'doc/**'
- 'po/**'
jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest', 'macos-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies (Ubuntu)
run: sudo apt-get install asciidoc autopoint gettext xmlto autoconf-archive
if: matrix.os == 'ubuntu-latest'
- name: Install dependencies (MacOS)
run: |
brew update
brew install --overwrite python
brew install automake
brew install asciidoc
brew install gettext
brew install xmlto
brew install autoconf-archive
brew link --force gettext
sudo mkdir /etc/xml
sudo ln -s /usr/local/etc/xml/catalog /etc/xml/catalog
if: matrix.os == 'macos-latest'
- name: autogen.sh
run: ./autogen.sh
- name: configure
run: ./configure
- name: make
run: make
- name: make check
run: make check
- name: make distcheck
run: make distcheck