-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit fc2db14
Showing
225 changed files
with
28,048 additions
and
0 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,55 @@ | ||
name: Googlebenchmark | ||
on: [push, pull_request] | ||
#on: | ||
# push: | ||
# branches: | ||
# - main | ||
|
||
jobs: | ||
benchmark: | ||
name: Performance regression check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Install boost | ||
id: install-boost | ||
run: | | ||
bash .github/workflows/scripts/install_boost.sh | ||
echo "BOOST_ROOT=${{runner.workspace}}/Loki/boost_1_84_0" >> "$GITHUB_OUTPUT" | ||
- name: Configure CMake | ||
run: cmake -DENABLE_BENCHMARKING:BOOL=TRUE -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build | ||
env: | ||
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
|
||
- name: Build | ||
working-directory: ${{runner.workspace}}/build | ||
run: export CXXFLAGS="-Werror" && cmake --build . | ||
|
||
# Run benchmark and store the output to a file | ||
- name: Run benchmark | ||
run: ${{runner.workspace}}/build/benchmarks/persistent_factory --benchmark_format=json | tee benchmark_result.json | ||
# Download previous benchmark result from cache (if exists) | ||
- name: Download previous benchmark data | ||
uses: actions/cache@v1 | ||
with: | ||
path: ./cache/benchmarks/ | ||
key: ${{ runner.os }}-benchmark | ||
# Run `github-action-benchmark` action | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
# What benchmark tool the output.txt came from | ||
tool: 'googlecpp' | ||
# Where the output from the benchmark tool is stored | ||
output-file-path: benchmark_result.json | ||
# Where the previous data file is stored | ||
external-data-json-path: ./benchmarks/cache/benchmark-data.json | ||
# Workflow will fail when an alert happens | ||
fail-on-alert: true | ||
# GitHub API token to make a commit comment | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# Enable alert commit comment | ||
comment-on-alert: true | ||
# Upload the updated cache file for the next job by actions/cache |
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,13 @@ | ||
#!/bin/bash | ||
|
||
wget --no-check-certificate 'https://archives.boost.io/release/1.84.0/source/boost_1_84_0.tar.gz' | ||
tar xf boost_1_84_0.tar.gz | ||
|
||
## We use header-only parts | ||
|
||
#cd boost_1_84_0 | ||
#./bootstrap.sh | ||
|
||
# Compile with fPIC flag | ||
#export CXXFLAGS="-fPIC" | ||
#./b2 cxxflags="$CXXFLAGS" link=static |
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,34 @@ | ||
name: Googletest Unit Tests | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Download boost | ||
id: install-boost | ||
run: | | ||
bash .github/workflows/scripts/install_boost.sh | ||
echo "BOOST_ROOT=${{runner.workspace}}/Loki/boost_1_84_0" >> "$GITHUB_OUTPUT" | ||
- name: Configure CMake | ||
run: cmake -DENABLE_TESTING:BOOL=TRUE -S $GITHUB_WORKSPACE -B ${{runner.workspace}}/build | ||
env: | ||
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} | ||
|
||
- name: Build | ||
working-directory: ${{runner.workspace}}/build | ||
run: export CXXFLAGS="-Werror" && cmake --build . | ||
|
||
- name: Test | ||
working-directory: ${{runner.workspace}}/build/tests | ||
run: GTEST_OUTPUT=xml:test-results/ GTEST_COLOR=1 ctest -V |
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 @@ | ||
# Build artefacts | ||
build | ||
|
||
# IDE files | ||
.vscode | ||
|
||
# Prerequisites | ||
*.d | ||
|
||
# Compiled Object files | ||
*.slo | ||
*.lo | ||
*.o | ||
*.obj | ||
|
||
# Precompiled Headers | ||
*.gch | ||
*.pch | ||
|
||
# Compiled Dynamic libraries | ||
*.so | ||
*.dylib | ||
*.dll | ||
|
||
# Fortran module files | ||
*.mod | ||
*.smod | ||
|
||
# Compiled Static libraries | ||
*.lai | ||
*.la | ||
*.a | ||
*.lib | ||
|
||
# Executables | ||
*.exe | ||
*.out | ||
*.app |
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,89 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
|
||
############################################################## | ||
# Language setup | ||
############################################################## | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
set(CMAKE_CXX_STANDARD_REQUIRED ON) | ||
set(CMAKE_CXX_EXTENSIONS OFF) | ||
|
||
############################################################## | ||
# Establish project | ||
############################################################## | ||
|
||
project(sketches VERSION 0.1 LANGUAGES C CXX) | ||
|
||
# Compilation flags, some configuration-specific | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -Wall -Wextra -pedantic -fPIC") | ||
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -DNDEBUG -fomit-frame-pointer") | ||
set(CMAKE_CXX_FLAGS_DEBUG "-O3 -DDEBUG") | ||
|
||
# Set a default build type if none was specified | ||
set(default_build_type "Debug") | ||
if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) | ||
message(STATUS "Setting build type to '${default_build_type}', as none was specified.") | ||
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE | ||
STRING "Choose the type of build." FORCE) | ||
endif() | ||
|
||
option(ENABLE_TESTING "Enables compilation of tests." OFF) | ||
if (ENABLE_TESTING) | ||
message("Building tests enabled.") | ||
else() | ||
message("Building tests disabled.") | ||
endif() | ||
|
||
############################################################## | ||
# CMake modules and macro files | ||
############################################################## | ||
|
||
# make cache variables for install destinations | ||
include(GNUInstallDirs) | ||
|
||
list(APPEND CMAKE_MODULE_PATH | ||
"${PROJECT_SOURCE_DIR}/cmake" | ||
) | ||
include("configure_boost") | ||
include("configure_ccache") | ||
|
||
# CCache | ||
configure_ccache() | ||
|
||
# Boost | ||
configure_boost() | ||
find_package(Boost ${BOOST_MIN_VERSION}) | ||
include_directories(${Boost_INCLUDE_DIRS}) | ||
#include_directories("${PROJECT_SOURCE_DIR}/external/flatbuffers/include") | ||
|
||
|
||
############################################################## | ||
# Add library and executable targets | ||
############################################################## | ||
|
||
# Add FlatBuffers directly to our build. This defines the `flatbuffers` target. | ||
#set(FLATBUFFERS_MAX_PARSING_DEPTH 16) | ||
#set(FLATBUFFERS_SRC_DIR "${PROJECT_SOURCE_DIR}/external/flatbuffers/") | ||
#add_subdirectory(${FLATBUFFERS_SRC_DIR} | ||
# ${CMAKE_CURRENT_BINARY_DIR}/flatbuffers-build | ||
# EXCLUDE_FROM_ALL) | ||
|
||
add_subdirectory(src) | ||
|
||
add_subdirectory(exe) | ||
|
||
add_subdirectory(examples) | ||
|
||
set(ENABLE_TESTING True) | ||
if (ENABLE_TESTING) | ||
add_subdirectory(tests) | ||
endif() | ||
|
||
set(ENABLE_BENCHMARKING True) | ||
if (ENABLE_BENCHMARKING) | ||
add_subdirectory(benchmarks) | ||
endif() | ||
|
||
########### | ||
# Install # | ||
########### |
Oops, something went wrong.