forked from itisyang/playerdemo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
66 lines (54 loc) · 2.17 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
notifications:
email:false
language: cpp
os:
- linux
dist:
# Request Ubuntu 16 as linux
- xenial
compiler:
- gcc
# safelist
# branches:
# except:
# - gh-pages
before_install:
# Setup the repository. Qt 5.9 on linux.
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository ppa:beineri/opt-qt59-xenial -y; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt update -qq; fi
# On linux also get a newer g++. The old one won't work.
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt update -qq; fi
install:
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt install -qq qt59base; source /opt/qt59/bin/qt59-env.sh; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt install build-essential; fi
# On linux, install the new g++ version
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt install -qq g++-7; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 90; fi
# SDL2
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt install libsdl2-2.0-0 libsdl2-dev; fi
# FFmpeg
#- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt install ffmpeg; fi
#- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt install libavcodec-dev; fi
#- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt install libavdevice-dev; fi
# ubuntu上面的FFmpeg库比较老,工程中有的接口不支持
# 解决办法 1.上传相应版本的库至github,这样下载的时候回很慢 2.使用命令下载最新的FFmpeg源码编译安装,这样CI编译会很慢
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then git clone -b release/3.4 https://github.com/FFmpeg/FFmpeg.git ffmpeg-3.4; fi
script:
cd ffmpeg-3.4
./configure
sudo apt-get install yasm
make
sudo make install
ffmpeg -version
cd ..
# Run qmake and make
- cd playerdemo
- qmake
- make
before_deploy:
# Here we could package something, create zips and so on.
deploy:
# We need the compiled files
# skip_cleanup: true
# Here we can deploy. Or it could be done in the before_deploy or after_success steps.