[ci] Streamline macOS pipelines
This commit is contained in:
parent
2d59762520
commit
325a3609a0
|
@ -14,15 +14,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
|
# macOS 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
|
||||||
|
@ -35,43 +35,22 @@ jobs:
|
||||||
sudo make install
|
sudo make install
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
- name: Install sqlite
|
|
||||||
# When GH actions has 3.43.0_1+, which has unlock-notify, then this can be
|
|
||||||
# removed and we can just install brew's sqlite
|
|
||||||
run: |
|
|
||||||
wget https://www.sqlite.org/2020/sqlite-autoconf-3310100.tar.gz
|
|
||||||
tar xzf sqlite-autoconf-3310100.tar.gz
|
|
||||||
cd sqlite-autoconf-3310100
|
|
||||||
export CFLAGS='-DSQLITE_ENABLE_UNLOCK_NOTIFY=1'
|
|
||||||
./configure
|
|
||||||
make
|
|
||||||
sudo make install
|
|
||||||
cd ..
|
|
||||||
|
|
||||||
- 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
|
- name: Install other dependencies
|
||||||
|
# libxml2 is included with macOS
|
||||||
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 ffmpeg sqlite
|
||||||
|
|
||||||
- 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 -I$(brew --prefix sqlite)/include"
|
||||||
|
export LDFLAGS="-L$(brew --prefix)/lib -L$(brew --prefix sqlite)/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…
Reference in New Issue