shaka-packager/.travis.yml

64 lines
1.9 KiB
YAML

language: cpp
os:
- linux
- osx
env:
- BUILD_TYPE=Debug LIBPACKAGER_TYPE=static_library
- BUILD_TYPE=Debug LIBPACKAGER_TYPE=shared_library
- BUILD_TYPE=Release LIBPACKAGER_TYPE=static_library
- BUILD_TYPE=Release LIBPACKAGER_TYPE=shared_library
before_install:
- test -n $CC && unset CC
- test -n $CXX && unset CXX
install:
- git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git ../depot_tools/
- export PATH="$PATH:$PWD/../depot_tools"
before_script:
- mkdir src
- shopt -s extglob dotglob
- mv !(src) src
- gclient config https://github.com/google/shaka-packager.git --name=src --unmanaged
- export GYP_DEFINES="libpackager_type=${LIBPACKAGER_TYPE}"
- gclient sync
- cd src
- ninja -C out/${BUILD_TYPE} -k 100
script:
- if [ ${LIBPACKAGER_TYPE} == "shared_library" ] && [ ${TRAVIS_OS_NAME} == "osx" ]; then
export DYLD_FALLBACK_LIBRARY_PATH=./out/${BUILD_TYPE};
fi
- ( find out/${BUILD_TYPE} -name "*_*test" | while read i ; do $i || exit ; done )
- out/${BUILD_TYPE}/packager_test.py -v --libpackager_type=${LIBPACKAGER_TYPE}
before_deploy:
- rm -rf deploy
- mkdir deploy
- |
if [ ${LIBPACKAGER_TYPE} == "static_library" ] ; then
mv out/${BUILD_TYPE}/packager deploy/packager-${TRAVIS_OS_NAME}
mv out/${BUILD_TYPE}/mpd_generator deploy/mpd_generator-${TRAVIS_OS_NAME}
tar -zcf pssh-box.py.tar.gz -C out/${BUILD_TYPE} pyproto pssh-box.py
mv pssh-box.py.tar.gz deploy/pssh-box-${TRAVIS_OS_NAME}.py.tar.gz
fi
deploy:
provider: releases
api_key:
secure: Ya5ptzB+UXESFhM8YKVRGwtfksPqCEe3XxHLLCwSDRscvs9Cck6M7Y4IGbEVfvfM8Wpb7Eyt2UoYgAsrugj9K6Y103NZ/Vv2ZJrdWYIi52QTye7GFtSEgImHdlM8LOjXbbh/KroWZFCi+ZxRcFDROaXaTM+P/xvYHeopLwEWs7g=
file_glob: true
file: deploy/*
skip_cleanup: true
on:
tags: true
condition: ${BUILD_TYPE} = Release && ${LIBPACKAGER_TYPE} == static_library
branches:
only:
- master
- "/^v\\d+\\./"