forked from Komet/MediaElch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
180 lines (163 loc) · 6.37 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
language: generic
os: linux
dist: bionic
branches:
only:
- master
services:
- docker
jobs:
include:
#----------------------------------------------------------------------------
# Check
# We run some linters and code formatters to check our code base.
#----------------------------------------------------------------------------
# Travis CI has integrated ShellCheck by default. This is faster than using
# cmake with shellcheck target because we don't need to install conan
# dependencies.
- name: "shellcheck linting"
language: shell
before_script:
- shellcheck --version
script:
- ./scripts/run_shellcheck.sh
- name: "cmake-format check"
language: python
python: '3.8'
addons: { apt: { packages: ['python3-setuptools', 'python3-pip'] } }
install:
- pip install cmake_format
before_script:
- cmake-format --version
script:
- ./scripts/run_cmake_format.sh
- git diff --diff-filter=M --color | cat
- git diff --diff-filter=M --quiet || (echo "Found unformatted CMakeLists.txt! Use cmake-format!"; exit 1)
- name: "clang-format check"
dist: focal
addons: { apt: { packages: ['clang-format-10'] } }
script:
- ./scripts/run_clang_format.sh
- git diff --diff-filter=M --color | cat
- git diff --diff-filter=M --quiet || (echo "Found unformatted C++ files! Use clang-format!"; exit 1)
- name: "cppcheck linting"
dist: focal
addons: { apt: { packages: ['cppcheck'] } }
before_script:
- cppcheck --version
script:
# Currently allow cppcheck to fail due to false positives
- ./scripts/run_cppcheck.sh || echo "Failed"
#----------------------------------------------------------------------------
# Build & Test
# Build and test our application on macOS and linux. All stages have the
# script job in common (see end of this yml).
#----------------------------------------------------------------------------
- name: "macOS build"
env: QT=qtMac CXX=clang++ CC=clang MEDIAINFO_VERSION=20.09
os: osx
osx_image: xcode12.2
addons:
homebrew:
packages:
- cmake
- qt5
- svn
- p7zip
update: true
install:
# Download MediaInfo & ZenLib
- wget --output-document MediaInfo_DLL.tar.bz2
https://mediaarea.net/download/binary/libmediainfo0/${MEDIAINFO_VERSION}/MediaInfo_DLL_${MEDIAINFO_VERSION}_Mac_i386+x86_64.tar.bz2
- tar -xvjf MediaInfo_DLL.tar.bz2
- mv MediaInfoLib/libmediainfo.0.dylib ./
# The developer folder has a typo: Developers
- mv MediaInfoLib/Develo*ers/Include/MediaInfoDLL MediaInfoDLL
- rm -rf MediaInfoLib
- rm MediaInfo_DLL.tar.bz2
- svn checkout https://github.com/MediaArea/ZenLib/trunk/Source/ZenLib
before_script:
- export PATH="/usr/local/opt/qt/bin:$PATH"
- mkdir build && cd build
- qmake --version
- qmake ../MediaElch.pro CONFIG+=release
script:
- make -j 2
after_success:
- if [[ "$TRAVIS_PULL_REQUEST" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then
${TRAVIS_BUILD_DIR}/.ci/package.sh;
fi
#----------------------------------------------------------------------------
- name: "Windows MXE Build"
os: linux
dist: bionic
before_install:
- docker pull mediaelch/mediaelch-ci-win:latest
script:
- docker run --rm --user "$(id -u "$(whoami)"):$(id -g "$(whoami)")"
-v ${TRAVIS_BUILD_DIR}:/src mediaelch/mediaelch-ci-win:latest
/bin/bash -xc "cd /src && ./.ci/win/build_windows_release.sh"
after_success:
- if [[ "$TRAVIS_PULL_REQUEST" = "false" && "${TRAVIS_BRANCH}" = "master" ]]; then
docker run --rm --user "$(id -u "$(whoami)"):$(id -g "$(whoami)")"
-v ${TRAVIS_BUILD_DIR}:/src mediaelch/mediaelch-ci-win:latest
/bin/bash -xc "cd /src && ./.ci/win/package_windows.sh";
${TRAVIS_BUILD_DIR}/.ci/win/prepare_bintray_windows.sh;
fi
#----------------------------------------------------------------------------
- name: "Ubuntu 18.04 with Qt 5.14.1 | build + tests + coverage"
os: linux
dist: bionic
services:
- xvfb
addons:
apt:
sources:
- sourceline: ppa:ubuntu-toolchain-r/test
- sourceline: ppa:beineri/opt-qt-5.14.1-bionic
packages:
- lcov
- mesa-common-dev
- libgl1-mesa-dev
- python3-setuptools
- python3-pip
- ninja-build
- libcurl4-gnutls-dev
- libmediainfo-dev
- libpulse-dev
- zlib1g-dev
- libzen-dev
# Qt dependencies
- qt514base
- qt514multimedia
- qt514declarative
- qt514quickcontrols
- qt514wayland
- qt514x11extras
- qt514serialbus
install:
- pip3 install --upgrade pip setuptools
- pip3 install --user cmake --upgrade
before_script:
- export PATH="/opt/${QT}/bin:$PATH"
- mkdir build && cd build
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=ON -DDISABLE_UPDATER=ON -GNinja
script:
- ninja
- ninja coverage
after_success:
- bash <(curl -s https://codecov.io/bash) -f coverage-filtered.info || echo "Codecov did not collect coverage reports"
#----------------------------------------------------------------------------
# Deploy
# Nightly builds are uploaded to bintray.com
#----------------------------------------------------------------------------
deploy:
- provider: bintray
skip_cleanup: true
on:
branch: master
condition: -f ${TRAVIS_BUILD_DIR}/.ci/bintray.json
user: komet
key:
secure: wvecI6fDgvq0bXenVBWzN/Xydgh2qJ9iD9EfHagVGr2EpjCtr7HulUMzeWUV/dxEzyvhMWJ5EhETLb4uAVFaLzrMIxWMvby2sOD6wsSCm+saizqmw/EUWj0GOcn99ULUi0WpjCipNqY24quf7bkhs46o9eVAOisLe7H+KiJct92aCj4Im5YAbxgUbh+bzK3a/fSVf4lTQmamx4dkx3oKe9v71SUdqO+cbuKffebBZnLO8H+jAocgsdK/SYGJtXayYTzIVJwClUOh8aTIRxsELxA8MJ/ByuDzxfCEg+33HzOe0+vgORInePkXexRSummYy5m0z1GXTwgb/Ue2Gw0iUkTRr9lBYXWc0ObEdz0traitWfuqnR2PwNeELlHL6EBTpA1Rdl4NBR1ZLEX/E0BpU0bALT8goqpFaSe2ocLd6e0iHaJ0Evs4s8uX4NsbpE9V+zJxmSFBFv5FZJXhDvah5w9FNs9GSMXwaKMZg1WRHRa94RzSmuYWfRi4DfXF3hgCxwiXW6Vp3myDdHsAumGJsCJNxF7gVVqvnpUQ9Ox4z0fKPgNELZyKlSc4lt/TjuKQ+dFr7QdgbvUl1IO+T/Uzi8jGP2wgzCgJ75qh4rtgdhiIWIhAOhJyS+prw2CAUhAnO0iwOQa9ZcYapVqsGZ+7FWzXtEdxVX3Tx0vc5DpgaM4=
file: ${TRAVIS_BUILD_DIR}/.ci/bintray.json