owntone-server/.github/workflows/macos.yml
ejurgensen 07a95dce96 [gh-actions] Remove build of sqlite from MacOS workflow mk2
Homebrew's sqlite now comes with sqlite3_unlock_notify (Homebrew issue #55077),
so a custom build is no longer required.
2023-08-24 22:52:34 +02:00

79 lines
2.7 KiB
YAML

name: MacOS
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: macos-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: Update brew
run: brew update
- name: Install build tools
run: brew install automake autoconf libtool pkg-config
- name: Install gperf, bison and flex
# MacOS comes with an ancient bison, we need a newer version. Homebrew's
# bison and flex are keg-only, which means they are not symlinked into
# /usr/local because macOS already provides this software. Homebrew tells
# you to adjust the $PATH, but I couldn't make that work, and I think
# symlinking is a better solution for simple binaries.
run: |
brew install gperf bison flex
sudo ln -s /usr/local/opt/bison/bin/bison /usr/local/bin/bison
sudo ln -s /usr/local/opt/flex/bin/flex /usr/local/bin/flex
- name: Install libinotify-kqueue
# brew does not have libinotify package
run: |
git clone https://github.com/libinotify-kqueue/libinotify-kqueue
cd libinotify-kqueue
autoreconf -fvi
./configure
make
sudo make install
cd ..
- name: Install sqlite
# MacOS package does not have unlock-notify, but brew 3.42.0_1+ does, so
# install that and make sure it's used
run: |
brew install sqlite
export LD_LIBRARY_PATH=$(brew --prefix sqlite)/lib
export CPATH=$(brew --prefix sqlite)/include
export PKG_CONFIG_PATH=$(brew --prefix sqlite)/lib/pkgconfig
- name: Install ffmpeg
# The libbluray ffmpeg dependency fails without the chown (source: stackoverflow)
run: |
sudo chown -R $(whoami) $(brew --prefix)/*
brew install ffmpeg
- name: Install other dependencies
run: brew install libunistring libmxml confuse libplist libwebsockets libevent libgcrypt json-c protobuf-c libsodium gnutls pulseaudio openssl
- name: Configure
run: |
autoreconf -fi
./configure --enable-chromecast --enable-lastfm --with-pulseaudio
- name: Build
run: |
# Without setting these env vars the build fails with "fatal error: 'openssl/ssl.h' file not found"
# (Solution taken from https://github.com/libimobiledevice/libimobiledevice/issues/389#issuecomment-289284190)
export LD_LIBRARY_PATH=$(brew --prefix openssl)/lib
export CPATH=$(brew --prefix openssl)/include
export PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig
make
- name: Install
run: sudo make install