Skip to content

Commit fa1610a

Browse files
author
Mohamed, Belhadi
committed
Merge V2 remote-tracking branch 'cube/main'
2 parents 3bd51b3 + 4afff85 commit fa1610a

File tree

381 files changed

+146159
-10795
lines changed

Some content is hidden

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

381 files changed

+146159
-10795
lines changed

.clang-format

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
BasedOnStyle: LLVM
3+
Language: Cpp
4+
Standard: c++17
5+
6+
### Indentation
7+
IndentWidth: 4
8+
UseTab: Never
9+
AccessModifierOffset: -4
10+
IndentCaseLabels: true
11+
IndentPPDirectives: None
12+
13+
### Column limit
14+
ColumnLimit: 89
15+
16+
### Braces and blocks
17+
BreakBeforeBraces: Attach
18+
AllowShortBlocksOnASingleLine: false
19+
AllowShortIfStatementsOnASingleLine: false
20+
AllowShortLoopsOnASingleLine: false
21+
AllowShortCaseLabelsOnASingleLine: false
22+
23+
### Functions, templates, constructors
24+
AllowShortFunctionsOnASingleLine: Empty
25+
AlwaysBreakTemplateDeclarations: Yes
26+
AlwaysBreakAfterReturnType: AllDefinitions
27+
BreakConstructorInitializers: BeforeComma
28+
BreakInheritanceList: BeforeComma
29+
SpaceBeforeParens: ControlStatements
30+
SpaceAfterCStyleCast: true
31+
32+
### Pointers and references
33+
PointerAlignment: Right
34+
DerivePointerAlignment: false
35+
36+
### Includes
37+
SortIncludes: false
38+
IncludeBlocks: Preserve
39+
IncludeCategories:
40+
- Regex: '^<.*>'
41+
Priority: 1
42+
- Regex: '^<qb/.*>'
43+
Priority: 2
44+
- Regex: '^".*"'
45+
Priority: 3
46+
- Regex: '.*'
47+
Priority: 4
48+
49+
50+
### Alignments
51+
AlignConsecutiveAssignments: true
52+
AlignConsecutiveDeclarations: true
53+
AlignTrailingComments: true
54+
55+
### Comments and spacing
56+
ReflowComments: true
57+
KeepEmptyLinesAtTheStartOfBlocks: false
58+
EmptyLineBeforeAccessModifier: Always
59+
AlignEscapedNewlines: Left

.clang-tidy

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
Checks: >
2+
clang-analyzer-*,
3+
bugprone-*,
4+
performance-*,
5+
readability-*,
6+
modernize-*,
7+
misc-*,
8+
portability-*,
9+
cppcoreguidelines-*,
10+
google-*,
11+
-google-readability-braces-around-statements,
12+
-google-runtime-references,
13+
-cppcoreguidelines-avoid-magic-numbers
14+
15+
WarningsAsErrors: >
16+
clang-analyzer-*,
17+
bugprone-*,
18+
performance-*,
19+
modernize-*,
20+
cppcoreguidelines-*
21+
22+
HeaderFilterRegex: '.*'
23+
AnalyzeTemporaryDtors: true
24+
CheckOptions:
25+
- key: modernize-use-nullptr.NullMacros
26+
value: 'NULL'
27+
- key: modernize-use-override.AllowOverrideAndFinal
28+
value: '1'
29+
- key: readability-identifier-naming.VariableCase
30+
value: camelBack
31+
- key: readability-identifier-naming.ClassCase
32+
value: PascalCase
33+
- key: readability-identifier-naming.FunctionCase
34+
value: camelBack
35+
- key: readability-identifier-naming.PrivateMemberSuffix
36+
value: _
37+
- key: cppcoreguidelines-narrowing-conversions.WarnOnIntegerNarrowingConversion
38+
value: 'true'

