Skip to content

Commit 8bd885a

Browse files
committed
Merge branch 'release-0.6.0'
2 parents 8922780 + 596578c commit 8bd885a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+1202
-301
lines changed

.circleci/config.yml

+56-7
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: 2
22
jobs:
33
build:
44
docker:
5-
- image: heliconwave/cplusplusdev:latest
5+
- image: heliconwave/circleci-ubuntu-18.04:latest
66
steps:
77
- checkout
88
- setup_remote_docker:
@@ -12,7 +12,7 @@ jobs:
1212
command: lsb_release -a
1313
- run:
1414
name: Build CMake Debug
15-
command: mkdir Debug && cd Debug/ && cmake -DCMAKE_BUILD_TYPE=Debug .. && cmake --build . -- -j$(nproc)
15+
command: mkdir Debug && cd Debug/ && cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -DENABLE_COMPONENT_TESTS=ON .. && cmake --build . -- -j$(nproc)
1616
- run:
1717
name: Build CMake Release
1818
command: mkdir Release && cd Release/ && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES -DENABLE_TESTS=OFF .. && cmake --build . -- -j$(nproc)
@@ -28,7 +28,41 @@ jobs:
2828
cat CPackConfig.cmake &&
2929
cpack --config CPackConfig.cmake
3030
- store_artifacts:
31-
path: /root/project/mpeg2ts-0.5.0-Linux.tar.gz
31+
path: /root/project/mpeg2ts-0.6.0-Linux.tar.gz
32+
- persist_to_workspace:
33+
root: /root/project
34+
paths:
35+
- Debug
36+
- Release
37+
build-16.04:
38+
docker:
39+
- image: heliconwave/circleci-ubuntu-16.04:latest
40+
steps:
41+
- checkout
42+
- setup_remote_docker:
43+
docker_layer_caching: true
44+
- run:
45+
name: Print Container Metadata
46+
command: lsb_release -a
47+
- run:
48+
name: Build CMake Debug
49+
command: mkdir Debug && cd Debug/ && cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON -DENABLE_COMPONENT_TESTS=OFF .. && cmake --build . -- -j$(nproc)
50+
- run:
51+
name: Build CMake Release
52+
command: mkdir Release && cd Release/ && cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=YES -DENABLE_TESTS=OFF .. && cmake --build . -- -j$(nproc)
53+
- run:
54+
name: Creating Artifacts
55+
command:
56+
cpack --version &&
57+
echo "include(\"Release/CPackConfig.cmake\")" > CPackConfig.cmake &&
58+
echo "set(CPACK_INSTALL_CMAKE_PROJECTS" >> CPackConfig.cmake &&
59+
echo " \"Debug;mpeg2ts;ALL;/\"" >> CPackConfig.cmake &&
60+
echo " \"Release;mpeg2ts;ALL;/\"" >> CPackConfig.cmake &&
61+
echo " )" >> CPackConfig.cmake &&
62+
cat CPackConfig.cmake &&
63+
cpack --config CPackConfig.cmake
64+
- store_artifacts:
65+
path: /root/project/mpeg2ts-0.6.0-Linux.tar.gz
3266
- persist_to_workspace:
3367
root: /root/project
3468
paths:
@@ -44,7 +78,18 @@ jobs:
4478
# 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)
4579
test-unit:
4680
docker:
47-
- image: heliconwave/cplusplus:latest
81+
- image: heliconwave/circleci-ubuntu-18.04:latest
82+
working_directory: ~/project
83+
steps:
84+
- checkout
85+
- attach_workspace:
86+
at: /root/project
87+
- run:
88+
name: Run CTest
89+
command: pwd && ls -ltrha && cd Debug/ && make unit-tests
90+
test-unit-16.04:
91+
docker:
92+
- image: heliconwave/circleci-ubuntu-16.04:latest
4893
working_directory: ~/project
4994
steps:
5095
- checkout
@@ -55,7 +100,7 @@ jobs:
55100
command: pwd && ls -ltrha && cd Debug/ && make unit-tests
56101
test-component:
57102
docker:
58-
- image: heliconwave/cplusplus:latest
103+
- image: heliconwave/circleci-ubuntu-18.04:latest
59104
working_directory: ~/project
60105
steps:
61106
- checkout
@@ -66,7 +111,7 @@ jobs:
66111
command: cd Debug/ && make component-tests
67112
test-benchmark:
68113
docker:
69-
- image: heliconwave/cplusplus:latest
114+
- image: heliconwave/circleci-ubuntu-18.04:latest
70115
steps:
71116
- checkout
72117
- attach_workspace:
@@ -82,17 +127,21 @@ jobs:
82127
- attach_workspace:
83128
at: /root/project
84129
- run:
85-
name: Run micro benchmark
130+
name: Run memcheck unit tests
86131
command: cd Debug/ && ctest -T memcheck
87132
workflows:
88133
version: 2
89134
build-test-and-deploy:
90135
jobs:
91136
- build
137+
- build-16.04
92138
# - build-webassembly
93139
- test-unit:
94140
requires:
95141
- build
142+
- test-unit-16.04:
143+
requires:
144+
- build-16.04
96145
- test-component:
97146
requires:
98147
- build

