Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 13 additions & 29 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,30 +1,14 @@
---
Checks: "*,
-abseil-*,
-altera-*,
-android-*,
-fuchsia-*,
-google-*,
-llvm*,
-modernize-use-trailing-return-type,
-zircon-*,
-readability-else-after-return,
-readability-static-accessed-through-instance,
-readability-avoid-const-params-in-decls,
-cppcoreguidelines-non-private-member-variables-in-classes,
-misc-non-private-member-variables-in-classes,
"
WarningsAsErrors: ''
HeaderFilterRegex: ''
FormatStyle: none

Checks: >
cert-*,
performance-*,
modernize-*,
misc-include-cleaner,
-readability-identifier-length,
-readability-magic-numbers,
-cppcoreguidelines-avoid-magic-numbers
CheckOptions:
- key: readability-identifier-length.IgnoredVariableNames
value: 'x|y|z'
- key: readability-identifier-length.IgnoredParameterNames
value: 'x|y|z'





- key: misc-include-cleaner.IgnoreHeaders
value: >
boost/test/.*;
__chrono/.*
HeaderFilterRegex: '^.*/include/chains/.*$'
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set update schedule for GitHub Actions

version: 2
updates:

- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every week
interval: "weekly"
8 changes: 4 additions & 4 deletions .github/workflows/auto-clang-format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: DoozyX/clang-format-lint-action@v0.13
- uses: actions/checkout@v6
- uses: DoozyX/clang-format-lint-action@v0.20
with:
source: '.'
exclude: './third_party ./external'
extensions: 'h,cpp,hpp'
clangFormatVersion: 12
clangFormatVersion: 19
inplace: True
- uses: EndBug/add-and-commit@v4
- uses: EndBug/add-and-commit@v9
with:
author_name: Clang Robot
author_email: robot@example.com
Expand Down
62 changes: 29 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ on:
- develop

env:
CLANG_TIDY_VERSION: "15.0.2"
CLANG_TIDY_VERSION: "19.1.1"
VERBOSE: 1


jobs:
Test:
name: ${{matrix.os}} ${{matrix.compiler}} ${{matrix.build_type}} ${{matrix.packaging_maintainer_mode == 'ON' && '(maintainer mode)' || ''}}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
Expand All @@ -29,13 +30,13 @@ jobs:
# and your own projects needs
matrix:
os:
- ubuntu-20.04
- macos-10.15
- windows-2019
- ubuntu-latest
- macos-latest
- windows-latest
compiler:
# you can specify the version after `-` like "llvm-15.0.2".
- llvm-15.0.2
- gcc-11
- llvm-19.1.1
- gcc-14
generator:
- "Ninja Multi-Config"
build_type:
Expand All @@ -49,66 +50,68 @@ jobs:

exclude:
# mingw is determined by this author to be too buggy to support
- os: windows-2019
compiler: gcc-11
- os: windows-latest
compiler: gcc-14
- os: windows-latest
compiler: llvm-19.1.1

include:
# Add appropriate variables for gcov version required. This will intentionally break
# if you try to use a compiler that does not have gcov set
- compiler: gcc-11
gcov_executable: gcov
- compiler: gcc-14
gcov_executable: gcov-14
enable_ipo: On

- compiler: llvm-15.0.2
- compiler: llvm-19.1.1
enable_ipo: Off
gcov_executable: "llvm-cov gcov"

- os: macos-10.15
- os: macos-latest
enable_ipo: Off

# Set up preferred package generators, for given build configurations
- build_type: Release
packaging_maintainer_mode: OFF
packaging_maintainer_mode: On
package_generator: TBZ2

# This exists solely to make sure a non-multiconfig build works
- os: ubuntu-20.04
compiler: gcc-11
- os: ubuntu-latest
compiler: gcc-14
generator: "Unix Makefiles"
build_type: Debug
gcov_executable: gcov
gcov_executable: gcov-14
packaging_maintainer_mode: On
enable_ipo: Off

