Skip to content

Commit

Permalink
[gh-actions] Simplify the macOS build
Browse files Browse the repository at this point in the history
Credit @hackitwack
  • Loading branch information
ejurgensen committed Jun 4, 2024
1 parent e7459e0 commit 390c335
Showing 1 changed file with 3 additions and 22 deletions.
25 changes: 3 additions & 22 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,36 +49,17 @@ jobs:
sudo make install
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
# libxml2 is included with Mac OS
run: |
brew install 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
# 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"
export CFLAGS="-I$(brew --prefix)/include -I$(brew --prefix sqlite)/include"
export LDFLAGS="-L$(brew --prefix)/lib -L$(brew --prefix sqlite)/lib"
autoreconf -fi
./configure --prefix=$HOME/owntone_data/usr --sysconfdir=$HOME/owntone_data/etc --localstatedir=$HOME/owntone_data/var --enable-chromecast --with-pulseaudio
Expand Down

0 comments on commit 390c335

Please sign in to comment.