.github/workflows/cmake.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# Github CI
2+
name: CMake on multiple platforms
3+
4+
on:
5+
push:
6+
branches: [ main, develop ]
7+
pull_request:
8+
branches: [ main ]
9+
10+
jobs:
11+
build:
12+
runs-on: ${{ matrix.os }}
13+
14+
strategy:
15+
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
16+
fail-fast: true
17+
18+
# Set up a matrix to run the following 5 configurations:
19+
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
20+
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
21+
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
22+
#
23+
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
24+
matrix:
25+
os: [ubuntu-latest, macos-latest]
26+
build_type: [Release]
27+
c_compiler: [gcc, clang, cl]
28+
include:
29+
# - os: windows-latest
30+
# c_compiler: cl
31+
# cpp_compiler: cl
32+
- os: ubuntu-latest
33+
c_compiler: gcc
34+
cpp_compiler: g++
35+
- os: ubuntu-latest
36+
c_compiler: clang
37+
cpp_compiler: clang++
38+
- os: macos-latest
39+
c_compiler: gcc
40+
cpp_compiler: g++
41+
- os: macos-latest
42+
c_compiler: clang
43+
cpp_compiler: clang++
44+
exclude:
45+
# - os: windows-latest
46+
# c_compiler: gcc
47+
# - os: windows-latest
48+
# c_compiler: clang
49+
- os: ubuntu-latest
50+
c_compiler: cl
51+
- os: macos-latest
52+
c_compiler: cl
53+
54+
steps:
55+
- uses: actions/checkout@v4
56+
with:
57+
submodules: recursive
58+
59+
- name: Install dependencies on Ubuntu
60+
if: matrix.os == 'ubuntu-latest'
61+
run: |
62+
sudo apt-get update
63+
sudo apt-get install -y libssl-dev libargon2-dev zlib1g-dev
64+
65+
- name: Install dependencies on macOS
66+
if: matrix.os == 'macos-latest'
67+
run: brew install openssl@3 argon2
68+
69+
# - name: Install dependencies on Windows
70+
# if: matrix.os == 'windows-latest'
71+
# run: choco install openssl
72+
73+
- name: Set reusable strings
74+
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
75+
id: strings
76+
shell: bash
77+
run: |
78+
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
79+
80+
- name: Configure CMake
81+
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
82+
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
83+
run: >
84+
cmake -B ${{ steps.strings.outputs.build-output-dir }}
85+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
86+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
87+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
88+
-DQB_BUILD_TEST=ON
89+
-S ${{ github.workspace }}
90+
91+
- name: Build
92+
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
93+
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}
94+
95+
- name: Test
96+
working-directory: ${{ steps.strings.outputs.build-output-dir }}
97+
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
98+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
99+
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure

.gitmodules

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[submodule "modules/googlebenchmark"]
22
path = modules/googlebenchmark
33
url = https://github.com/google/benchmark.git
4-
branch = master
4+
branch = main
55
[submodule "modules/googletest"]
66
path = modules/googletest
77
url = https://github.com/google/googletest.git
8-
branch = master
8+
branch = main

.travis.yml

Lines changed: 73 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
language: cpp
2-
sudo: false
2+
33
notifications:
44
email: false
55

@@ -15,10 +15,11 @@ cache:
1515
# packages:
1616
# - lcov
1717

18-
matrix:
18+
jobs:
1919
include:
2020
# Clang 5.0
2121
- env: COMPILER=clang++-5.0 BUILD_TYPE=Debug BUILD_COVER=OFF
22+
arch: amd64
2223
addons: &clang50
2324
apt:
2425
packages:
@@ -31,10 +32,20 @@ matrix:
3132
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
3233

3334
- env: COMPILER=clang++-5.0 BUILD_TYPE=Release BUILD_COVER=OFF
35+
arch: amd64
36+
addons: *clang50
37+
38+
- env: COMPILER=clang++-5.0 BUILD_TYPE=Debug BUILD_COVER=OFF
39+
arch: arm64
40+
addons: *clang50
41+
42+
- env: COMPILER=clang++-5.0 BUILD_TYPE=Release BUILD_COVER=OFF
43+
arch: arm64
3444
addons: *clang50
3545

