[gh-actions] Fix building for macos-latest (Mac OS 14 Sonoma)
This commit is contained in:
parent
9f0fa7c45c
commit
9439bcc60c
|
@ -19,7 +19,7 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-12
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -28,15 +28,15 @@ jobs:
|
|||
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.
|
||||
# Mac OS has ancient versions of bison and flex, so we need a newer from
|
||||
# Homebrew. The new versions are installed keg-only, so we must tell
|
||||
# configure/make where to look. Adjusting $PATH doesn't work (maybe
|
||||
# because make invokes the two via ylwrap), so instead symlink the two
|
||||
# into /usr/local/bin.
|
||||
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
|
||||
sudo ln -s "$(brew --prefix)/opt/bison/bin/bison" /usr/local/bin/bison
|
||||
sudo ln -s "$(brew --prefix)/opt/flex/bin/flex" /usr/local/bin/flex
|
||||
|
||||
- name: Install libinotify-kqueue
|
||||
# brew does not have libinotify package
|
||||
|
@ -69,23 +69,21 @@ jobs:
|
|||
brew install ffmpeg
|
||||
|
||||
- name: Install other dependencies
|
||||
# libxml2 is included with Mac OS
|
||||
run: |
|
||||
brew install libxml2 libunistring confuse libplist libwebsockets libevent libgcrypt json-c protobuf-c libsodium gnutls pulseaudio openssl
|
||||
brew install libunistring confuse libplist libwebsockets libevent libgcrypt json-c protobuf-c libsodium gnutls pulseaudio openssl
|
||||
|
||||
- name: Configure
|
||||
# We configure a non-privileged setup, since how to add a "owntone" system
|
||||
# user in MacOS isn't clear to me (useradd etc. isn't available)
|
||||
run: |
|
||||
export CFLAGS="-I$(brew --prefix)/include"
|
||||
export LDFLAGS="-L$(brew --prefix)/lib"
|
||||
autoreconf -fi
|
||||
./configure --prefix=$HOME/owntone_data/usr --sysconfdir=$HOME/owntone_data/etc --localstatedir=$HOME/owntone_data/var --enable-chromecast --with-pulseaudio
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
# Without setting these env vars the build fails with e.g. "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
|
||||
|
|
Loading…
Reference in New Issue