Skip to content

Commit

Permalink
Merge pull request #3775 from smartdevicelink/release/8.0.0
Browse files Browse the repository at this point in the history
Release 8.0.0
  • Loading branch information
Jack-Byrne authored Oct 27, 2021
2 parents f43fbe0 + 0907428 commit 68f0821
Show file tree
Hide file tree
Showing 620 changed files with 10,779 additions and 10,864 deletions.
1 change: 0 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ Third party contributions are essential for making SDL great. However, we do hav

## Environment
Currently supported:
* Ubuntu Linux 16.04 with GCC 5.4.x
* Ubuntu Linux 18.04 with GCC 7.3.x
* Ubuntu Linux 20.04 with GCC 9.3.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)
Expand Down
44 changes: 44 additions & 0 deletions .github/workflows/sdl_core_github_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: SDL Core Build
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Init Submodules
run: git -C ${{ github.workspace }} submodule update --init --recursive
# Install Dependencies
- name: Apt Get Dependencies
run: sudo apt-get update && sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck python3-pip python3-setuptools && sudo apt-get install -f clang-format-8
- name: Setup CMAKE
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.3'
# Check Style
- name: Check Style
run: ${{ github.workspace }}/tools/infrastructure/check_style.sh
# Build Project
- name: Cache 3rd Party
id: core-3rd-party
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/core_3rd_party
key: ${{ runner.os }}-core-3rd-party-v3
- name: Make 3rd Party Directory
if: steps.core-3rd-party.outputs.cache-hit != 'true'
run: mkdir ${{ github.workspace }}/core_3rd_party
- name: Make Directories
run: cd ${{ github.workspace }} && cd ../ && mkdir build && cd build
- name: Set 3rd Party Path
run: echo "THIRD_PARTY_INSTALL_PREFIX=${{ github.workspace }}/core_3rd_party" >> $GITHUB_ENV
- name: Set 3rd Party ARCH Path
run: echo "THIRD_PARTY_INSTALL_PREFIX_ARCH=${{ github.workspace }}/core_3rd_party" >> $GITHUB_ENV
- name: Configure
run: cmake ../sdl_core -DBUILD_TESTS=ON -DLOGGER_NAME=BOOST
- name: Build
run: make install-3rd_party && make -j `nproc` install
- name: Set Library Path
run: echo "LD_LIBRARY_PATH=$THIRD_PARTY_INSTALL_PREFIX/lib:." >> $GITHUB_ENV
# run tests
- name: Unit Tests
run: make test
63 changes: 63 additions & 0 deletions .github/workflows/sdl_core_github_ci_coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: SDL Core Build With Coverity
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
build:
environment: Coverity
runs-on: ubuntu-20.04
steps:
- shell: bash
env:
COVERITY_SECRET: ${{ secrets.COVERITY_TOKEN }}
run: |
echo "$COVERITY_SECRET" && echo ${{ secrets.COVERITY_TOKEN }} && echo "end"
- uses: actions/checkout@v2
- name: Init Submodules
run: git -C ${{ github.workspace }} submodule update --init --recursive
# Install Dependencies
- name: Apt Get Dependencies
run: sudo apt-get update && sudo apt-get install libssl-dev libbluetooth3 libbluetooth-dev libudev-dev cmake html2text lcov git cmake automake1.11 build-essential libavahi-client-dev sqlite3 libsqlite3-dev libgtest-dev bluez-tools libpulse-dev libusb-1.0.0-dev cppcheck python3-pip python3-setuptools && sudo apt-get install -f clang-format-6.0
- name: Setup CMAKE
uses: jwlawson/[email protected]
with:
cmake-version: '3.16.3'
# Build Project
- name: Cache 3rd Party
id: core-3rd-party
uses: actions/cache@v2
with:
path: ${{ github.workspace }}/core_3rd_party
key: ${{ runner.os }}-core-3rd-party-v3
- name: Make 3rd Party Directory
if: steps.core-3rd-party.outputs.cache-hit != 'true'
run: mkdir ${{ github.workspace }}/core_3rd_party
- name: Make Directories
run: cd ${{ github.workspace }} && cd ../ && mkdir build && cd build
- name: Set 3rd Party Path
run: echo "THIRD_PARTY_INSTALL_PREFIX=${{ github.workspace }}/core_3rd_party" >> $GITHUB_ENV
- name: Set 3rd Party ARCH Path
run: echo "THIRD_PARTY_INSTALL_PREFIX_ARCH=${{ github.workspace }}/core_3rd_party" >> $GITHUB_ENV
- name: Configure
run: cmake ../sdl_core -DLOGGER_NAME=BOOST
- name: Download Coverity
env:
COVERITY_SECRET: ${{ secrets.COVERITY_TOKEN }}
run: wget https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_SECRET}&project=smartdevicelink%2Fsdl_core" -O coverity_tool.tgz
- name: unzip
run: tar zxvf coverity_tool.tgz
- name: Build
run: make install-3rd_party && ./cov-analysis-linux64-2020.09/bin/cov-build --dir cov-int make -j `nproc` install
- name: Set Library Path
run: echo "LD_LIBRARY_PATH=$THIRD_PARTY_INSTALL_PREFIX/lib:." >> $GITHUB_ENV
- name: Compress Coverity
run: tar czvf myproject.tgz cov-int
- name: Upload Coverity
env:
COVERITY_SECRET: ${{ secrets.COVERITY_TOKEN }}
run: curl --form token=${COVERITY_SECRET} --form [email protected] --form [email protected] --form version="Version" --form description="Description" https://scan.coverity.com/builds?project=smartdevicelink%2Fsdl_core

