Skip to content

Commit 4c2ded3

Browse files
authored
Merge pull request #18 from FreeYourSoul/sat/reimplement
Sat Reimplementation
2 parents fd9e611 + 59ec76a commit 4c2ded3

73 files changed

Lines changed: 1501 additions & 3000 deletions

Some content is hidden

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

.clang-format

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
# Generated from CLion C/C++ Code Style settings
22
BasedOnStyle: LLVM
33
AccessModifierOffset: -2
4-
AlignAfterOpenBracket: Align
4+
AlignAfterOpenBracket: DontAlign
55
AlignConsecutiveAssignments: true
66
AlignOperands: AlignAfterOperator
7-
AllowAllArgumentsOnNextLine: false
8-
AllowAllConstructorInitializersOnNextLine: true
7+
AllowAllArgumentsOnNextLine: true
8+
BreakFunctionDefinitionParameters: false
99
AllowAllParametersOfDeclarationOnNextLine: true
10-
AllowShortBlocksOnASingleLine: Always
10+
AllowShortBlocksOnASingleLine: Never
1111
AllowShortCaseLabelsOnASingleLine: true
1212
AllowShortFunctionsOnASingleLine: All
1313
AllowShortIfStatementsOnASingleLine: Never
1414
AllowShortLambdasOnASingleLine: All
1515
AllowShortLoopsOnASingleLine: false
1616
AllowShortEnumsOnASingleLine: false
17-
AlwaysBreakAfterReturnType: None
18-
AlwaysBreakTemplateDeclarations: MultiLine
17+
BreakAfterReturnType: None
18+
BreakTemplateDeclarations: MultiLine
1919
BreakBeforeBraces: Custom
2020
BraceWrapping:
2121
AfterCaseLabel: false
@@ -30,39 +30,44 @@ BraceWrapping:
3030
IndentBraces: false
3131
SplitEmptyFunction: false
3232
SplitEmptyRecord: true
33-
BinPackArguments: true
34-
BinPackParameters: false
33+
BinPackArguments: false
34+
BinPackParameters: BinPack
3535
BreakBeforeBinaryOperators: NonAssignment
3636
BreakBeforeTernaryOperators: false
37-
BreakConstructorInitializers: BeforeColon
38-
BreakInheritanceList: BeforeColon
39-
ColumnLimit: 120
37+
BreakConstructorInitializers: BeforeComma
38+
BreakInheritanceList: BeforeComma
39+
ColumnLimit: 180
4040
CompactNamespaces: false
41+
AlignConsecutiveDeclarations: false
4142
ContinuationIndentWidth: 4
42-
IndentCaseLabels: false
43+
IndentCaseLabels: true
4344
IndentPPDirectives: None
4445
IndentWidth: 4
45-
KeepEmptyLinesAtTheStartOfBlocks: true
46+
KeepEmptyLines:
47+
AtEndOfFile: false
48+
AtStartOfBlock: true
49+
AtStartOfFile: true
4650
MaxEmptyLinesToKeep: 1
4751
NamespaceIndentation: None
4852
ObjCSpaceAfterProperty: false
4953
ObjCSpaceBeforeProtocolList: true
5054
PointerAlignment: Left
5155
AlignArrayOfStructures: Left
52-
AlignEscapedNewlines: Left
53-
AlignTrailingComments: true
54-
ReflowComments: false
55-
SpaceAfterCStyleCast: false
56+
AlignEscapedNewlines: LeftWithLastLine
57+
AlignTrailingComments:
58+
Kind: Always
59+
OverEmptyLines: 2
60+
SpaceAfterCStyleCast: true
5661
SpaceAfterLogicalNot: false
5762
SpaceAfterTemplateKeyword: false
5863
SpaceBeforeAssignmentOperators: true
59-
SpaceBeforeCpp11BracedList: false
64+
SpaceBeforeCpp11BracedList: true
6065
SpaceBeforeCtorInitializerColon: true
6166
SpaceBeforeInheritanceColon: true
6267
SpaceBeforeParens: ControlStatements
6368
SpaceBeforeSquareBrackets: false
6469
SpaceBeforeRangeBasedForLoopColon: true
65-
SpaceInEmptyParentheses: false
70+
SpacesInParens: Custom
6671
SpacesBeforeTrailingComments: 1
6772
SpacesInAngles: false
6873
SpacesInCStyleCastParentheses: false
@@ -72,3 +77,14 @@ SpacesInSquareBrackets: false
7277
LambdaBodyIndentation: Signature
7378
TabWidth: 4
7479
UseTab: Never
80+
AlignConsecutiveBitFields:
81+
Enabled: false
82+
AcrossEmptyLines: true
83+
RequiresClausePosition: OwnLine
84+
RequiresExpressionIndentation: OuterScope
85+
IndentRequiresClause: false
86+
ReferenceAlignment: Pointer
87+
SortIncludes: CaseInsensitive
88+
IncludeBlocks: Preserve
89+
Language: Cpp
90+
Standard: Latest