3646
# Clang 6.0
3747
- env: COMPILER=clang++-6.0 BUILD_TYPE=Debug BUILD_COVER=OFF
48+
arch: amd64
3849
addons: &clang60
3950
apt:
4051
packages:
@@ -47,10 +58,20 @@ matrix:
4758
key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key'
4859

4960
- env: COMPILER=clang++-6.0 BUILD_TYPE=Release BUILD_COVER=OFF
61+
arch: amd64
62+
addons: *clang60
63+
64+
- env: COMPILER=clang++-6.0 BUILD_TYPE=Debug BUILD_COVER=OFF
65+
arch: arm64
66+
addons: *clang60
67+
68+
- env: COMPILER=clang++-6.0 BUILD_TYPE=Release BUILD_COVER=OFF
69+
arch: arm64
5070
addons: *clang60
5171

5272
# Clang 7.0
5373
- env: COMPILER=clang++-7 BUILD_TYPE=Debug BUILD_COVER=OFF
74+
arch: amd64
5475
addons: &clang70
5576
apt:
5677
packages:
@@ -61,13 +82,23 @@ matrix:
6182
- llvm-toolchain-trusty-7
6283

6384
- env: COMPILER=clang++-7 BUILD_TYPE=Release BUILD_COVER=OFF
85+
arch: amd64
86+
addons: *clang70
87+
88+
- env: COMPILER=clang++-7 BUILD_TYPE=Debug BUILD_COVER=OFF
89+
arch: arm64
90+
addons: *clang70
91+
92+
- env: COMPILER=clang++-7 BUILD_TYPE=Release BUILD_COVER=OFF
93+
arch: arm64
6494
addons: *clang70
6595

6696
##########################################################################
6797
# GCC on Linux
6898
##########################################################################
6999
# GCC 7
70-
- env: COMPILER=g++-7 BUILD_TYPE=Debug BUILD_COVER=ON
100+
- env: COMPILER=g++-7 BUILD_TYPE=Debug BUILD_COVER=OFF
101+
arch: amd64
71102
addons: &gcc7
72103
apt:
73104
packages:
@@ -79,14 +110,52 @@ matrix:
79110
- ubuntu-toolchain-r-test
80111

81112
- env: COMPILER=g++-7 BUILD_TYPE=Release BUILD_COVER=OFF
113+
arch: amd64
82114
addons: *gcc7
83115

116+
- env: COMPILER=g++-7 BUILD_TYPE=Debug BUILD_COVER=OFF
117+
arch: arm64
118+
addons: *gcc7
119+
120+
- env: COMPILER=g++-7 BUILD_TYPE=Release BUILD_COVER=OFF
121+
arch: arm64
122+
addons: *gcc7
123+
124+
# GCC 8
125+
- env: COMPILER=g++-8 BUILD_TYPE=Debug BUILD_COVER=ON
126+
arch: amd64
127+
addons: &gcc8
128+
apt:
129+
packages:
130+
- g++-8
131+
- lcov
132+
- python3-dev
133+
- gcovr
134+
sources:
135+
- ubuntu-toolchain-r-test
136+
137+
- env: COMPILER=g++-8 BUILD_TYPE=Release BUILD_COVER=OFF
138+
arch: amd64
139+
addons: *gcc8
140+
141+
- env: COMPILER=g++-8 BUILD_TYPE=Debug BUILD_COVER=OFF
142+
arch: arm64
143+
addons: *gcc8
144+
145+
- env: COMPILER=g++-8 BUILD_TYPE=Release BUILD_COVER=OFF
146+
arch: arm64
147+
addons: *gcc8
148+
149+
##########################################################################
150+
# XCODE on OSX
151+
##########################################################################
152+
# Clang 10.2
84153
- env: COMPILER=clang++ BUILD_TYPE=Release BUILD_COVER=OFF
85154
os: osx
86155
osx_image: xcode10.2
87156
brew_packages:
88157
- cmake
89-
158+
# GCC
90159
- env: COMPILER=g++ BUILD_TYPE=Release BUILD_COVER=OFF
91160
os: osx
92161
osx_image: xcode10.2

0 commit comments

Comments
 (0)