Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
4bfe9fa
added build script and conan recipe
AshFungor Apr 20, 2025
8734a1d
refactor cmake targets and setup
AshFungor Apr 20, 2025
269db7d
patched tests, removed cmake subfolder completely
AshFungor Apr 21, 2025
f6b64c0
fixing bugs for bot
AshFungor Apr 21, 2025
ecee2a7
refactored conan api calls, added ctest and patched ci
AshFungor Apr 21, 2025
3d13be4
make python tests functional
AshFungor Apr 21, 2025
fa5f546
removed test data leftovers
AshFungor Apr 22, 2025
6fb6708
update workflow
AshFungor Apr 22, 2025
e6d2f2c
merge conflicts
AshFungor Apr 22, 2025
62b2d91
testing docker autobuild
AshFungor Apr 22, 2025
6279add
fix --detect flag
AshFungor Apr 22, 2025
39feec1
add make to dockerfiles
AshFungor Apr 22, 2025
aa3156a
fix compiler ids
AshFungor Apr 22, 2025
5b2de33
added g++ where applicable
AshFungor Apr 22, 2025
d3dcc45
conflicts
AshFungor Apr 25, 2025
af7615f
added options for hpool
AshFungor Apr 26, 2025
3abd374
modified commit tags in dist
AshFungor Apr 26, 2025
a07a124
update pog
AshFungor Apr 26, 2025
656fa28
Fixed submodules and fixtures - whole project can be built successfully
HyperWinX Apr 29, 2025
ea53d62
Move pog into the project, update includes
HyperWinX Apr 29, 2025
aa009a2
Reorder all includes, move pog, add PCH
HyperWinX Apr 30, 2025
975296b
Move pog tests into the project, integrate with the build system, fix…
HyperWinX Apr 30, 2025
a583c9b
Fixed workflows
HyperWinX Apr 30, 2025
1809bcf
Rollback separate dependencies compilation step
HyperWinX Apr 30, 2025
edb54a4
Remove pog submodule
HyperWinX May 1, 2025
14e0e83
Merge pull request #1 from HyperWinX/buildsystem
AshFungor May 1, 2025
53ec633
fix flags
AshFungor May 1, 2025
5f5d24f
docker
AshFungor May 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
60 changes: 60 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Base style configuration
# Inherit all formatting rules from the LLVM style as a starting point.
BasedOnStyle: LLVM

# Indentation settings
# - IndentWidth: number of spaces per indent level.
# - TabWidth: visual width of tab characters.
# - UseTab: whether to emit real tab characters.
# - NamespaceIndentation: ident namespaces
IndentWidth: 2
TabWidth: 2
UseTab: Never
NamespaceIndentation: All

# Include directives
# - SortIncludes: controls ordering of #include statements.
# - IncludeBlocks: allow empty lines for includes.
SortIncludes: true
IncludeBlocks: Preserve

# Short constructs on single lines
# Disallow collapsing blocks, loops, cases, ifs, and functions into a single line.
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false

# Access modifiers formatting
# Shift class access specifiers (public/protected/private) relative to class indent.
AccessModifierOffset: -2

# Brace placement
# Attach opening braces to the control statement or declaration line.
BreakBeforeBraces: Attach

# Spacing around parentheses and casts
# ControlStatements: space before parens in if/for/while only.
# No extra spaces inside parentheses, angles, container literals, or square brackets.
SpaceBeforeParens: ControlStatements
SpaceAfterCStyleCast: false
SpacesInParentheses: false
SpacesInAngles: false
SpacesInContainerLiterals: false
SpacesInSquareBrackets: false
SpaceBeforeSquareBrackets: false

# Template keyword spacing
# Always place a space after the 'template' keyword.
SpaceAfterTemplateKeyword: true

# Line length
# ColumnLimit: 0 disables automatic wrapping; allows unlimited line length.
ColumnLimit: 0

# Pointer alignment
# DerivePointerAlignment: ignore inference, use PointerAlignment setting.
# PointerAlignment: align the '*' or '&' to the left with the type.
DerivePointerAlignment: false
PointerAlignment: Left
24 changes: 24 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[flake8]

