Skip to content

Commit

Permalink
Merge branch 'release-0.6.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
kohnech committed Apr 19, 2021
2 parents 8922780 + 596578c commit 8bd885a
Show file tree
Hide file tree
Showing 45 changed files with 1,202 additions and 301 deletions.
63 changes: 56 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: heliconwave/cplusplusdev:latest
- image: heliconwave/circleci-ubuntu-18.04:latest
steps:
- checkout
- setup_remote_docker:
Expand All @@ -12,7 +12,7 @@ jobs:
command: lsb_release -a
- run:
name: Build CMake Debug
command: mkdir Debug && cd Debug/ && cmake -DCMAKE_BUILD_TYPE=Debug .. && cmake --build . -- -j$(nproc)
command: mkdir Debug && cd Debug/ && cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -DENABLE_COMPONENT_TESTS=ON .. && cmake --build . -- -j$(nproc)
- run:
name: Build CMake Release
command: mkdir Release && cd Release/ && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES -DENABLE_TESTS=OFF .. && cmake --build . -- -j$(nproc)
Expand All @@ -28,7 +28,41 @@ jobs:
cat CPackConfig.cmake &&
cpack --config CPackConfig.cmake
- store_artifacts:
path: /root/project/mpeg2ts-0.5.0-Linux.tar.gz
path: /root/project/mpeg2ts-0.6.0-Linux.tar.gz
- persist_to_workspace:
root: /root/project
paths:
- Debug
- Release
build-16.04:
docker:
- image: heliconwave/circleci-ubuntu-16.04:latest
steps:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Print Container Metadata
command: lsb_release -a
- run:
name: Build CMake Debug
command: mkdir Debug && cd Debug/ && cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -DENABLE_COMPONENT_TESTS=OFF .. && cmake --build . -- -j$(nproc)
- run:
name: Build CMake Release
command: mkdir Release && cd Release/ && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES -DENABLE_TESTS=OFF .. && cmake --build . -- -j$(nproc)
- run:
name: Creating Artifacts
command:
cpack --version &&
echo "include(\"Release/CPackConfig.cmake\")" > CPackConfig.cmake &&
echo "set(CPACK_INSTALL_CMAKE_PROJECTS" >> CPackConfig.cmake &&
echo " \"Debug;mpeg2ts;ALL;/\"" >> CPackConfig.cmake &&
echo " \"Release;mpeg2ts;ALL;/\"" >> CPackConfig.cmake &&
echo " )" >> CPackConfig.cmake &&
cat CPackConfig.cmake &&
cpack --config CPackConfig.cmake
- store_artifacts:
path: /root/project/mpeg2ts-0.6.0-Linux.tar.gz
- persist_to_workspace:
root: /root/project
paths:
Expand All @@ -44,7 +78,18 @@ jobs:
# command: cd /root/project && em++ --version && pwd && rm -rf build/ && mkdir build && cd build/ && emcmake cmake -DCMAKE_CXX_STANDARD=11 -DENABLE_TESTS=OFF -DENABLE_WEBASSEMBLY=ON .. && cmake --build . -- -j$(nproc)
test-unit:
docker:
- image: heliconwave/cplusplus:latest
- image: heliconwave/circleci-ubuntu-18.04:latest
working_directory: ~/project
steps:
- checkout
- attach_workspace:
at: /root/project
- run:
name: Run CTest
command: pwd && ls -ltrha && cd Debug/ && make unit-tests
test-unit-16.04:
docker:
- image: heliconwave/circleci-ubuntu-16.04:latest
working_directory: ~/project
steps:
- checkout
Expand All @@ -55,7 +100,7 @@ jobs:
command: pwd && ls -ltrha && cd Debug/ && make unit-tests
test-component:
docker:
- image: heliconwave/cplusplus:latest
- image: heliconwave/circleci-ubuntu-18.04:latest
working_directory: ~/project
steps:
- checkout
Expand All @@ -66,7 +111,7 @@ jobs:
command: cd Debug/ && make component-tests
test-benchmark:
docker:
- image: heliconwave/cplusplus:latest
- image: heliconwave/circleci-ubuntu-18.04:latest
steps:
- checkout
- attach_workspace:
Expand All @@ -82,17 +127,21 @@ jobs:
- attach_workspace:
at: /root/project
- run:
name: Run micro benchmark
name: Run memcheck unit tests
command: cd Debug/ && ctest -T memcheck
workflows:
version: 2
build-test-and-deploy:
jobs:
- build
- build-16.04
# - build-webassembly
- test-unit:
requires:
- build
- test-unit-16.04:
requires:
- build-16.04
- test-component:
requires:
- build
Expand Down
50 changes: 50 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/ubuntu-18.04-git
{
"name": "Ubuntu 18.04",
"image": "heliconwave/mpeg2ts-ubuntu-18.04:latest",
// The optional 'runArgs' property can be used to specify additional runtime arguments.
"runArgs": [
// "--env LOCAL_USER_ID=${localEnv:UID}"
// Uncomment the line if you will use a ptrace-based debugger like C++, Go, and Rust.
// "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",

// Uncomment the next line to use a non-root user. See https://aka.ms/vscode-remote/containers/non-root-user.
// "-u", "docker"
],

// Runs in the end after image setup
// "postCreateCommand": "/bin/bash /usr/local/bin/entrypoint.sh",

// Container user VS Code should use when connecting
"remoteUser": "docker",

// Uncomment the next line if you want to publish any ports for example
// for remote debugging
// "appPort": [1234],

// "containerEnv": {
// "LOCAL_USER_ID": "${localEnv:UID}"
// },

// Set environment variables for VS Code and sub-processes
// "remoteEnv": {
// "LOCAL_USER_ID": "${localEnv:UID}"
// },

// Any *default* container specific VS Code settings
// Terminal shell
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},