32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

41 changes: 28 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
# POSSIBILITY OF SUCH DAMAGE.

cmake_minimum_required(VERSION 2.8.11)
cmake_policy(SET CMP0054 NEW)

set (PROJECT smartDeviceLinkCore)
project (${PROJECT})
Expand All @@ -52,13 +53,18 @@ option(ENABLE_LOG "Logging feature" ON)
option(ENABLE_GCOV "gcov code coverage feature" OFF)
option(ENABLE_SANITIZE "Sanitize tool" OFF)
option(ENABLE_SECURITY "Security Ford protocol protection" ON)
option(ENABLE_HMI_PTU_DECRYPTION "Policy table update parsed by hmi" ON)
option(ENABLE_IAP2EMULATION "IAP2 emulation via tcp" OFF)
option(USE_COTIRE "Use Cotire to speed up build (currently only for commands tests)" ON)
option(USE_GOLD_LD "Use gold linker intead of GNU linker" ON)
option(USE_CCACHE "Turn on ccache usage" ON)
option(USE_DISTCC "Turn on distributed build_usage" OFF)

set(LOGGER_NAME "LOG4CXX" CACHE STRING "Logging library to use (BOOST, LOG4CXX)")
set_property(CACHE LOGGER_NAME PROPERTY STRINGS BOOST LOG4CXX)
if(LOGGER_NAME STREQUAL "")
set(LOGGER_NAME "LOG4CXX")
endif()

set (EXTENDED_POLICY "PROPRIETARY" CACHE STRING "Policy mode (PROPRIETARY, HTTP or EXTERNAL_PROPRIETARY)")
set_property(CACHE EXTENDED_POLICY PROPERTY STRINGS PROPRIETARY HTTP EXTERNAL_PROPRIETARY)
if(EXTENDED_POLICY STREQUAL "")
Expand Down Expand Up @@ -186,6 +192,12 @@ get_property(cValue CACHE ENABLE_SECURITY PROPERTY VALUE)
file(APPEND "${build_config_path}" "//${cHelpString}\n")
file(APPEND "${build_config_path}" "ENABLE_SECURITY:${cType}=${cValue}\n\n")