### Rules ###
# F401 - module imported but unused
# F403 - ‘from module import *’ used; unable to detect undefined names
exclude =
__init__.py::F401,F403

# E124 - closing bracket does not match visual indentation
ignore =
E124


### File patterns ###
exclude =
.git,
__pycache__

filename =
*.py

### Options ###
max-line-length = 150
max-doc-length = 150
20 changes: 11 additions & 9 deletions .github/workflows/distro-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,17 @@ jobs:
- run: |
set -e
DISTRO=$( cat /etc/*-release | tr [:upper:] [:lower:] | grep -Poi '(debian|ubuntu|fedora|gentoo|alpine)' | uniq )
if [ "$DISTRO" == "gentoo" ]; then source /etc/profile; fi
if [ "$DISTRO" == "gentoo" ]; then
source /etc/profile
fi
git clone https://github.com/${{ github.event.pull_request.head.repo.full_name }}.git && cd HyperCPU
git checkout ${{ github.event.pull_request.head.sha }}
git submodule update --init --recursive
cd dist/pog && git pull origin master && cd ../..
cmake -S. -Bbuild -DHCPU_COMPILER=clang -DHCPU_LTO=ON -DHCPU_SANITIZERS=OFF -DCMAKE_BUILD_TYPE=Release
cmake --build build --target run-all-tests-github -j8
cmake --build build --target default -j8
rm -rf build
cmake -S. -Bbuild -DHCPU_COMPILER=gcc -DHCPU_LTO=ON -DHCPU_SANITIZERS=OFF -DCMAKE_BUILD_TYPE=Release
cmake --build build --target run-all-tests-github -j8
cmake --build build --target default -j8

python3 scripts/build.py -icb \
--config Release \
--config Debug \
--build-dir build \
-D CMAKE_CXX_COMPILER:STRING=g++ \
-D CMAKE_CXX_COMPILER:STRING=gcc \
--profiles-detection
1 change: 0 additions & 1 deletion .github/workflows/docker-autobuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ on:
permissions:
contents: read


jobs:
build:
runs-on: ubuntu-latest
Expand Down
31 changes: 19 additions & 12 deletions .github/workflows/run-tests-feature-branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,26 @@ jobs:

- name: Build and test with GCC on Release profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --target build-all-tests-github -j4
build/modular_testing --gtest_brief
build/integration_testing --gtest_brief
rm -rf build
python3 scripts/build.py -icb \
--config Release \
--build-dir build \
-D CMAKE_CXX_COMPILER:STRING=g++ \
-D CMAKE_C_COMPILER:STRING=gcc \
--profiles-detection
cd build/Release && ctest -V && cd ../..
python3 scripts/build.py -r --config Release --build-dir build

- name: Build and test with LLVM on Release profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=clang -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_BUILD_TYPE=Release
cmake --build build --target build-all-tests-github -j4
build/modular_testing --gtest_brief
build/integration_testing --gtest_brief

- name: Clean up
python3 scripts/build.py -icb \
--config Release \
--build-dir build \
-D CMAKE_CXX_COMPILER:STRING=clang++-19 \
-D CMAKE_C_COMPILER:STRING=clang-19 \
--profiles-detection
cd build/Release && ctest -V && cd ../..
python3 scripts/build.py -r --config Release --build-dir build

- name: Cleanup (Conan cache + leftovers in build)
run: |
rm -rf build
rm -r build/
56 changes: 36 additions & 20 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,32 +19,48 @@ jobs:

- name: Build and test with GCC on Debug profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=gcc -DCMAKE_BUILD_TYPE=Debug
cmake --build build --target build-all-tests-github -j4
build/modular_testing --gtest_brief
build/integration_testing --gtest_brief
rm -rf build
python3 scripts/build.py -icb \
--config Debug \
--build-dir build \
-D CMAKE_CXX_COMPILER:STRING=g++ \
-D CMAKE_C_COMPILER:STRING=gcc \
--profiles-detection
cd build/Debug && ctest -V && cd ../..
python3 scripts/build.py -r --config Debug --build-dir build

- name: Build and test with GCC on Release profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=gcc -DCMAKE_BUILD_TYPE=Release
cmake --build build --target build-all-tests-github -j4
build/modular_testing --gtest_brief
build/integration_testing --gtest_brief
rm -rf build
python3 scripts/build.py -icb \
--config Release \
--build-dir build \
-D CMAKE_CXX_COMPILER:STRING=g++ \
-D CMAKE_C_COMPILER:STRING=gcc \
--profiles-detection
cd build/Release && ctest -V && cd ../..
python3 scripts/build.py -r --config Release --build-dir build

- name: Build and test with LLVM on Debug profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=clang -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_BUILD_TYPE=Release
cmake --build build --target build-all-tests-github -j4
build/modular_testing --gtest_brief
build/integration_testing --gtest_brief
rm -rf build
python3 scripts/build.py -icb \
--config Debug \
--build-dir build \
-D CMAKE_CXX_COMPILER:STRING=clang++-19 \
-D CMAKE_C_COMPILER:STRING=clang-19 \
--profiles-detection
cd build/Debug && ctest -V && cd ../..
python3 scripts/build.py -r --config Debug --build-dir build

- name: Build and test with LLVM on Release profile
run: |
cmake -S. -Bbuild -DHCPU_COMPILER=clang -DCMAKE_C_COMPILER=clang-19 -DCMAKE_CXX_COMPILER=clang++-19 -DCMAKE_BUILD_TYPE=Release
cmake --build build --target build-all-tests-github -j4
build/modular_testing --gtest_brief
build/integration_testing --gtest_brief
rm -rf build
python3 scripts/build.py -icb \
--config Release \
--build-dir build \
-D CMAKE_CXX_COMPILER:STRING=clang++-19 \
-D CMAKE_C_COMPILER:STRING=clang-19 \
--profiles-detection
cd build/Release && ctest -V && cd ../..
python3 scripts/build.py -r --config Release --build-dir build

- name: Cleanup (Conan cache + leftovers in build)
run: |
rm -r build/
95 changes: 91 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,93 @@
# Build directory
build/

# Binaries
*.o
*.os
*.so
*.obj
*.bc
*.pyc
*.dblite
*.pdb
*.lib
*.config
*.creator
*.creator.user
*.files
*.includes
*.idb
*.exp

# Other stuff
*.log

# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.so.*
*.dll
*.dylib

# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*
*.qm
*.prl

# Qt unit tests
target_wrapper.*

# QtCreator
*.autosave

# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*

# QtCreator CMake
CMakeLists.txt.user*

# QtCreator 4.8< compilation database
compile_commands.json

# QtCreator local machine specific files for imported projects
*creator.user*
*_qmlcache.qrc

# Auto-generated Conan Presets
CMakeUserPresets*

# Clang language server cache
.cache

# JetBrains IDE settings
.idea

# VS Code settings
.vscode
.cache
compile_commands.json
build
dist/**

# Distribution packages
dist/*
!dist/CMakeLists.txt
21 changes: 0 additions & 21 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,27 +1,6 @@
[submodule "dist/googletest"]
path = dist/googletest
url = https://github.com/google/googletest
[submodule "dist/HBench"]
path = dist/HBench
url = https://github.com/randommfs/HBench
[submodule "dist/argparse"]
path = dist/argparse
url = https://github.com/p-ranav/argparse
[submodule "dist/pog"]
path = dist/pog
url = https://github.com/HyperWinX/HPog
[submodule "dist/eternal"]
path = dist/eternal
url = https://github.com/mapbox/eternal
[submodule "dist/HPool"]
path = dist/HPool
url = https://github.com/randommfs/HPool
[submodule "dist/benchmark"]
path = dist/benchmark
url = https://github.com/google/benchmark
[submodule "dist/libbacktrace"]
path = dist/libbacktrace
url = https://github.com/ianlancetaylor/libbacktrace
[submodule "dist/libunwind"]
path = dist/libunwind
url = https://github.com/libunwind/libunwind
Loading
Loading