// An array of extension IDs that specify the extensions to
// install inside the container when you first attach to it.
"extensions": [
"ms-vscode.cmake-tools",
"twxs.cmake",
"ms-vscode.cpptools",
"cheshirekow.cmake-format",
"austin.code-gnu-global"
]
}
8 changes: 5 additions & 3 deletions .github/workflows/ccpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,14 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macOS-latest, windows-latest]
os: [macos-10.15, windows-latest]
steps:
- uses: actions/checkout@v1
- name: check versions
run: cmake --version
- name: cmake configure
run : mkdir build; cd build; cmake -DENABLE_COMPONENT_TESTS=OFF ..
run : mkdir build; cd build; cmake -DENABLE_TESTS=ON -DENABLE_COMPONENT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug ..
- name: cmake build
run: cd build/; ls; pwd; cmake --build .
run: cd build/; pwd; cmake --build .
- name: cmake run unit tests
run: cd build/; cmake --build . --target unit-tests
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

# Project specific files
build/
build_vscode/
tests/gtests
.idea/

Expand All @@ -58,8 +59,8 @@ Release/

# 3rd-party
3rd-party/nlohmann/*
3rd-party/plog-1.1.4/*
3rd-party/json-3.5.0/*
3rd-party/plog-*/*
3rd-party/json-*/*
3rd-party/.json_extracted
3rd-party/.plog_extracted

Expand Down
2 changes: 1 addition & 1 deletion .vscode/cmake-kits.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"cmakeSettings": {
"ENABLE_TESTS": "OFF",
"BUILD_SHARED_LIBS": "ON",
"DCMAKE_BUILD_TYPE": "Release"
"CMAKE_BUILD_TYPE": "Release"
},
"compilers" : {
"CXX": "/usr/bin/g++-7"
Expand Down
16 changes: 9 additions & 7 deletions 3rd-party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#*******************************************************************/
cmake_minimum_required(VERSION 3.0)
project(3rd-party)
set(PLOG_VERSION 1.1.4)
set(NLOHMANN_VERSION 3.5.0)


# Must use GNUInstallDirs to install libraries into correct
Expand All @@ -44,7 +42,7 @@ ExternalProject_Add(
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/plog-${PLOG_VERSION}
CMAKE_ARGS -D CMAKE_BUILD_TYPE=Release
-D CMAKE_INSTALL_PREFIX=<INSTALL_DIR>
-D BUILD_SAMPLES=OFF
-D PLOG_BUILD_SAMPLES=OFF
)

############# nlohmann/json
Expand All @@ -64,8 +62,12 @@ ExternalProject_Add(
#-------------------------------------------------------------
# Taken from https://github.com/google/googletest/tree/master/googletest#incorporating-into-an-existing-cmake-project
#-------------------------------------------------------------
if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)
message("NOT using Docker! Downloading & configuring google test...")
if (APPLE)
set(CMAKE_CXX_STANDARD 11)
message("Setting CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD}")
endif(APPLE)

# Download and unpack googletest at configure time
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists_googletest.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/googletest-download/CMakeLists.txt)
Expand Down Expand Up @@ -99,13 +101,13 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
if (CMAKE_VERSION VERSION_LESS 2.8.11)
include_directories("${gtest_SOURCE_DIR}/include")
endif()
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)


############ google benchmark


if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)
message("NOT using Docker! Downloading & configuring google benchmark...")

set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "Disable GTest")
Expand Down Expand Up @@ -147,4 +149,4 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
if (CMAKE_VERSION VERSION_LESS 2.8.11)
include_directories("${gtest_SOURCE_DIR}/include")
endif()
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)
2 changes: 1 addition & 1 deletion 3rd-party/CMakeLists_benchmark.txt.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.5)

project(benchmark-download NONE)

Expand Down
2 changes: 1 addition & 1 deletion 3rd-party/CMakeLists_googletest.txt.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.10)
cmake_minimum_required(VERSION 3.5)

project(googletest-download NONE)

Expand Down
Binary file added 3rd-party/json-3.9.1.tar.gz
Binary file not shown.
Binary file added 3rd-party/plog-1.1.5.tar.gz
Binary file not shown.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Releases

*V0.6.0*
* [x] Add broader support
* [x] Fix emscripten with CMake
* [x] Add support Ubuntu 16.04
* [x] Better comments in samples
* [x] Add remote container development environment
* [x] Fix some suggestions
* [x] Add H264 parser application
* [x] Update third-party libs Plog and Json to latest version
* [x] Enable CI testing for Windows and Mac

*V0.5.0*
* [x] Add github workflow: Crosscompilation Mac, Windows
* [x] Cleanup Sample
Expand Down
Loading

0 comments on commit 8bd885a

Please sign in to comment.