Add Github action workflow for MacOS build

This commit is contained in:
ejurgensen 2020-05-22 20:03:53 +02:00
parent e132b2fd25
commit bd3a872cd0

62
.github/workflows/macos.yml vendored Normal file
View File

@ -0,0 +1,62 @@
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: Install build tools
run: brew install automake autoconf libtool pkg-config
- name: Install libinotify-kqueue
# brew package does not have unlock-notify
run: |
git clone https://github.com/libinotify-kqueue/libinotify-kqueue
cd libinotify-kqueue
autoreconf -fvi
./configure
make
sudo make install
cd ..
- name: Install sqlite
# brew package does not have unlock-notify
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 gperf and antlr3
run: |
brew install gperf
wget https://github.com/ejurgensen/actionstest/blob/master/antlr35_install.sh
./antlr35_install.sh -p /usr/local
- name: Install other dependencies
run: brew install libunistring libmxml confuse libplist sqlite libwebsockets libevent libgcrypt json-c protobuf-c libsodium gnutls pulseaudio
- name: Configure forked-daapd
run: |
autoreconf -fi
./configure --enable-chromecast --enable-lastfm --with-pulseaudio
echo All done