get_property(cHelpString CACHE LOGGER_NAME PROPERTY HELPSTRING)
get_property(cType CACHE LOGGER_NAME PROPERTY TYPE)
get_property(cValue CACHE LOGGER_NAME PROPERTY VALUE)
file(APPEND "${build_config_path}" "//${cHelpString}\n")
file(APPEND "${build_config_path}" "LOGGER_NAME:${cType}=${cValue}\n\n")

get_property(cHelpString CACHE EXTENDED_MEDIA_MODE PROPERTY HELPSTRING)
get_property(cType CACHE EXTENDED_MEDIA_MODE PROPERTY TYPE)
get_property(cValue CACHE EXTENDED_MEDIA_MODE PROPERTY VALUE)
Expand All @@ -204,12 +216,6 @@ get_property(cValue CACHE HMI PROPERTY VALUE)
file(APPEND "${build_config_path}" "//${cHelpString}\n")
file(APPEND "${build_config_path}" "HMI:${cType}=${cValue}\n\n")

get_property(cHelpString CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY HELPSTRING)
get_property(cType CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY TYPE)
get_property(cValue CACHE ENABLE_HMI_PTU_DECRYPTION PROPERTY VALUE)
file(APPEND "${build_config_path}" "//${cHelpString}\n")
file(APPEND "${build_config_path}" "ENABLE_HMI_PTU_DECRYPTION:${cType}=${cValue}\n")

get_property(cHelpString CACHE BUILD_WEBSOCKET_SERVER_SUPPORT PROPERTY HELPSTRING)
get_property(cType CACHE BUILD_WEBSOCKET_SERVER_SUPPORT PROPERTY TYPE)
get_property(cValue CACHE BUILD_WEBSOCKET_SERVER_SUPPORT PROPERTY VALUE)
Expand Down Expand Up @@ -376,6 +382,14 @@ else()
set(POLICY_MOCK_INCLUDE_PATH ${COMPONENTS_DIR}/include/test/policy/policy_regular/)
endif()

if(${LOGGER_NAME} STREQUAL "LOG4CXX")
add_definitions(-DLOG4CXX_LOGGER)
message(STATUS "Selected the apache log4cxx logging library")
else()
add_definitions(-DBOOST_LOGGER)
message(STATUS "Selected the boost logging library")
endif()

# TODO(AK): check current OS here
add_definitions(-DOS_POSIX)

