Skip to content

Commit ee876d5

Browse files
committed
Update build workflow
Test taskflow library Fix .zip file lfs tracking Add more inline comments Update 3rd party libraries Move sequence related out
1 parent f0e4792 commit ee876d5

26 files changed

+42
-65
lines changed

.gitattributes

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
# In general, use LF for text
22
* text eol=lf
3-
43
# Windows CMD does not like LF in batch files
54
*.bat text eol=crlf
65
*.cmd text eol=crlf
7-
86
# Visual Studio solutions like to switch to CRLF at times
97
*.sln text eol=crlf
10-
118
# Encoding
129
*.h encoding=utf-8
1310
*.cpp encoding=utf-8
1411
*.txt encoding=utf-8
15-
1612
# Binary files
1713
*.dll binary
1814
*.exe binary
@@ -21,7 +17,7 @@
2117
*.pdf binary
2218
*.png binary
2319
*.so binary
24-
*.zip binary
25-
*.gz binary
26-
*.bz2 binary
27-
20+
*.zip filter=lfs diff=lfs merge=lfs -text
21+
*.gz filter=lfs diff=lfs merge=lfs -text
22+
*.tar.bz2 filter=lfs diff=lfs merge=lfs -text
23+
thirdparty/*.zip filter=lfs diff=lfs merge=lfs -text

.github/workflows/build.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Ubuntu/Windows CI
1+
name: Ubuntu/Windows
22

33
on:
44
push:
@@ -20,6 +20,8 @@ jobs:
2020

2121
steps:
2222
- uses: actions/checkout@v2
23+
with:
24+
lfs: true
2325

2426
- name: Configure CMake
2527
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
@@ -45,6 +47,8 @@ jobs:
4547

4648
steps:
4749
- uses: actions/checkout@v2
50+
with:
51+
lfs: true
4852

4953
- name: Configure CMake
5054
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ option(CPPBASE_BUILD_ZEROMQ "Build zeromq" ON)
2424

2525
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2626
set(CXX_STD cxx_std_17)
27-
set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
2827

2928
# Custom CMake modules/scripts
3029
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake")

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
![workflow](https://github.com/o-netusa/cppbase/actions/workflows/cmake.yml/badge.svg)
1+
![workflow](https://github.com/o-netusa/cppbase/actions/workflows/build.yml/badge.svg)
22

33
# cppbase
44
Cross-platform C++17 base library providing common features for C++ projects, such as logging, thread pool, TCP/UDP clien and server, etc. It uses CMake [DownloadProject](https://github.com/Crascit/DownloadProject) to build and integrate a set of thirdparty libraries (see thirdparty folder for details).

tests/common/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.16)
22

33
set(SOURCE
4-
main.cpp
4+
../main.cpp
55
BlockingQueueTests.cpp
66
MemoryLeaksTests.cpp
77
TimerTests.cpp

tests/logging/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.16)
22

33
set(SOURCE
4-
main.cpp
4+
../main.cpp
55
LoggingTests.cpp
66
)
77

tests/logging/main.cpp

Lines changed: 0 additions & 7 deletions
This file was deleted.
File renamed without changes.

tests/network/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.16)
22

33
set(SOURCE
4-
main.cpp
4+
../main.cpp
55
TcpTests.cpp
66
UdpTests.cpp
77
)
@@ -24,7 +24,7 @@ include(GoogleTest)
2424
gtest_discover_tests(network_test)
2525

2626
set(ZMQTESTS_SOURCE
27-
main.cpp
27+
../main.cpp
2828
ZMQTests.cpp
2929
)
3030

tests/network/main.cpp

Lines changed: 0 additions & 7 deletions
This file was deleted.

tests/serialization/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ include(CapnProto)
44
CAPNP_GENERATE_CPP(addressbookSources addressbookHeaders addressbook.capnp)
55

66
set(SOURCE
7-
main.cpp
7+
../main.cpp
88
SerializationTests.cpp
99
${addressbookSources}
1010
)

tests/serialization/main.cpp

Lines changed: 0 additions & 7 deletions
This file was deleted.

thirdparty/CMakeLists.txt

Lines changed: 24 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,24 +7,6 @@ message(STATUS "===============================")
77
message(STATUS "Thirdparty Libs (${CMAKE_BUILD_TYPE})")
88
message(STATUS "===============================")
99

10-
set(BUILD_TESTING OFF CACHE BOOL "")
11-
12-
# ============================================================
13-
# asio
14-
# ============================================================
15-
#
16-
if(CPPBASE_BUILD_ASIO)
17-
message("==> Configuring asio")
18-
download_project(
19-
PROJ asio
20-
URL ${CMAKE_CURRENT_SOURCE_DIR}/asio/asio-1.18.0.tar.gz
21-
URL_HASH MD5=a6f23c10db1d2a22c813e21f978e5049
22-
QUIET
23-
)
24-
add_library(asio INTERFACE)
25-
target_include_directories(asio INTERFACE ${asio_SOURCE_DIR}/include)
26-
endif()
27-
2810
##
2911
# For encoding/decoding and client/server communications, following options
3012
# have been considered, but no decision has been made yet:
@@ -34,21 +16,35 @@ endif()
3416
# nanopb: functionality is limited
3517
# protobuf: client/server communication is limited to http2
3618
# rpclib: inactive development
19+
#
20+
21+
# ============================================================
22+
# abseil
23+
# ============================================================
24+
#
25+
# message("==> Configuring abseil")
26+
# download_project(
27+
# PROJ abseil
28+
# URL ${CMAKE_CURRENT_SOURCE_DIR}/abseil/20210324.2.tar.gz
29+
# URL_HASH MD5=e0b585398b89ee92a10d8c68ef7eed48
30+
# QUIET
31+
# )
32+
# add_subdirectory(${abseil_SOURCE_DIR} ${abseil_BINARY_DIR})
3733

3834
# ============================================================
39-
# cxxopts
35+
# asio
4036
# ============================================================
4137
#
42-
if(CPPBASE_BUILD_CXXOPTS)
43-
message("==> Configuring cxxopts")
38+
if(CPPBASE_BUILD_ASIO)
39+
message("==> Configuring asio")
4440
download_project(
45-
PROJ cxxopts
46-
URL ${CMAKE_CURRENT_SOURCE_DIR}/cxxopts/cxxopts-2.2.1.tar.gz
47-
URL_HASH MD5=6e70da4fc17a09f32612443f1866042e
41+
PROJ asio
42+
URL ${CMAKE_CURRENT_SOURCE_DIR}/asio/asio-1.18.0.tar.gz
43+
URL_HASH MD5=a6f23c10db1d2a22c813e21f978e5049
4844
QUIET
4945
)
50-
add_library(cxxopts INTERFACE)
51-
target_include_directories(cxxopts INTERFACE ${cxxopts_SOURCE_DIR}/include)
46+
add_library(asio INTERFACE)
47+
target_include_directories(asio INTERFACE ${asio_SOURCE_DIR}/include)
5248
endif()
5349

5450
# ============================================================
@@ -67,7 +63,7 @@ add_subdirectory(${eigen_SOURCE_DIR} ${eigen_BINARY_DIR})
6763
endif()
6864

6965
# ============================================================
70-
# fmt
66+
# fmt (TODO: to be replaced by abseil String Formatting)
7167
# ============================================================
7268
#
7369
if(CPPBASE_BUILD_FMT)
@@ -95,7 +91,7 @@ set(gtest_force_shared_crt ON CACHE BOOL "" FORCED)
9591

9692
download_project(
9793
PROJ googletest
98-
URL ${CMAKE_CURRENT_SOURCE_DIR}/googletest/googletest-release-1.11.0.tar.gz
94+
URL ${CMAKE_CURRENT_SOURCE_DIR}/googletest/release-1.11.0.tar.gz
9995
URL_HASH MD5=e8a8df240b6938bb6384155d4c37d937
10096
QUIET
10197
)

thirdparty/asio/asio-1.18.0.tar.gz

-2.55 MB
Binary file not shown.
-87.5 KB
Binary file not shown.

thirdparty/eigen/eigen-3.3.9.tar.gz

-2.04 MB
Binary file not shown.

thirdparty/fmt/6.2.1.tar.gz

-716 KB
Binary file not shown.
Binary file not shown.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:b4870bf121ff7795ba20d20bcdd8627b8e088f2d1dab299a031c1034eddc93d5
3+
size 886330
-1.14 MB
Binary file not shown.

thirdparty/rapidxml/rapidxml.zip

-42.8 KB
Binary file not shown.

thirdparty/sigslot/sigslot-master.zip

-27.5 KB
Binary file not shown.

thirdparty/spdlog/v1.8.5.tar.gz

-314 KB
Binary file not shown.

thirdparty/stduuid/stduuid-1.0.tar.gz

-132 KB
Binary file not shown.
-44.9 KB
Binary file not shown.
-897 KB
Binary file not shown.

0 commit comments

Comments
 (0)