mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-15 16:48:22 -04:00
[gh-actions] Fix building for macos-latest (Mac OS 14 Sonoma)
This commit is contained in:
parent
9f0fa7c45c
commit
9439bcc60c
26
.github/workflows/macos.yml
vendored
26
.github/workflows/macos.yml
vendored
@ -19,7 +19,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: macos-12
|
runs-on: macos-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@ -28,15 +28,15 @@ jobs:
|
|||||||
run: brew install automake autoconf libtool pkg-config
|
run: brew install automake autoconf libtool pkg-config
|
||||||
|
|
||||||
- name: Install gperf, bison and flex
|
- name: Install gperf, bison and flex
|
||||||
# MacOS comes with an ancient bison, we need a newer version. Homebrew's
|
# Mac OS has ancient versions of bison and flex, so we need a newer from
|
||||||
# bison and flex are keg-only, which means they are not symlinked into
|
# Homebrew. The new versions are installed keg-only, so we must tell
|
||||||
# /usr/local because macOS already provides this software. Homebrew tells
|
# configure/make where to look. Adjusting $PATH doesn't work (maybe
|
||||||
# you to adjust the $PATH, but I couldn't make that work, and I think
|
# because make invokes the two via ylwrap), so instead symlink the two
|
||||||
# symlinking is a better solution for simple binaries.
|
# into /usr/local/bin.
|
||||||
run: |
|
run: |
|
||||||
brew install gperf bison flex
|
brew install gperf bison flex
|
||||||
sudo ln -s /usr/local/opt/bison/bin/bison /usr/local/bin/bison
|
sudo ln -s "$(brew --prefix)/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/flex/bin/flex" /usr/local/bin/flex
|
||||||
|
|
||||||
- name: Install libinotify-kqueue
|
- name: Install libinotify-kqueue
|
||||||
# brew does not have libinotify package
|
# brew does not have libinotify package
|
||||||
@ -69,23 +69,21 @@ jobs:
|
|||||||
brew install ffmpeg
|
brew install ffmpeg
|
||||||
|
|
||||||
- name: Install other dependencies
|
- name: Install other dependencies
|
||||||
|
# libxml2 is included with Mac OS
|
||||||
run: |
|
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
|
- name: Configure
|
||||||
# We configure a non-privileged setup, since how to add a "owntone" system
|
# 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)
|
# user in MacOS isn't clear to me (useradd etc. isn't available)
|
||||||
run: |
|
run: |
|
||||||
|
export CFLAGS="-I$(brew --prefix)/include"
|
||||||
|
export LDFLAGS="-L$(brew --prefix)/lib"
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
./configure --prefix=$HOME/owntone_data/usr --sysconfdir=$HOME/owntone_data/etc --localstatedir=$HOME/owntone_data/var --enable-chromecast --with-pulseaudio
|
./configure --prefix=$HOME/owntone_data/usr --sysconfdir=$HOME/owntone_data/etc --localstatedir=$HOME/owntone_data/var --enable-chromecast --with-pulseaudio
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
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
|
make
|
||||||
|
|
||||||
- name: Install
|
- name: Install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user