Skip to content

Commit

Permalink
Merge branch 'develop' into json-parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
ferdnyc authored Jan 20, 2020
2 parents 09ae8f1 + 49972b2 commit 8ea7449
Show file tree
Hide file tree
Showing 35 changed files with 969 additions and 347 deletions.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ mac-builder:
- export LIBOPENSHOT_AUDIO_DIR=$CI_PROJECT_DIR/build/install-x64
- mkdir -p build; cd build;
- mkdir -p install-x64/python;
- 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" ../
- 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" ../
- make
- make install
- mv install-x64/lib/python3.6/site-packages/*openshot* install-x64/python
Expand Down
77 changes: 55 additions & 22 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ addons:
- qtmultimedia5-dev
- doxygen
- graphviz
- curl
packages: &ff_common # Common set of FFmpeg packages
- *p_common
- libfdk-aac-dev
Expand All @@ -32,26 +33,13 @@ addons:
- libswresample-dev

matrix:

# The FFmpeg4 PPA is currently down as a protest
allow_failures:
- env: BUILD_VERSION=ffmpeg4

include:
- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
env: BUILD_VERSION=ffmpeg2
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
packages:
- *ff_common

- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
env: BUILD_VERSION=ffmpeg3
- name: "Coverage (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=coverage_ffmpeg3
- CMAKE_EXTRA_ARGS="-DENABLE_COVERAGE=1"
- TEST_TARGET=coverage
os: linux
dist: bionic
addons:
Expand All @@ -62,9 +50,14 @@ matrix:
packages:
- *ff_common
- qt5-default
- lcov
- binutils-common # For c++filt

- name: "FFmpeg 4 GCC (Ubuntu 18.04 Bionic)"
env: BUILD_VERSION=ffmpeg4
env:
- BUILD_VERSION=ffmpeg4
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
os: linux
dist: bionic
addons:
Expand All @@ -76,6 +69,7 @@ matrix:
packages:
- *ff_common
- qt5-default
- libjsoncpp-dev
- libavcodec58
- libavformat58
- libavdevice58
Expand All @@ -86,8 +80,28 @@ matrix:
- libavresample4
- libswresample3

- name: "FFmpeg 3 GCC (Ubuntu 18.04 Bionic)"
env:
- BUILD_VERSION=ffmpeg3
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
os: linux
dist: bionic
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.12.3-bionic'
packages:
- *ff_common
- qt5-default
- libjsoncpp-dev

- name: "FFmpeg 3 Clang (Ubuntu 18.04 Bionic)"
env: BUILD_VERSION=ffmpeg3
env:
- BUILD_VERSION=clang_ffmpeg3
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET=test
os: linux
dist: bionic
compiler: clang
Expand All @@ -101,9 +115,28 @@ matrix:
- qt5-default
- libomp-dev

- name: "FFmpeg 2 GCC (Ubuntu 16.04 Xenial)"
env:
- BUILD_VERSION=ffmpeg2
- CMAKE_EXTRA_ARGS=""
- TEST_TARGET="os_test"
os: linux
dist: xenial
addons:
apt:
sources:
- sourceline: 'ppa:openshot.developers/libopenshot-daily'
- sourceline: 'ppa:beineri/opt-qt-5.10.0-xenial'
packages:
- *ff_common

script:
- mkdir -p build; cd build;
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ../
- cmake -DCMAKE_BUILD_TYPE:STRING="Debug" ${CMAKE_EXTRA_ARGS} ../
- make VERBOSE=1
- make os_test
- make ${TEST_TARGET}
- make install DESTDIR="$BUILD_VERSION"
- cd ..

after_success:
- 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
32 changes: 30 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@ For more information, please visit <http://www.openshot.org/>.
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/Modules")

################ PROJECT VERSION ####################
set(PROJECT_VERSION_FULL "0.2.3-dev1")
set(PROJECT_SO_VERSION 17)
set(PROJECT_VERSION_FULL "0.2.4-dev1")
set(PROJECT_SO_VERSION 18)

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

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

############## Code Coverage #########################
if (DISABLE_TESTS AND ENABLE_COVERAGE)
message(WARNING "ENABLE_COVERAGE requires tests, overriding DISABLE_TESTS")
set(DISABLE_TESTS OFF CACHE BOOL "Don't build unit tests" FORCE)
endif()

if (ENABLE_COVERAGE)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Debug")
message(STATUS "Coverage enabled, setting build type to Debug")
endif()
include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS()
endif()
add_feature_info("Coverage" ENABLE_COVERAGE "analyze test coverage and generate report")

############## PROCESS src/ DIRECTORIES ##############
add_subdirectory(src)

Expand Down Expand Up @@ -121,6 +139,16 @@ if(NOT DISABLE_TESTS)
add_subdirectory(tests)
endif()

############## COVERAGE REPORTING #################
if (ENABLE_COVERAGE)
setup_target_for_coverage_lcov(
NAME coverage
LCOV_ARGS "--no-external"
EXECUTABLE openshot-test
DEPENDENCIES openshot-test)
message("Generate coverage report with 'make coverage'")
endif()

########### PRINT FEATURE SUMMARY ##############
feature_summary(WHAT ALL
INCLUDE_QUIET_PACKAGES
Expand Down
Loading

0 comments on commit 8ea7449

Please sign in to comment.