Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tbeu committed Feb 29, 2024
0 parents commit 016378b
Show file tree
Hide file tree
Showing 12 changed files with 835 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
BasedOnStyle: Google
AlignAfterOpenBracket: 'AlwaysBreak'
AllowAllConstructorInitializersOnNextLine: 'false'
AllowAllParametersOfDeclarationOnNextLine: 'false'
AlignConsecutiveMacros: 'true'
AllowShortCaseLabelsOnASingleLine: 'true'
AllowShortFunctionsOnASingleLine: 'None'
AllowShortIfStatementsOnASingleLine: 'Never'
AllowShortLoopsOnASingleLine: 'false'
BreakBeforeBraces: Allman
BinPackArguments: 'false'
BinPackParameters: 'false'
Cpp11BracedListStyle: 'false'
ColumnLimit: 125
NamespaceIndentation: All
SpaceAfterTemplateKeyword: 'false'
SpaceBeforeCtorInitializerColon: 'true'
SpaceBeforeInheritanceColon: 'true'
SpaceBeforeParens: ControlStatements
SpaceBeforeRangeBasedForLoopColon: 'true'
SpaceInEmptyBlock: true
Standard: 'Latest'
...
6 changes: 6 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
Checks: '*,-fuchsia-*,-google-*,-zircon-*,-abseil-*,-modernize-use-trailing-return-type,-llvm-*,-llvmlibc-*'
CheckOptions: [{ key: misc-non-private-member-variables-in-classes, value: IgnoreClassesWithAllMemberVariablesBeingPublic }]
WarningsAsErrors: '*'
HeaderFilterRegex: ''
FormatStyle: none
74 changes: 74 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: "CMake build"

on:
push:
pull_request:
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
build:
name: ${{ matrix.toolchain }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toolchain:
- linux-gcc
- macos-clang
- windows-msvc
- windows-mingw
configuration:
- Debug
python-version:
- 3.11
include:
- toolchain: linux-gcc
os: ubuntu-latest
compiler: gcc
- toolchain: macos-clang
os: macos-latest
compiler: clang
- toolchain: windows-msvc
os: windows-latest
compiler: msvc
- toolchain: windows-mingw
os: windows-latest
compiler: mingw
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 5
- name: Setup python environment
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install python packages
run: |
if [ "${{ matrix.os }}" == "macos-latest" ]; then
echo "/Users/runner/Library/Python/${{ matrix.python-version }}/bin" >> $GITHUB_PATH
fi
pip install --disable-pip-version-check --user "conan>=1.62.0,<2"
- name: Configure (${{ matrix.configuration }})
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake -S . -B build
elif [ "${{ matrix.compiler }}" == "mingw" ]; then
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }} -G "MinGW Makefiles"
else
cmake -S . -B build -DCMAKE_BUILD_TYPE=${{ matrix.configuration }}
fi
- name: Build with ${{ matrix.compiler }}
run: |
if [ "${{ matrix.compiler }}" == "msvc" ]; then
cmake --build build --config ${{ matrix.configuration }}
else
cmake --build build -- -j8
fi
- name: Test
run: |
cd build && make test
Loading

0 comments on commit 016378b

Please sign in to comment.