# Windows msvc builds
- os: windows-2022
- os: windows-latest
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Debug
packaging_maintainer_mode: On
enable_ipo: On

- os: windows-2022
- os: windows-latest
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Release
packaging_maintainer_mode: On
enable_ipo: On

- os: windows-2022
- os: windows-latest
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Debug
packaging_maintainer_mode: Off

- os: windows-2022
- os: windows-latest
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Release
packaging_maintainer_mode: Off
package_generator: ZIP

- os: windows-2022
- os: windows-latest
compiler: msvc
generator: "Visual Studio 17 2022"
build_type: Release
Expand All @@ -120,12 +123,12 @@ jobs:
steps:
- name: Check for llvm version mismatches
if: ${{ contains(matrix.compiler, 'llvm') && !contains(matrix.compiler, env.CLANG_TIDY_VERSION) }}
uses: actions/github-script@v3
uses: actions/github-script@v8
with:
script: |
core.setFailed('There is a mismatch between configured llvm compiler and clang-tidy version chosen')

- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Setup Cache
uses: ./.github/actions/setup_cache
Expand Down Expand Up @@ -175,30 +178,23 @@ jobs:
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: |
ctest -C ${{matrix.build_type}}
gcovr -j ${{env.nproc}} --delete --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}'
gcovr -j ${{env.nproc}} --root ../ --print-summary --xml-pretty --xml coverage.xml . --gcov-executable '${{ matrix.gcov_executable }}'

- name: Windows - Test and coverage
if: runner.os == 'Windows'
working-directory: ./build
run: |
OpenCppCoverage.exe --export_type cobertura:coverage.xml --cover_children -- ctest -C ${{matrix.build_type}}

- name: CPack
if: matrix.package_generator != ''
working-directory: ./build
run: |
cpack -C ${{matrix.build_type}} -G ${{matrix.package_generator}}

- name: Publish Tagged Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: ${{ startsWith(github.ref, 'refs/tags/') && matrix.package_generator != '' }}
with:
files: |
build/*-*${{ matrix.build_type }}*-*.*


- name: Publish to codecov
uses: codecov/codecov-action@v2
uses: codecov/codecov-action@v5
with:
flags: ${{ runner.os }}
name: ${{ runner.os }}-coverage
Expand Down
88 changes: 88 additions & 0 deletions .github/workflows/cmake-multi-platform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
# 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.
fail-fast: false

# Set up a matrix to run the following 3 configurations:
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator>
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator>
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator>
#
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release]
c_compiler: [gcc, clang, cl]
include:
- os: windows-latest
c_compiler: cl
cpp_compiler: cl
- os: ubuntu-latest
c_compiler: gcc
cpp_compiler: g++
- os: ubuntu-latest
c_compiler: clang
cpp_compiler: clang++
exclude:
- os: windows-latest
c_compiler: gcc
- os: windows-latest
c_compiler: clang
- os: ubuntu-latest
c_compiler: cl

steps:
- uses: actions/checkout@v4

- name: Set reusable strings
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"

- name: Configure CMake Unix
if: runner.os != 'Windows'
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-S ${{ github.workspace }}

- name: Configure CMake Windows
if: runner.os == 'Windows'
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
run: >
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-Dchains_ENABLE_SANITIZER_ADDRESS:BOOL=OFF
-S ${{ github.workspace }}

- name: Build
# 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).
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
# 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).
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest --build-config ${{ matrix.build_type }}
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
# Learn more about CodeQL language support at https://git.io/codeql-language-support
compiler:
# you can specify the version after `-` like "llvm-13.0.0".
- gcc-11
- gcc-14
generator:
- "Ninja Multi-Config"
build_type:
Expand All @@ -48,7 +48,7 @@ jobs:


steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Setup Cache
uses: ./.github/actions/setup_cache
Expand Down Expand Up @@ -89,7 +89,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v4
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -104,4 +104,4 @@ jobs:
cmake --build ./build --config ${{matrix.build_type}}

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v4
Loading
Loading