mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-28 15:06:02 -05:00
Merge branch 'chme-github-actions'
This commit is contained in:
commit
5683a7a793
73
.github/workflows/macos.yml
vendored
Normal file
73
.github/workflows/macos.yml
vendored
Normal file
@ -0,0 +1,73 @@
|
|||||||
|
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 does not have libinotify package
|
||||||
|
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 gperf and antlr3
|
||||||
|
run: |
|
||||||
|
brew install gperf
|
||||||
|
chmod +x ./scripts/antlr35_install.sh
|
||||||
|
./scripts/antlr35_install.sh -y -p /usr/local
|
||||||
|
|
||||||
|
- 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
|
||||||
|
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
|
||||||
|
|
||||||
|
- name: Build forked-daapd
|
||||||
|
run: |
|
||||||
|
# Without setting these env vars the build fails with "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 forked-daapd
|
||||||
|
run: sudo make install
|
27
.github/workflows/ubuntu.yml
vendored
Normal file
27
.github/workflows/ubuntu.yml
vendored
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
name: Ubuntu
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: install dependencies
|
||||||
|
run: sudo apt-get install -yq build-essential clang clang-tools git autotools-dev autoconf libtool gettext gawk gperf antlr3 libantlr3c-dev libconfuse-dev libunistring-dev libsqlite3-dev libavcodec-dev libavformat-dev libavfilter-dev libswscale-dev libavutil-dev libasound2-dev libmxml-dev libgcrypt20-dev libavahi-client-dev zlib1g-dev libevent-dev libplist-dev libsodium-dev libcurl4-openssl-dev libjson-c-dev libprotobuf-c-dev libpulse-dev libwebsockets-dev libgnutls28-dev
|
||||||
|
- name: configure
|
||||||
|
run: |
|
||||||
|
autoreconf -vi
|
||||||
|
./configure
|
||||||
|
- name: make
|
||||||
|
run: make
|
||||||
|
- name: make check
|
||||||
|
run: make check
|
||||||
|
- name: make distcheck
|
||||||
|
run: make distcheck
|
@ -25,32 +25,38 @@ usage() {
|
|||||||
echo "This script will download, build and install antlr $ANTLR_VERSION"
|
echo "This script will download, build and install antlr $ANTLR_VERSION"
|
||||||
echo " (and matching libantlrc) on your computer."
|
echo " (and matching libantlrc) on your computer."
|
||||||
echo
|
echo
|
||||||
echo "Usage: ${0##*/} -h | [ -p <prefix> ] [ <build-dir> ]"
|
echo "Usage: ${0##*/} -h | [ -p <prefix> ] [ -y ] [ <build-dir> ]"
|
||||||
echo
|
echo
|
||||||
echo "Parameters:"
|
echo "Parameters:"
|
||||||
echo " -h Show this help"
|
echo " -h Show this help"
|
||||||
echo " -p <prefix> Install to prefix (default: choose /usr or /usr/local)"
|
echo " -p <prefix> Install to prefix (default: choose /usr or /usr/local)"
|
||||||
|
echo " -y Automatic yes to prompts (run non-interactively with -p)"
|
||||||
echo " <build-dir> Build directory (default: $WORKDIR)"
|
echo " <build-dir> Build directory (default: $WORKDIR)"
|
||||||
exit 0
|
exit 0
|
||||||
}
|
}
|
||||||
|
|
||||||
GIVEN_PREFIX=
|
GIVEN_PREFIX=
|
||||||
case $1 in
|
ALWAYS_YES=
|
||||||
-h|--help) usage;;
|
while [ "$1" != "" ]; do
|
||||||
-p)
|
case $1 in
|
||||||
shift
|
-p | --prefix )
|
||||||
[ -n "$1" ] || {
|
shift
|
||||||
echo "Option -p requires a argument (try -h for usage)"
|
GIVEN_PREFIX=$1
|
||||||
|
;;
|
||||||
|
-y | --yes )
|
||||||
|
ALWAYS_YES=1
|
||||||
|
;;
|
||||||
|
-h | --help )
|
||||||
|
usage
|
||||||
|
exit
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
echo "Unrecognized option $1 (try -h for usage)"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
;;
|
||||||
GIVEN_PREFIX=$1
|
esac
|
||||||
shift
|
shift
|
||||||
;;
|
done
|
||||||
-*)
|
|
||||||
echo "Unrecognized option $1 (try -h for usage)"
|
|
||||||
exit 1
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
# override build directory? (support ~ expansion)
|
# override build directory? (support ~ expansion)
|
||||||
[ -n "$1" ] && WORKDIR=$1
|
[ -n "$1" ] && WORKDIR=$1
|
||||||
@ -75,8 +81,16 @@ is_yes() {
|
|||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ask_yn() {
|
||||||
|
if [ "$ALWAYS_YES" = "1" ]; then
|
||||||
|
yn="y"
|
||||||
|
else
|
||||||
|
read -p "$1" yn
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
prog_install() {
|
prog_install() {
|
||||||
read -p "Would you like to install into $PREFIX now? [Y/n] " yn
|
ask_yn "Would you like to install into $PREFIX now? [Y/n] "
|
||||||
if ! is_yes "$yn"; then
|
if ! is_yes "$yn"; then
|
||||||
echo "Build left ready to install from $WORKDIR"
|
echo "Build left ready to install from $WORKDIR"
|
||||||
echo "You can re-run the script (eg. as root) to install into"
|
echo "You can re-run the script (eg. as root) to install into"
|
||||||
@ -84,11 +98,10 @@ prog_install() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
if [ `id -u` -ne 0 ]; then
|
if [ `id -u` -ne 0 ]; then
|
||||||
echo "Would you like to install with sudo?"
|
ask_yn "Would you like to install with sudo? NOTE: You WILL be asked for your password! [Y/n] "
|
||||||
read -p "NOTE: You WILL be asked for your password! [Y/n] " yn
|
|
||||||
if ! is_yes "$yn"; then
|
if ! is_yes "$yn"; then
|
||||||
SUDO=
|
SUDO=
|
||||||
read -p "Continue to install as non-root user? [Y/n] " yn
|
ask_yn "Continue to install as non-root user? [Y/n] "
|
||||||
is_yes "$yn" || err "Install cancelled"
|
is_yes "$yn" || err "Install cancelled"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
@ -130,12 +143,12 @@ if [ -f "$WORKDIR/install_env" ]; then
|
|||||||
[ -n "$PREFIX" ] || err "PREFIX is missing in file 'install_env'"
|
[ -n "$PREFIX" ] || err "PREFIX is missing in file 'install_env'"
|
||||||
if [ -n "$GIVEN_PREFIX" ] && [ "$GIVEN_PREFIX" != "$PREFIX" ]; then
|
if [ -n "$GIVEN_PREFIX" ] && [ "$GIVEN_PREFIX" != "$PREFIX" ]; then
|
||||||
echo "You must rebuild to install into $GIVEN_PREFIX (current build for $PREFIX)"
|
echo "You must rebuild to install into $GIVEN_PREFIX (current build for $PREFIX)"
|
||||||
read -p "Would you like to rebuild for ${GIVEN_PREFIX}? [Y/n] " yn
|
ask_yn "Would you like to rebuild for ${GIVEN_PREFIX}? [Y/n] "
|
||||||
if is_yes "$yn"; then
|
if is_yes "$yn"; then
|
||||||
rm -f install_env
|
rm -f install_env
|
||||||
PREFIX=
|
PREFIX=
|
||||||
else
|
else
|
||||||
read -p "Would you like to install to ${PREFIX}? [Y/n] " yn
|
ask_yn "Would you like to install to ${PREFIX}? [Y/n] "
|
||||||
! is_yes "$yn" && err "Install cancelled"
|
! is_yes "$yn" && err "Install cancelled"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -147,7 +160,7 @@ if [ -f "$WORKDIR/install_env" ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$WORKDIR" ]; then
|
if [ ! -d "$WORKDIR" ]; then
|
||||||
read -p "Should the script create $WORKDIR and use it for building? [Y/n] " yn
|
ask_yn "Should the script create $WORKDIR and use it for building? [Y/n] "
|
||||||
is_yes "$yn" || exit
|
is_yes "$yn" || exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -165,7 +178,7 @@ PREFIX_JAVA=$PREFIX/share/java
|
|||||||
|
|
||||||
MACHBITS=`getconf LONG_BIT 2>/dev/null`
|
MACHBITS=`getconf LONG_BIT 2>/dev/null`
|
||||||
[ "$MACHBITS" = "64" ] && DEF_AN="[Y/n]" || DEF_AN="[y/N]"
|
[ "$MACHBITS" = "64" ] && DEF_AN="[Y/n]" || DEF_AN="[y/N]"
|
||||||
read -p "Should the script build libantlr3c for 64 bit? $DEF_AN " yn
|
ask_yn "Should the script build libantlr3c for 64 bit? $DEF_AN "
|
||||||
[ -z "$yn" -a "$MACHBITS" != "64" ] && yn=n
|
[ -z "$yn" -a "$MACHBITS" != "64" ] && yn=n
|
||||||
is_yes "$yn" && ENABLE64BIT="--enable-64bit"
|
is_yes "$yn" && ENABLE64BIT="--enable-64bit"
|
||||||
|
|
||||||
@ -211,10 +224,10 @@ antlr_download() {
|
|||||||
# retrieve the source
|
# retrieve the source
|
||||||
if [ -f "$ANTLR3_JAR" -a -f "$LIBANTLR3C_TAR" ]; then
|
if [ -f "$ANTLR3_JAR" -a -f "$LIBANTLR3C_TAR" ]; then
|
||||||
FILES_EXIST=1
|
FILES_EXIST=1
|
||||||
read -p "Files appear to already be downloaded, use them? [Y/n] " yn
|
ask_yn "Files appear to already be downloaded, use them? [Y/n] "
|
||||||
! is_yes "$yn" && antlr_download reset
|
! is_yes "$yn" && antlr_download reset
|
||||||
else
|
else
|
||||||
read -p "Should the script download and build antlr and libantlr3c? [Y/n] " yn
|
ask_yn "Should the script download and build antlr and libantlr3c? [Y/n] "
|
||||||
is_yes "$yn" || exit
|
is_yes "$yn" || exit
|
||||||
antlr_download
|
antlr_download
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user