.devcontainer/devcontainer.json

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
// For format details, see https://aka.ms/vscode-remote/devcontainer.json or the definition README at
2+
// https://github.com/microsoft/vscode-dev-containers/tree/master/containers/ubuntu-18.04-git
3+
{
4+
"name": "Ubuntu 18.04",
5+
"image": "heliconwave/mpeg2ts-ubuntu-18.04:latest",
6+
// The optional 'runArgs' property can be used to specify additional runtime arguments.
7+
"runArgs": [
8+
// "--env LOCAL_USER_ID=${localEnv:UID}"
9+
// Uncomment the line if you will use a ptrace-based debugger like C++, Go, and Rust.
10+
// "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined",
11+
12+
// Uncomment the next line to use a non-root user. See https://aka.ms/vscode-remote/containers/non-root-user.
13+
// "-u", "docker"
14+
],
15+
16+
// Runs in the end after image setup
17+
// "postCreateCommand": "/bin/bash /usr/local/bin/entrypoint.sh",
18+
19+
// Container user VS Code should use when connecting
20+
"remoteUser": "docker",
21+
22+
// Uncomment the next line if you want to publish any ports for example
23+
// for remote debugging
24+
// "appPort": [1234],
25+
26+
// "containerEnv": {
27+
// "LOCAL_USER_ID": "${localEnv:UID}"
28+
// },
29+
30+
// Set environment variables for VS Code and sub-processes
31+
// "remoteEnv": {
32+
// "LOCAL_USER_ID": "${localEnv:UID}"
33+
// },
34+
35+
// Any *default* container specific VS Code settings
36+
// Terminal shell
37+
"settings": {
38+
"terminal.integrated.shell.linux": "/bin/bash"
39+
},
40+
41+
// An array of extension IDs that specify the extensions to
42+
// install inside the container when you first attach to it.
43+
"extensions": [
44+
"ms-vscode.cmake-tools",
45+
"twxs.cmake",
46+
"ms-vscode.cpptools",
47+
"cheshirekow.cmake-format",
48+
"austin.code-gnu-global"
49+
]
50+
}

.github/workflows/ccpp.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ jobs:
88
runs-on: ${{ matrix.os }}
99
strategy:
1010
matrix:
11-
os: [macOS-latest, windows-latest]
11+
os: [macos-10.15, windows-latest]
1212
steps:
1313
- uses: actions/checkout@v1
1414
- name: check versions
1515
run: cmake --version
1616
- name: cmake configure
17-
run : mkdir build; cd build; cmake -DENABLE_COMPONENT_TESTS=OFF ..
17+
run : mkdir build; cd build; cmake -DENABLE_TESTS=ON -DENABLE_COMPONENT_TESTS=OFF -DCMAKE_BUILD_TYPE=Debug ..
1818
- name: cmake build
19-
run: cd build/; ls; pwd; cmake --build .
19+
run: cd build/; pwd; cmake --build .
20+
- name: cmake run unit tests
21+
run: cd build/; cmake --build . --target unit-tests