.github/workflows/ci-linux.yml

Lines changed: 14 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,92 +1,23 @@
1-
# https://github.com/marketplace/actions/run-vcpkg#use-vcpkg-as-a-submodule-of-your-repository
2-
# https://github.com/lukka/CppCMakeVcpkgTemplate/blob/v11/.github/workflows/hosted-pure-workflow.yml
3-
name: "Build Linux"
1+
name: CI Linux Build
2+
43
on:
5-
pull_request:
64
push:
5+
branches: [ "main", "develop" ]
6+
pull_request:
7+
branches: [ "main", "develop" ]
8+
79
jobs:
810
build:
9-
name: ${{ matrix.os }}-${{ github.workflow }}
10-
runs-on: ${{ matrix.os }}
11-
12-
strategy:
13-
fail-fast: false
14-
matrix:
15-
os: [ ubuntu-latest ]
16-
include:
17-
- os: ubuntu-latest
18-
triplet: x64-linux
19-
20-
env:
21-
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
22-
VCPKG_DEFAULT_BINARY_CACHE: ${{ github.workspace }}/vcpkg/bincache
23-
VCPKG_BINARY_SOURCES: 'clear;x-gha,readwrite'
11+
runs-on: ubuntu-latest
2412

2513
steps:
26-
# Set env vars needed for vcpkg to leverage the GitHub Action cache as a storage
27-
# for Binary Caching.
28-
- uses: actions/github-script@v6
29-
with:
30-
script: |
31-
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
32-
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
33-
34-
- uses: actions/checkout@v3
35-
with:
36-
submodules: true
37-
38-
- name: "Create directory '${{ env.VCPKG_DEFAULT_BINARY_CACHE }}'"
39-
run: mkdir -p $VCPKG_DEFAULT_BINARY_CACHE
40-
shell: bash
41-
42-
# Unix specifics
43-
- name: Set up GCC / Clang tools
44-
run: |
45-
echo g++ --version && g++ --version
46-
sudo apt-get install build-essential clang clang-tools
47-
sudo apt -y install g++-12
48-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 10
49-
sudo update-alternatives --config g++
50-
echo g++ --version && g++ --version
51-
52-
- uses: lukka/get-cmake@latest
14+
- name: Checkout code
15+
uses: actions/checkout@v4
5316

54-
# Restore vcpkg from the GitHub Action cache service. Note that packages are restored by vcpkg binary caching
55-
# when it is being run afterward by CMake.
56-
- name: Restore vcpkg
57-
uses: actions/cache@v3
17+
- name: Install Nix
18+
uses: cachix/install-nix-action@v31
5819
with:
59-
path: |
60-
${{ env.VCPKG_ROOT }}
61-
!${{ env.VCPKG_ROOT }}/buildtrees
62-
!${{ env.VCPKG_ROOT }}/packages
63-
!${{ env.VCPKG_ROOT }}/downloads
64-
!${{ env.VCPKG_ROOT }}/installed
65-
# The key is composed in a way that it gets properly invalidated whenever a different version of vcpkg is being used.
66-
key: |
67-
${{ hashFiles( '.git/modules/vcpkg/HEAD' )}}
68-
69-
# Run CMake to generate Ninja project files, using the vcpkg toolchain file to resolve and install
70-
# the dependencies as specified in vcpkg.json. Note that the vcpkg toolchain is specified
71-
# in the CMakePresets.json file.
72-
# This step also runs vcpkg with Binary Caching leveraging GitHub Action cache to
73-
# store the built packages artifacts.
74-
- name: Restore from cache the dependencies and generate project files
75-
run: |
76-
cmake --preset x64-Debug-Linux
77-
78-
- name: Clang-Tidy
79-
run: |
80-
run-clang-tidy -p ${{ github.workspace }}/build/.cmake/x64-Debug-Linux -checks='-*,modernize-use-override' || echo ignore
81-
82-
- name: Clang-Format
83-
run: |
84-
find fabko -regex '.*\.\(cpp\|hpp\|cc\|cxx\)' | xargs clang-format --dry-run -style=file -i
85-
86-
- name: Build
87-
run: |
88-
cmake --build --preset x64-Debug-Linux
20+
nix_path: nixpkgs=channel:nixos-25.05
8921

90-
- name: Test
91-
run: |
92-
ctest --preset x64-Debug-Linux
22+
- name: Build project
23+
run: nix-build .nix/default.nix --no-out-link

.github/workflows/ci-macosx.yml

Lines changed: 0 additions & 79 deletions
This file was deleted.

.github/workflows/ci-windows.yml

Lines changed: 0 additions & 77 deletions
This file was deleted.
File renamed without changes.

.nix/default.nix

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
pkgs ? import <nixpkgs> {}
3+
, execute_test ? false
4+
, with_coverage ? false
5+
}:
6+
7+
let
8+
fabko = pkgs.callPackage ./fabko.nix { inherit execute_test; inherit with_coverage; };
9+
in
10+
fabko

0 commit comments

Comments
 (0)