-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from tvercaut/master
Add simple github CI + tested two more libs
- Loading branch information
Showing
16 changed files
with
1,093 additions
and
174 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CMake | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
BUILD_TYPE: Release | ||
|
||
jobs: | ||
build: | ||
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: 'true' | ||
|
||
- name: Configure CMake | ||
# Configure CMake in a 'build' subdirectory. | ||
# `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. | ||
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type | ||
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} . | ||
|
||
- name: Build | ||
# Build your program with the given configuration | ||
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} | ||
|
||
- name: Test | ||
working-directory: ${{github.workspace}}/build | ||
# Execute tests defined by the CMake configuration. | ||
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
run: ctest -C ${{env.BUILD_TYPE}} --verbose | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,3 +42,6 @@ base64.bin | |
Makefile | ||
CTestTestfile.cmake | ||
*.vcxproj.user | ||
|
||
# Other | ||
.#* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
[submodule "libs/googletest"] | ||
path = libs/googletest | ||
url = https://github.com/google/googletest.git | ||
[submodule "libs/cppcodec"] | ||
path = libs/cppcodec | ||
url = https://github.com/tplgy/cppcodec.git | ||
|
@@ -55,3 +52,13 @@ | |
[submodule "libs/IMUtility"] | ||
path = libs/IMUtility | ||
url = https://github.com/IMProject/IMUtility.git | ||
[submodule "libs/base64-tl"] | ||
path = libs/base64-tl | ||
url = [email protected]:tobiaslocker/base64.git | ||
branch = master | ||
[submodule "libs/base64pp"] | ||
path = libs/base64pp | ||
url = [email protected]:matheusgomes28/base64pp.git | ||
[submodule "libs/base64-aklomp"] | ||
path = libs/base64-aklomp | ||
url = [email protected]:aklomp/base64.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,85 @@ | ||
CMAKE_MINIMUM_REQUIRED(VERSION 3.0) | ||
#CLANG compiler activation options | ||
SET (CMAKE_C_COMPILER "/usr/bin/clang-12") | ||
SET (CMAKE_CXX_COMPILER "/usr/bin/clang++-12") | ||
cmake_minimum_required(VERSION 3.25) | ||
project(base64-benchmark) | ||
|
||
SET(CMAKE_BUILD_TYPE Release) | ||
SET(NAME base64.bin) | ||
PROJECT(${NAME}) | ||
ENABLE_TESTING() | ||
set(CMAKE_CXX_STANDARD 20) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
|
||
# Update if necessary | ||
IF(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||
IF("${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /std:c++17") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2") | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /O2") | ||
else() | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17") | ||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3") | ||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3") | ||
endif() | ||
endif() | ||
set(CMAKE_BUILD_TYPE Release) | ||
enable_testing() | ||
|
||
# BUILD AND INCLUDE GOOGLETEST | ||
ADD_SUBDIRECTORY(libs/googletest/) | ||
INCLUDE_DIRECTORIES(libs/googletest/googletest/include) | ||
# Get googletest | ||
include(FetchContent) | ||
FetchContent_Declare( | ||
googletest | ||
GIT_REPOSITORY https://github.com/google/googletest.git | ||
GIT_TAG 750d67d809700ae8fca6d610f7b41b71aa161808 | ||
SYSTEM | ||
) | ||
# For Windows: Prevent overriding the parent project's compiler/linker settings | ||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE) | ||
FetchContent_MakeAvailable(googletest) | ||
|
||
INCLUDE_DIRECTORIES(libs) | ||
set_target_properties(gtest PROPERTIES CXX_CLANG_TIDY "") | ||
set_target_properties(gtest_main PROPERTIES CXX_CLANG_TIDY "") | ||
set_target_properties(gmock PROPERTIES CXX_CLANG_TIDY "") | ||
set_target_properties(gmock_main PROPERTIES CXX_CLANG_TIDY "") | ||
|
||
AUX_SOURCE_DIRECTORY(./src/ CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/adp-gmbh.ch CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/apache CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/arduino CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/DaedalusAlpha CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/ElegantDice CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/gnome CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/InternetSoftwareConsortium CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/JouniMalinen CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/libb64 CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/libcurl CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/LihO CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/ManuelMartinez CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/NibbleAndAHalf CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/omnifarious CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/polfosol CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/user152949 CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/wikibooks.org CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/adition CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/A.Hristov CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/tomykaria CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/stov-180947 CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/libb64/libb64/src C_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/picobase64 C_SOURCES) | ||
add_subdirectory(./libs/base64pp) | ||
add_subdirectory(./libs/base64-aklomp) | ||
|
||
AUX_SOURCE_DIRECTORY(./libs/chromium/modp_b64 CTR_SOURCES) | ||
AUX_SOURCE_DIRECTORY(./src/modp_b64_chromium CTR_SOURCES) | ||
include_directories(libs) | ||
|
||
INCLUDE_DIRECTORIES(libs/cppcodec) | ||
AUX_SOURCE_DIRECTORY(./src/cppcodec CTR_SOURCES) | ||
aux_source_directory(./src/ CTR_SOURCES) | ||
aux_source_directory(./src/adp-gmbh.ch CTR_SOURCES) | ||
aux_source_directory(./src/apache CTR_SOURCES) | ||
aux_source_directory(./src/arduino CTR_SOURCES) | ||
aux_source_directory(./src/base64pp CTR_SOURCES) | ||
aux_source_directory(./src/base64-aklomp CTR_SOURCES) | ||
aux_source_directory(./src/base64-tl CTR_SOURCES) | ||
aux_source_directory(./src/DaedalusAlpha CTR_SOURCES) | ||
aux_source_directory(./src/ElegantDice CTR_SOURCES) | ||
aux_source_directory(./src/gnome CTR_SOURCES) | ||
aux_source_directory(./src/InternetSoftwareConsortium CTR_SOURCES) | ||
aux_source_directory(./src/JouniMalinen CTR_SOURCES) | ||
aux_source_directory(./src/libb64 CTR_SOURCES) | ||
aux_source_directory(./src/libcurl CTR_SOURCES) | ||
aux_source_directory(./src/LihO CTR_SOURCES) | ||
aux_source_directory(./src/ManuelMartinez CTR_SOURCES) | ||
aux_source_directory(./src/NibbleAndAHalf CTR_SOURCES) | ||
aux_source_directory(./src/omnifarious CTR_SOURCES) | ||
aux_source_directory(./src/polfosol CTR_SOURCES) | ||
aux_source_directory(./src/user152949 CTR_SOURCES) | ||
aux_source_directory(./src/wikibooks.org CTR_SOURCES) | ||
aux_source_directory(./src/adition CTR_SOURCES) | ||
aux_source_directory(./src/A.Hristov CTR_SOURCES) | ||
aux_source_directory(./src/tomykaria CTR_SOURCES) | ||
aux_source_directory(./src/stov-180947 CTR_SOURCES) | ||
aux_source_directory(./src/libb64/libb64/src C_SOURCES) | ||
aux_source_directory(./src/picobase64 CTR_SOURCES) | ||
|
||
INCLUDE_DIRECTORIES(libs/boost/utility/include) | ||
INCLUDE_DIRECTORIES(libs/boost/serialization/include) | ||
INCLUDE_DIRECTORIES(libs/boost/config/include) | ||
INCLUDE_DIRECTORIES(libs/boost/detail/include) | ||
INCLUDE_DIRECTORIES(libs/boost/preprocessor/include) | ||
INCLUDE_DIRECTORIES(libs/boost/core/include) | ||
INCLUDE_DIRECTORIES(libs/boost/type_traits/include) | ||
INCLUDE_DIRECTORIES(libs/boost/iterator/include) | ||
INCLUDE_DIRECTORIES(libs/boost/mpl/include) | ||
INCLUDE_DIRECTORIES(libs/boost/static_assert/include) | ||
INCLUDE_DIRECTORIES(libs/boost/assert/include) | ||
AUX_SOURCE_DIRECTORY(./src/boost CTR_SOURCES) | ||
aux_source_directory(./libs/chromium/modp_b64 CTR_SOURCES) | ||
aux_source_directory(./src/modp_b64_chromium CTR_SOURCES) | ||
|
||
SET_SOURCE_FILES_PROPERTIES( ${CTR_SOURCES} PROPERTIES LANGUAGE CXX ) | ||
SET_SOURCE_FILES_PROPERTIES( ${C_SOURCES} PROPERTIES LANGUAGE C ) | ||
include_directories(libs/cppcodec) | ||
aux_source_directory(./src/cppcodec CTR_SOURCES) | ||
|
||
ADD_EXECUTABLE(${NAME} ${CTR_SOURCES} ${C_SOURCES}) | ||
IF(UNIX AND (NOT APPLE)) | ||
TARGET_LINK_LIBRARIES(${NAME} gtest pthread stdc++fs) | ||
else() | ||
TARGET_LINK_LIBRARIES(${NAME} gtest pthread) | ||
endif() | ||
include_directories(libs/boost/utility/include) | ||
include_directories(libs/boost/serialization/include) | ||
include_directories(libs/boost/config/include) | ||
include_directories(libs/boost/detail/include) | ||
include_directories(libs/boost/preprocessor/include) | ||
include_directories(libs/boost/core/include) | ||
include_directories(libs/boost/type_traits/include) | ||
include_directories(libs/boost/iterator/include) | ||
include_directories(libs/boost/mpl/include) | ||
include_directories(libs/boost/static_assert/include) | ||
include_directories(libs/boost/assert/include) | ||
aux_source_directory(./src/boost CTR_SOURCES) | ||
|
||
set_source_files_properties( ${CTR_SOURCES} PROPERTIES LANGUAGE CXX ) | ||
set_source_files_properties( ${C_SOURCES} PROPERTIES LANGUAGE C ) | ||
|
||
add_executable(${PROJECT_NAME} ${CTR_SOURCES} ${C_SOURCES}) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE GTest::gtest GTest::gtest_main base64pp base64) | ||
|
||
add_test(NAME ${PROJECT_NAME} COMMAND ${PROJECT_NAME}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule base64-aklomp
added at
b20a31
Submodule googletest
deleted from
c9461a
Oops, something went wrong.