.gitignore

+3-2
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838

3939
# Project specific files
4040
build/
41+
build_vscode/
4142
tests/gtests
4243
.idea/
4344

@@ -58,8 +59,8 @@ Release/
5859

5960
# 3rd-party
6061
3rd-party/nlohmann/*
61-
3rd-party/plog-1.1.4/*
62-
3rd-party/json-3.5.0/*
62+
3rd-party/plog-*/*
63+
3rd-party/json-*/*
6364
3rd-party/.json_extracted
6465
3rd-party/.plog_extracted
6566

.vscode/cmake-kits.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"cmakeSettings": {
1515
"ENABLE_TESTS": "OFF",
1616
"BUILD_SHARED_LIBS": "ON",
17-
"DCMAKE_BUILD_TYPE": "Release"
17+
"CMAKE_BUILD_TYPE": "Release"
1818
},
1919
"compilers" : {
2020
"CXX": "/usr/bin/g++-7"

3rd-party/CMakeLists.txt

+9-7
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#*******************************************************************/
2727
cmake_minimum_required(VERSION 3.0)
2828
project(3rd-party)
29-
set(PLOG_VERSION 1.1.4)
30-
set(NLOHMANN_VERSION 3.5.0)
3129

3230

3331
# Must use GNUInstallDirs to install libraries into correct
@@ -44,7 +42,7 @@ ExternalProject_Add(
4442
INSTALL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/plog-${PLOG_VERSION}
4543
CMAKE_ARGS -D CMAKE_BUILD_TYPE=Release
4644
-D CMAKE_INSTALL_PREFIX=<INSTALL_DIR>
47-
-D BUILD_SAMPLES=OFF
45+
-D PLOG_BUILD_SAMPLES=OFF
4846
)
4947

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

7072
# Download and unpack googletest at configure time
7173
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists_googletest.txt.in ${CMAKE_CURRENT_SOURCE_DIR}/googletest-download/CMakeLists.txt)
@@ -99,13 +101,13 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
99101
if (CMAKE_VERSION VERSION_LESS 2.8.11)
100102
include_directories("${gtest_SOURCE_DIR}/include")
101103
endif()
102-
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
104+
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)
103105

104106

105107
############ google benchmark
106108

107109

108-
if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
110+
if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)
109111
message("NOT using Docker! Downloading & configuring google benchmark...")
110112

111113
set(BENCHMARK_ENABLE_GTEST_TESTS OFF CACHE BOOL "Disable GTest")
@@ -147,4 +149,4 @@ if(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
147149
if (CMAKE_VERSION VERSION_LESS 2.8.11)
148150
include_directories("${gtest_SOURCE_DIR}/include")
149151
endif()
150-
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY)
152+
endif(NOT USE_DOCKER AND NOT ENABLE_WEBASSEMBLY AND ENABLE_TESTS)

3rd-party/CMakeLists_benchmark.txt.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10)
1+
cmake_minimum_required(VERSION 3.5)
22

33
project(benchmark-download NONE)
44

3rd-party/CMakeLists_googletest.txt.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.10)
1+
cmake_minimum_required(VERSION 3.5)
22

33
project(googletest-download NONE)
44

3rd-party/json-3.9.1.tar.gz

6.56 MB
Binary file not shown.

3rd-party/plog-1.1.5.tar.gz

39.5 KB
Binary file not shown.

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Releases
22

3+
*V0.6.0*
4+
* [x] Add broader support
5+
* [x] Fix emscripten with CMake
6+
* [x] Add support Ubuntu 16.04
7+
* [x] Better comments in samples
8+
* [x] Add remote container development environment
9+
* [x] Fix some suggestions
10+
* [x] Add H264 parser application
11+
* [x] Update third-party libs Plog and Json to latest version
12+
* [x] Enable CI testing for Windows and Mac
13+
314
*V0.5.0*
415
* [x] Add github workflow: Crosscompilation Mac, Windows
516
* [x] Cleanup Sample

0 commit comments

Comments
 (0)