Skip to content

Commit 8ea7449

Browse files
authored
Merge branch 'develop' into json-parsing
2 parents 09ae8f1 + 49972b2 commit 8ea7449

35 files changed

+969
-347
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ mac-builder:
4646
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
4747
- mkdir -p build; cd build;
4848
- mkdir -p install-x64/python;
49-
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/qt5/5.5/clang_64 -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPython_FRAMEWORKS=/Library/Frameworks/Python.framework/ -D"CMAKE_BUILD_TYPE:STRING=Debug" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
49+
- cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -D"CMAKE_INSTALL_PREFIX:PATH=$CI_PROJECT_DIR/build/install-x64" -DCMAKE_CXX_COMPILER=/usr/local/opt/gcc48/bin/g++-4.8 -DCMAKE_C_COMPILER=/usr/local/opt/gcc48/bin/gcc-4.8 -DCMAKE_PREFIX_PATH=/usr/local/qt5/5.5/clang_64 -DPYTHON_INCLUDE_DIR=/Library/Frameworks/Python.framework/Versions/3.6/include/python3.6m -DPYTHON_LIBRARY=/Library/Frameworks/Python.framework/Versions/3.6/lib/libpython3.6.dylib -DPython_FRAMEWORKS=/Library/Frameworks/Python.framework/ -D"CMAKE_BUILD_TYPE:STRING=Release" -D"CMAKE_OSX_SYSROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk" -D"CMAKE_OSX_DEPLOYMENT_TARGET=10.9" -D"CMAKE_INSTALL_RPATH_USE_LINK_PATH=1" -D"ENABLE_RUBY=0" ../
5050
- make
5151
- make install
5252
- mv install-x64/lib/python3.6/site-packages/*openshot* install-x64/python

.travis.yml

Lines changed: 55 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ addons:
1818
- qtmultimedia5-dev
1919
- doxygen
2020
- graphviz
21+
- curl
2122
packages: &ff_common # Common set of FFmpeg packages
2223
- *p_common
2324
- libfdk-aac-dev
@@ -32,26 +33,13 @@ addons:
3233
- libswresample-dev
3334

3435
matrix:
35-
36-
# The FFmpeg4 PPA is currently down as a protest
37-
allow_failures:
38-
- env: BUILD_VERSION=ffmpeg4
39-
4036
include:
41-
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
42-
env: BUILD_VERSION=ffmpeg2
43-
os: linux
44-
dist: xenial
45-
addons:
46-
apt:
47-
sources:
48-
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
49-
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
50-
packages:
51-
- *ff_common
5237

53-
- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
54-
env: BUILD_VERSION=ffmpeg3
38+
- name: "Coverage (Ubuntu 18.04 Bionic)"
39+
env:
40+
- BUILD_VERSION=coverage_ffmpeg3
41+
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
42+
- TEST_TARGET=coverage
5543
os: linux
5644
dist: bionic
5745
addons:
@@ -62,9 +50,14 @@ matrix:
6250
packages:
6351
- *ff_common
6452
- qt5-default
53+
- lcov
54+
- binutils-common # For c++filt
6555

6656
- name: "FFmpeg 4 GCC (Ubuntu 18.04 Bionic)"
67-
env: BUILD_VERSION=ffmpeg4
57+
env:
58+
- BUILD_VERSION=ffmpeg4
59+
- CMAKE_EXTRA_ARGS=""
60+
- TEST_TARGET=test
6861
os: linux
6962
dist: bionic
7063
addons:
@@ -76,6 +69,7 @@ matrix:
7669
packages:
7770
- *ff_common
7871
- qt5-default
72+
- libjsoncpp-dev
7973
- libavcodec58
8074
- libavformat58
8175
- libavdevice58
@@ -86,8 +80,28 @@ matrix:
8680
- libavresample4
8781
- libswresample3
8882

83+
- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
84+
env:
85+
- BUILD_VERSION=ffmpeg3
86+
- CMAKE_EXTRA_ARGS=""
87+
- TEST_TARGET=test
88+
os: linux
89+
dist: bionic
90+
addons:
91+
apt:
92+
sources:
93+
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
94+
- sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic'
95+
packages:
96+
- *ff_common
97+
- qt5-default
98+
- libjsoncpp-dev
99+
89100
- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
90-
env: BUILD_VERSION=ffmpeg3
101+
env:
102+
- BUILD_VERSION=clang_ffmpeg3
103+
- CMAKE_EXTRA_ARGS=""
104+
- TEST_TARGET=test
91105
os: linux
92106
dist: bionic
93107
compiler: clang
@@ -101,9 +115,28 @@ matrix:
101115
- qt5-default
102116
- libomp-dev
103117

118+
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
119+
env:
120+
- BUILD_VERSION=ffmpeg2
121+
- CMAKE_EXTRA_ARGS=""
122+
- TEST_TARGET="os_test"
123+
os: linux
124+
dist: xenial
125+
addons:
126+
apt:
127+
sources:
128+
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
129+
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
130+
packages:
131+
- *ff_common
132+
104133
script:
105134
- mkdir -p build; cd build;
106-
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ../
135+
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ${CMAKE_EXTRA_ARGS} ../
107136
- make VERBOSE=1
108-
- make os_test
137+
- make ${TEST_TARGET}
109138
- make install DESTDIR="$BUILD_VERSION"
139+
- cd ..
140+
141+
after_success:
142+
- if [ "x$TEST_TARGET" = "xcoverage" ]; then bash <(curl -s https://codecov.io/bash) -f build/coverage.info || echo "Codecov did not collect coverage reports"; fi

CMakeLists.txt

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ For more information, please visit <http://www.openshot.org/>.
4040
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")
4141

4242
################ PROJECT VERSION ####################
43-
set(PROJECT_VERSION_FULL "0.2.3-dev1")
44-
set(PROJECT_SO_VERSION 17)
43+
set(PROJECT_VERSION_FULL "0.2.4-dev1")
44+
set(PROJECT_SO_VERSION 18)
4545

4646
# Remove the dash and anything following, to get the #.#.# version for project()
4747
STRING(REGEX REPLACE "\-.*$" "" VERSION_NUM "${PROJECT_VERSION_FULL}")
@@ -73,7 +73,9 @@ include(FeatureSummary)
7373
# Optional build settings for libopenshot
7474
option(USE_SYSTEM_JSONCPP "Use system installed JsonCpp, if found" ON)
7575
option(DISABLE_BUNDLED_JSONCPP "Don't fall back to bundled JsonCpp" OFF)
76+
option(DISABLE_TESTS "Don't build unit tests" OFF)
7677
option(ENABLE_IWYU "Enable 'Include What You Use' scanner (CMake 3.3+)" OFF)
78+
option(ENABLE_COVERAGE "Enable coverage reporting" OFF)
7779

7880
########## Configure Version.h header ##############
7981
configure_file(include/OpenShotVersion.h.in include/OpenShotVersion.h @ONLY)
@@ -94,6 +96,22 @@ include_directories(
9496
${CMAKE_CURRENT_SOURCE_DIR}/include
9597
${CMAKE_CURRENT_BINARY_DIR}/include)
9698

99+
############## Code Coverage #########################
100+
if (DISABLE_TESTS AND ENABLE_COVERAGE)
101+
message(WARNING "ENABLE_COVERAGE requires tests, overriding DISABLE_TESTS")
102+
set(DISABLE_TESTS OFF CACHE BOOL "Don't build unit tests" FORCE)
103+
endif()
104+
105+
if (ENABLE_COVERAGE)
106+
if (NOT CMAKE_BUILD_TYPE)
107+
set(CMAKE_BUILD_TYPE "Debug")
108+
message(STATUS "Coverage enabled, setting build type to Debug")
109+
endif()
110+
include(CodeCoverage)
111+
APPEND_COVERAGE_COMPILER_FLAGS()
112+
endif()
113+
add_feature_info("Coverage" ENABLE_COVERAGE "analyze test coverage and generate report")
114+
97115
############## PROCESS src/ DIRECTORIES ##############
98116
add_subdirectory(src)
99117

@@ -121,6 +139,16 @@ if(NOT DISABLE_TESTS)
121139
add_subdirectory(tests)
122140
endif()
123141

142+
############## COVERAGE REPORTING #################
143+
if (ENABLE_COVERAGE)
144+
setup_target_for_coverage_lcov(
145+
NAME coverage
146+
LCOV_ARGS "--no-external"
147+
EXECUTABLE openshot-test
148+
DEPENDENCIES openshot-test)
149+
message("Generate coverage report with 'make coverage'")
150+
endif()
151+
124152
########### PRINT FEATURE SUMMARY ##############
125153
feature_summary(WHAT ALL
126154
INCLUDE_QUIET_PACKAGES

0 commit comments

Comments
 (0)