forked from shaka-project/shaka-packager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
67 lines (58 loc) · 1.98 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
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} == "shared_library" ]; then
if [ ${TRAVIS_OS_NAME} == "linux" ]; then
mv out/${BUILD_TYPE}/lib/libpackager.so deploy/libpackager-${TRAVIS_OS_NAME}.so
else
mv out/${BUILD_TYPE}/libpackager.dylib deploy/libpackager-${TRAVIS_OS_NAME}.dylib
fi
else
mv out/${BUILD_TYPE}/packager deploy/packager-${TRAVIS_OS_NAME}
mv out/${BUILD_TYPE}/mpd_generator deploy/mpd_generator-${TRAVIS_OS_NAME}
fi
deploy:
provider: releases
api_key:
secure: PbhquzRnY1BkGkM/6LmVSZjhUd8jWnj77QjxAKA8REnFhbAuzqwDYuytRmUsBFMtgatUEgTuh/1duZaIl0yXGvRZdNeGk7BgtguUy6vraWObjjNUSlQ6Njm4y/hMgaUIOhA9I2b8gokWU1PA0sDJOF/FoZaAxFpKXcW4d8Z2C0s=
file_glob: true
file: deploy/*
skip_cleanup: true
on:
tags: true
condition: ${BUILD_TYPE} = Release
branches:
only:
- master
- "/^v\\d+\\./"