Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
2dfb9dae7f
|
@ -0,0 +1 @@
|
||||||
|
open_collective: libretime
|
182
.travis.yml
182
.travis.yml
|
@ -1,122 +1,86 @@
|
||||||
dist: xenial
|
dist: xenial
|
||||||
version: ~> 1.0
|
|
||||||
language: php
|
|
||||||
php:
|
|
||||||
# the latest and greatest, has some issues that are excluded below in matrix.allow_failures
|
|
||||||
- 7.3
|
|
||||||
- 7.2
|
|
||||||
- 7.1
|
|
||||||
# the 7.0 build demonstrates that everything is basically ok for 7.0, users might want to wait for 7.1 to run it
|
|
||||||
- 7.0
|
|
||||||
# folks who prefer running on 5.x should be using 5.6 in most cases, 5.4 is no in the matrix since noone should use it
|
|
||||||
- 5.6
|
|
||||||
services:
|
services:
|
||||||
- postgresql
|
- postgresql
|
||||||
- rabbitmq
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- ENVIRONMENT=testing
|
- ENVIRONMENT=testing
|
||||||
- LIBRETIME_LOG_DIR=/tmp/log/libretime
|
- LIBRETIME_LOG_DIR=/tmp/log/libretime
|
||||||
jobs:
|
|
||||||
- PYTHON=false
|
|
||||||
- PYTHON=true
|
|
||||||
jobs:
|
|
||||||
allow_failures:
|
|
||||||
# there are currently some testing issues with DateTime precision on 7.1
|
|
||||||
- env: PYTHON=false
|
|
||||||
php: 7.1
|
|
||||||
# there are some issues with phpunit as well as some deep in zf1 on 7.2
|
|
||||||
- env: PYTHON=false
|
|
||||||
php: 7.2
|
|
||||||
# there are some issues with phpunit as well as some deep in zf1 on 7.3
|
|
||||||
- env: PYTHON=false
|
|
||||||
php: 7.3
|
|
||||||
exclude:
|
|
||||||
# we need to explicitly exclude python for every version of php other than 7.3 to make way to just run python tests in one seperate instance
|
|
||||||
- env: PYTHON=true
|
|
||||||
php: 7.2
|
|
||||||
- env: PYTHON=true
|
|
||||||
php: 7.1
|
|
||||||
- env: PYTHON=true
|
|
||||||
php: 7.0
|
|
||||||
- env: PYTHON=true
|
|
||||||
php: 5.6
|
|
||||||
- env: PYTHON=true
|
|
||||||
php: 5.4
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- silan
|
- gstreamer1.0-plugins-base
|
||||||
- libgirepository1.0-dev
|
- gstreamer1.0-plugins-good
|
||||||
- gir1.2-gstreamer-1.0
|
- gstreamer1.0-plugins-bad
|
||||||
- gstreamer1.0-plugins-base
|
- gstreamer1.0-plugins-ugly
|
||||||
- gstreamer1.0-plugins-good
|
- libgirepository1.0-dev
|
||||||
- gstreamer1.0-plugins-bad
|
- liquidsoap
|
||||||
- gstreamer1.0-plugins-ugly
|
- liquidsoap-plugin-faad
|
||||||
- libcairo2-dev
|
- liquidsoap-plugin-lame
|
||||||
- liquidsoap
|
- liquidsoap-plugin-mad
|
||||||
- liquidsoap-plugin-mad
|
- liquidsoap-plugin-vorbis
|
||||||
- liquidsoap-plugin-taglib
|
- python3-gst-1.0
|
||||||
- liquidsoap-plugin-flac
|
- silan
|
||||||
- liquidsoap-plugin-ogg
|
|
||||||
- liquidsoap-plugin-lame
|
jobs:
|
||||||
- liquidsoap-plugin-faad
|
include:
|
||||||
- liquidsoap-plugin-vorbis
|
- language: php
|
||||||
- liquidsoap-plugin-opus
|
php: 7.3
|
||||||
- python3
|
stage: test
|
||||||
- python3-nose
|
- language: php
|
||||||
- python3-gst-1.0
|
php: 7.2
|
||||||
- python3-magic
|
stage: test
|
||||||
- dos2unix
|
- language: php
|
||||||
install:
|
php: 7.1
|
||||||
- >
|
stage: test
|
||||||
if [[ "$PYTHON" == false ]]; then
|
- language: php
|
||||||
composer install
|
php: 7.0
|
||||||
fi
|
stage: test
|
||||||
- >
|
- language: php
|
||||||
if [[ "$PYTHON" == true ]]; then
|
php: 5.6
|
||||||
pyenv local 3.7
|
stage: test
|
||||||
pip3 install -U pip wheel
|
- language: python
|
||||||
# pip3 install --user mkdocs
|
python: 3.8
|
||||||
pip3 install --user rgain3
|
stage: test
|
||||||
pushd python_apps/airtime_analyzer
|
- language: python
|
||||||
python3 setup.py install --dry-run --no-init-script
|
python: 3.7
|
||||||
popd
|
stage: test
|
||||||
fi
|
- language: python
|
||||||
|
python: 3.5
|
||||||
|
stage: test
|
||||||
|
- stage: deploy
|
||||||
|
addons:
|
||||||
|
apt:
|
||||||
|
packages:
|
||||||
|
dos2unix
|
||||||
|
script:
|
||||||
|
./travis/release.sh
|
||||||
|
deploy:
|
||||||
|
- provider: releases
|
||||||
|
token: $GITHUB_TOKEN
|
||||||
|
file: build/libretime-*.tar.gz
|
||||||
|
edge: true
|
||||||
|
on:
|
||||||
|
tags: true
|
||||||
|
allow_failures:
|
||||||
|
# https://github.com/LibreTime/libretime/issues/779
|
||||||
|
- language: php
|
||||||
|
php: 7.3
|
||||||
|
- language: php
|
||||||
|
php: 7.2
|
||||||
|
- language: php
|
||||||
|
php: 7.1
|
||||||
|
# https://github.com/LibreTime/libretime/issues/1041
|
||||||
|
- language: python
|
||||||
|
python: 3.5
|
||||||
|
|
||||||
|
install: ./travis/install.sh
|
||||||
before_script:
|
before_script:
|
||||||
# prepare the database as per docs/testing.md
|
|
||||||
- psql -c 'CREATE DATABASE libretime;' -U postgres
|
- psql -c 'CREATE DATABASE libretime;' -U postgres
|
||||||
- psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" -U postgres
|
- psql -c "CREATE USER libretime WITH PASSWORD 'libretime';" -U postgres
|
||||||
- psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' -U postgres
|
- psql -c 'GRANT CONNECT ON DATABASE libretime TO libretime;' -U postgres
|
||||||
- psql -c 'ALTER USER libretime CREATEDB;' -U postgres
|
- psql -c 'ALTER USER libretime CREATEDB;' -U postgres
|
||||||
- mkdir -p /tmp/log/libretime
|
- mkdir -p /tmp/log/libretime
|
||||||
script:
|
script: ./travis/test.sh
|
||||||
- ./travis/php.sh
|
|
||||||
- ./travis/python.sh
|
|
||||||
#deploy:
|
|
||||||
#- provider: pages
|
|
||||||
# skip_cleanup: true
|
|
||||||
# local_dir: build/docs
|
|
||||||
# github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
|
|
||||||
# target_branch: master
|
|
||||||
# repo: LibreTime/LibreTime.github.io
|
|
||||||
# project_name: LibreTime
|
|
||||||
# fqdn: libretime.org
|
|
||||||
# name: R. LibreTime DocBot
|
|
||||||
# on:
|
|
||||||
# branch: master
|
|
||||||
# condition: $PYTHON = true
|
|
||||||
#- provider: script
|
|
||||||
# skip_cleanup: true
|
|
||||||
# script: ./travis/release.sh
|
|
||||||
# on:
|
|
||||||
# tags: true
|
|
||||||
# condition: $PYTHON = true
|
|
||||||
#- provider: releases
|
|
||||||
# skip_cleanup: true
|
|
||||||
# api_key: $GITHUB_TOKEN
|
|
||||||
# file_glob: true
|
|
||||||
# file: build/libretime-*.tar.gz
|
|
||||||
# on:
|
|
||||||
# tags: true
|
|
||||||
# condition: $PYTHON = true
|
|
||||||
|
|
|
@ -10,8 +10,6 @@ Vagrant.configure("2") do |config|
|
||||||
# liquidsoap input harbors for instreaming (ie. /master)
|
# liquidsoap input harbors for instreaming (ie. /master)
|
||||||
config.vm.network "forwarded_port", guest: 8001, host:8001
|
config.vm.network "forwarded_port", guest: 8001, host:8001
|
||||||
config.vm.network "forwarded_port", guest: 8002, host:8002
|
config.vm.network "forwarded_port", guest: 8002, host:8002
|
||||||
# mkdocs documentation
|
|
||||||
# config.vm.network "forwarded_port", guest: 8888, host:8888
|
|
||||||
|
|
||||||
# make sure we are using nfs (doesn't work out of the box with debian)
|
# make sure we are using nfs (doesn't work out of the box with debian)
|
||||||
nfsPath = "."
|
nfsPath = "."
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
libretime.org
|
|
@ -1,12 +1,12 @@
|
||||||
# Installing Jekyll
|
# Installing Jekyll
|
||||||
|
# This script does not work and exists as a skeleton for
|
||||||
|
# someone to use to get Jekyll building outside of GitHub
|
||||||
|
|
||||||
echo "Installing Ruby"
|
echo "Installing Ruby"
|
||||||
sudo apt-get install ruby-full build-essential zlib1g-dev
|
sudo apt-get install ruby-full build-essential zlib1g-dev
|
||||||
|
|
||||||
echo '# Install Ruby Gems to ~/gems' >> ~/.bashrc
|
export GEM_HOME=".gems"
|
||||||
echo 'export GEM_HOME="$HOME/gems"' >> ~/.bashrc
|
export PATH=".gems/bin:$PATH"
|
||||||
echo 'export PATH="$HOME/gems/bin:$PATH"' >> ~/.bashrc
|
|
||||||
source ~/.bashrc
|
|
||||||
|
|
||||||
echo "Installing Jekyll"
|
echo "Installing Jekyll"
|
||||||
cd docs
|
cd docs
|
||||||
|
@ -15,4 +15,4 @@ gem install jekyll bundler
|
||||||
# Running Jekyll
|
# Running Jekyll
|
||||||
bundle exec jekyll serve --watch --port 8888
|
bundle exec jekyll serve --watch --port 8888
|
||||||
|
|
||||||
echo "Visit http://localhost:8888 to see the LibreTime website."
|
echo "Visit http://localhost:8888 to see the LibreTime website."
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
from pathlib import Path
|
||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
import os
|
import os
|
||||||
|
@ -28,7 +29,9 @@ else:
|
||||||
|
|
||||||
|
|
||||||
def postinst():
|
def postinst():
|
||||||
if not no_init:
|
initd = Path("/etc/init.d/airtime-celery")
|
||||||
|
conf = Path("/etc/default/airtime-celery")
|
||||||
|
if not no_init and initd.is_file() and conf.is_file():
|
||||||
# Make /etc/init.d file executable and set proper
|
# Make /etc/init.d file executable and set proper
|
||||||
# permissions for the defaults config file
|
# permissions for the defaults config file
|
||||||
os.chmod("/etc/init.d/airtime-celery", 0o755)
|
os.chmod("/etc/init.d/airtime-celery", 0o755)
|
||||||
|
|
|
@ -35,9 +35,10 @@ class ListenerStat(Thread):
|
||||||
|
|
||||||
|
|
||||||
def get_stream_server_xml(self, ip, url, is_shoutcast=False):
|
def get_stream_server_xml(self, ip, url, is_shoutcast=False):
|
||||||
encoded = base64.b64encode("%(admin_user)s:%(admin_pass)s" % ip)
|
auth_string = "%(admin_user)s:%(admin_pass)s" % ip
|
||||||
|
encoded = base64.b64encode(auth_string.encode('utf-8'))
|
||||||
|
|
||||||
header = {"Authorization":"Basic %s" % encoded}
|
header = {"Authorization":"Basic %s" % encoded.decode('ascii')}
|
||||||
|
|
||||||
if is_shoutcast:
|
if is_shoutcast:
|
||||||
#user agent is required for shoutcast auth, otherwise it returns 404.
|
#user agent is required for shoutcast auth, otherwise it returns 404.
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
if [[ -n "$TRAVIS_PHP_VERSION" ]]; then
|
||||||
|
composer install
|
||||||
|
fi
|
||||||
|
if [[ -n "$TRAVIS_PYTHON_VERSION" ]]; then
|
||||||
|
pyenv local $TRAVIS_PYTHON_VERSION
|
||||||
|
pushd python_apps/airtime_analyzer
|
||||||
|
pip3 install -e .
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd python_apps/airtime-celery
|
||||||
|
pip3 install -e .
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd python_apps/api_clients
|
||||||
|
pip3 install -e .
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd python_apps/pypo
|
||||||
|
pip3 install -e .
|
||||||
|
popd
|
||||||
|
fi
|
|
@ -1,9 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
|
|
||||||
[[ "$PYTHON" == true ]] && exit 0
|
|
||||||
|
|
||||||
pushd airtime_mvc/tests
|
|
||||||
../../vendor/bin/phpunit
|
|
||||||
popd
|
|
|
@ -1,16 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
|
|
||||||
set -xe
|
|
||||||
|
|
||||||
[[ "$PYTHON" == false ]] && exit 0
|
|
||||||
|
|
||||||
pyenv local 3.7
|
|
||||||
pushd python_apps/airtime_analyzer
|
|
||||||
pip3 install -e .
|
|
||||||
nosetests
|
|
||||||
popd
|
|
||||||
|
|
||||||
pushd python_apps/api_clients
|
|
||||||
pip3 install -e .
|
|
||||||
nosetests
|
|
||||||
popd
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -xe
|
||||||
|
|
||||||
|
if [[ -n "$TRAVIS_PHP_VERSION" ]]; then
|
||||||
|
pushd airtime_mvc/tests
|
||||||
|
../../vendor/bin/phpunit
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
if [[ -n "$TRAVIS_PYTHON_VERSION" ]]; then
|
||||||
|
pyenv local $TRAVIS_PYTHON_VERSION
|
||||||
|
pushd python_apps/airtime_analyzer
|
||||||
|
nosetests
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd python_apps/api_clients
|
||||||
|
nosetests
|
||||||
|
popd
|
||||||
|
fi
|
Loading…
Reference in New Issue