Expand Down Expand Up @@ -419,10 +433,16 @@ include_directories(
add_subdirectory(./src/3rd_party EXCLUDE_FROM_ALL)

find_package(OpenSSL REQUIRED)
if(ENABLE_LOG)
if(ENABLE_LOG AND ${LOGGER_NAME} STREQUAL "LOG4CXX")
message(STATUS "Including log4cxx")
include_directories ( ${LOG4CXX_INCLUDE_DIRECTORY} )
endif()

if(ENABLE_LOG AND ${LOGGER_NAME} STREQUAL "BOOST")
message(STATUS "Including boost")
include_directories ( ${BOOST_INCLUDE_DIR} )
endif()

if(ENABLE_SECURITY)
add_definitions(-DENABLE_SECURITY)
set(SecurityManagerLibrary SecurityManager)
Expand All @@ -431,11 +451,6 @@ if(ENABLE_SECURITY)
message(STATUS "Security enabled")
endif()

if(ENABLE_HMI_PTU_DECRYPTION)
add_definitions(-DUSE_HMI_PTU_DECRYPTION)
message(STATUS "HMI PTU decription enabled")
endif()

if(ENABLE_IAP2EMULATION)
add_definitions(-DENABLE_IAP2EMULATION)
message(STATUS "IAP2 emulation enabled")
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
[![Slack Status](http://sdlslack.herokuapp.com/badge.svg)](http://slack.smartdevicelink.com)
[![Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/job/develop_weekly_coverage/badge/icon?subject=UT%20coverage%20build)](https://opensdl-jenkins.prjdmz.luxoft.com/job/develop_weekly_coverage/)
[![Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/view/Smokes/job/Develop_TCP_ATF_Smoke_P/badge/icon?subject=Smoke%20tests)](https://opensdl-jenkins.prjdmz.luxoft.com/view/Smokes/job/Develop_TCP_ATF_Smoke_P/)
[![Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/job/Develop_SDL_Checkstyle/badge/icon?subject=Coding%20style)](https://opensdl-jenkins.prjdmz.luxoft.com/job/Develop_SDL_Checkstyle/)
[![Github Actions Build Status](https://github.com/smartdevicelink/sdl_core/actions/workflows/sdl_core_github_ci.yml/badge.svg)](https://github.com/smartdevicelink/sdl_core/actions/workflows/sdl_core_github_ci.yml)
[![Jenkins Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/job/develop_weekly_coverage/badge/icon?subject=UT%20coverage%20build)](https://opensdl-jenkins.prjdmz.luxoft.com/job/develop_weekly_coverage/)
[![Jenkins Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/view/Smokes/job/Develop_TCP_ATF_Smoke_P/badge/icon?subject=Smoke%20tests)](https://opensdl-jenkins.prjdmz.luxoft.com/view/Smokes/job/Develop_TCP_ATF_Smoke_P/)
[![Jenkins Build Status](https://opensdl-jenkins.prjdmz.luxoft.com/job/Develop_SDL_Checkstyle/badge/icon?subject=Coding%20style)](https://opensdl-jenkins.prjdmz.luxoft.com/job/Develop_SDL_Checkstyle/)

# SmartDeviceLink (SDL)

Expand All @@ -19,7 +20,6 @@ Pull Requests Welcome!

## Environment
Currently supported:
* Ubuntu Linux 16.04 with GCC 5.4.x
* Ubuntu Linux 18.04 with GCC 7.5.x
* Ubuntu Linux 20.04 with GCC 9.3.x
* [C++11 standard](https://github.com/smartdevicelink/sdl_evolution/issues/132)
Expand Down
22 changes: 17 additions & 5 deletions src/3rd_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ if(FORCE_3RD_PARTY)
endif()
endif()

if(ENABLE_LOG)
if(ENABLE_LOG AND ${LOGGER_NAME} STREQUAL "LOG4CXX")
# --- libexpat
add_subdirectory(expat-2.1.0)
set(EXPAT_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX_ARCH}/lib PARENT_SCOPE)
Expand Down Expand Up @@ -186,7 +186,7 @@ find_package(PkgConfig)
pkg_check_modules(BSON libbson)
message (STATUS "bson installed in " ${BSON_LIBDIR} ", " ${BSON_INCLUDEDIR})

if ((NOT "${BSON_FOUND}") OR ("${BSON_VERSION}" VERSION_LESS "1.2.0"))
if ((NOT "${BSON_FOUND}") OR ("${BSON_VERSION}" VERSION_LESS "1.2.5"))
message (STATUS "Building bson required")
set(BSON_LIB_SOURCE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bson_c_lib CACHE INTERNAL "Sources of bson library" FORCE)
set(BSON_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX}/lib CACHE INTERNAL "Installation path of bson libraries" FORCE)
Expand Down Expand Up @@ -222,7 +222,11 @@ endif()

set(BOOST_ROOT ${3RD_PARTY_INSTALL_PREFIX})
set(Boost_NO_BOOST_CMAKE ON)
find_package(Boost 1.72.0 COMPONENTS system thread date_time filesystem regex)
set(BOOST_COMPONENTS system thread date_time filesystem regex)
if (ENABLE_LOG AND ${LOGGER_NAME} STREQUAL "BOOST")
list(APPEND BOOST_COMPONENTS log log_setup)
endif()
find_package(Boost 1.72.0 COMPONENTS ${BOOST_COMPONENTS})
if (NOT ${Boost_FOUND})
set(BOOST_LIB_SOURCE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/boost_src)
set(BOOST_LIBS_DIRECTORY ${3RD_PARTY_INSTALL_PREFIX}/lib)
Expand All @@ -234,15 +238,23 @@ if (NOT ${Boost_FOUND})
set(BOOST_INSTALL_COMMAND sudo ./b2 install)
endif()
include(ExternalProject)

set(boost_component_install_flags --with-system --with-thread --with-date_time --with-filesystem --with-regex)
set(boost_component_libraries system thread date_time filesystem regex)
if (ENABLE_LOG AND ${LOGGER_NAME} STREQUAL "BOOST")
list(APPEND boost_component_install_flags --with-log)
list(APPEND boost_component_libraries log)
endif()
string (REPLACE ";" "," boost_component_libraries_str "${boost_component_libraries}")
ExternalProject_Add(
Boost
URL https://sourceforge.net/projects/boost/files/boost/1.72.0/boost_1_72_0.tar.gz/download
URL_HASH SHA1=668c29007e5380d71fac8a39ecba6a02cb0086d5
DOWNLOAD_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
SOURCE_DIR ${BOOST_LIB_SOURCE_DIRECTORY}
CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=system,thread,date_time,filesystem,regex --prefix=${3RD_PARTY_INSTALL_PREFIX}
CONFIGURE_COMMAND ./bootstrap.sh --with-libraries=${boost_component_libraries_str} --prefix=${3RD_PARTY_INSTALL_PREFIX}
BUILD_COMMAND ./b2
INSTALL_COMMAND ${BOOST_INSTALL_COMMAND} --clean --prefix=${3RD_PARTY_INSTALL_PREFIX} && ${BOOST_INSTALL_COMMAND} --with-system --with-thread --with-date_time --with-filesystem --with-regex --prefix=${3RD_PARTY_INSTALL_PREFIX} > boost_install.log
INSTALL_COMMAND ${BOOST_INSTALL_COMMAND} --clean --prefix=${3RD_PARTY_INSTALL_PREFIX} && ${BOOST_INSTALL_COMMAND} ${boost_component_install_flags} --prefix=${3RD_PARTY_INSTALL_PREFIX} > boost_install.log
INSTALL_DIR ${3RD_PARTY_INSTALL_PREFIX}
BUILD_IN_SOURCE true
)
Expand Down
11 changes: 8 additions & 3 deletions src/appMain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if (BUILD_USB_SUPPORT)
endif()
endif()

if(ENABLE_LOG)
if(ENABLE_LOG AND ${LOGGER_NAME} STREQUAL "LOG4CXX")
list(APPEND LIBRARIES log4cxx -L${LOG4CXX_LIBS_DIRECTORY})
list(APPEND LIBRARIES apr-1 -L${APR_LIBS_DIRECTORY})
list(APPEND LIBRARIES aprutil-1 -L${APR_UTIL_LIBS_DIRECTORY})
Expand All @@ -160,7 +160,12 @@ target_link_libraries(${PROJECT} ${LIBRARIES})

add_dependencies(${PROJECT} Policy)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/build_config.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
if (${LOGGER_NAME} STREQUAL "LOG4CXX")
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/log4cxx.properties DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
else()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/boostlogconfig.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
endif()

file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/audio.8bit.wav DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/test.txt DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/smartDeviceLink.ini DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
Expand Down Expand Up @@ -217,7 +222,7 @@ endif ()
# Install rules
install(TARGETS ${PROJECT} DESTINATION bin)
install(
FILES build_config.txt log4cxx.properties audio.8bit.wav test.txt
FILES build_config.txt log4cxx.properties boostlogconfig.ini audio.8bit.wav test.txt
${CMAKE_CURRENT_BINARY_DIR}/smartDeviceLink.ini
hmi_capabilities.json sdl_preloaded_pt.json sample_policy_manager.py
${CMAKE_SOURCE_DIR}/mycert.pem ${CMAKE_SOURCE_DIR}/mykey.pem
Expand Down
Loading

0 comments on commit 68f0821

Please sign in to comment.