Skip to content

Commit

Permalink
Switch to new libpotassco.
Browse files Browse the repository at this point in the history
* Enable C++20 for all code.
* Modernize code base.
* Simplify enum interface.
* Switch to clang-format based code formatting.
* Switch to "not" instead of operator!
* Switch to external catch2.
* Switch to pragma once.
* Use span instead of iterator pairs.
* Adjust URLs.
  • Loading branch information
BenKaufmann committed Feb 14, 2025
1 parent 94460c4 commit f29889d
Show file tree
Hide file tree
Showing 117 changed files with 51,728 additions and 66,173 deletions.
37 changes: 37 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
BasedOnStyle: LLVM
AccessModifierOffset: -4
AlignConsecutiveAssignments:
Enabled: true
AlignCompound: true
AlignConsecutiveBitFields:
Enabled: true
AlignConsecutiveDeclarations:
Enabled: true
AlignConsecutiveMacros:
Enabled: true
AlignConsecutiveShortCaseStatements:
Enabled: true
AlignCaseColons: true
AllowShortBlocksOnASingleLine: Always
AllowShortCaseLabelsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakTemplateDeclarations: Yes
BraceWrapping:
BeforeCatch: true
BeforeElse: true
BreakBeforeBraces: Custom
BreakConstructorInitializers: BeforeComma
BreakInheritanceList: BeforeComma
ColumnLimit: 120
IndentCaseLabels: true
IndentRequiresClause: false
IndentWidth: 4
KeepEmptyLinesAtTheStartOfBlocks: false
ObjCBlockIndentWidth: 4
PackConstructorInitializers: CurrentLine
PointerAlignment: Left
RequiresClausePosition: WithPreceding
SpaceAfterCStyleCast: true
TabWidth: 4

63 changes: 31 additions & 32 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,40 +28,39 @@ jobs:
build_type: 'Debug'

steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/checkout@v4
with:
submodules: recursive

- name: setup (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run:
sudo apt install ninja-build
- name: setup (ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run:
sudo apt install ninja-build

- name: setup (macos)
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew update
brew install ninja
- name: setup (macos)
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew update
brew install ninja
- name: Configure
run: >
cmake
-G "${{ matrix.generator }}"
-B "${{github.workspace}}/build"
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}"
-DCLASP_BUILD_TESTS="On"
-DCLASP_BUILD_WITH_THREADS="${{matrix.build_threads}}"
-DLIB_POTASSCO_BUILD_TESTS="On"
-DCMAKE_CXX_STANDARD="14"
- name: Configure
run: >
cmake
-G "${{ matrix.generator }}"
-B "${{github.workspace}}/build"
-DCMAKE_BUILD_TYPE="${{matrix.build_type}}"
-DCLASP_BUILD_WITH_THREADS="${{matrix.build_threads}}"
-DCLASP_BUILD_TESTS="On"
-DLIB_POTASSCO_BUILD_TESTS="On"
- name: Build
run: >
cmake
--build "${{github.workspace}}/build"
--config "${{matrix.build_type}}"
- name: Build
run: >
cmake
--build "${{github.workspace}}/build"
--config "${{matrix.build_type}}"
- name: Test
working-directory: ${{github.workspace}}/build
run: >
ctest
-C "${{matrix.build_type}}"
- name: Test
working-directory: ${{github.workspace}}/build
run: >
ctest --rerun-failed --output-on-failure
-C "${{matrix.build_type}}"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
build*
.vscode*
CMakeLists.txt.user
cmake-build*
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "libpotassco"]
path = libpotassco
url = https://github.com/potassco/libpotassco.git
url = ../libpotassco.git
63 changes: 0 additions & 63 deletions .travis.yml

This file was deleted.

Loading

0 comments on commit f29889d

Please sign in to comment.