Skip to content

Commit

Permalink
initial c++20 version of SCL
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Dalskov committed May 27, 2024
1 parent d1c5151 commit 258457b
Show file tree
Hide file tree
Showing 198 changed files with 11,743 additions and 10,912 deletions.
5 changes: 4 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Checks: '-*,bugprone-*,performance-*,readability-*,google-global-names-in-headers,cert-dcl59-cpp,-bugprone-easily-swappable-parameters,-readability-identifier-length,-readability-magic-numbers,-readability-function-cognitive-complexity,-readability-function-size'
Checks: '-*,bugprone-*,performance-*,readability-*,google-global-names-in-headers,cert-dcl59-cpp,-bugprone-easily-swappable-parameters,-readability-identifier-length,-readability-magic-numbers,-readability-function-cognitive-complexity,-readability-function-size,-readability-convert-member-functions-to-static'

CheckOptions:
- key: performance-unnecessary-value-param.AllowedTypes
Expand All @@ -22,6 +22,9 @@ CheckOptions:
# readability-magic-numbers:
# Too strict.
#
# readability-convert-member-functions-to-static
# Too many false positives.
#
# readability-function-cognitive-complexity
# Catch2.
#
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/Build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,19 @@ on:
- '!master'

jobs:
build:
name: Release
runs-on: ubuntu-latest
release:
name: release
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2

- name: Build
shell: bash
run: |
cmake . -B build
cmake . -B build -DSCL_BUILD_DOCUMENTATION=OFF
cmake --build build
- name: Test
shell: bash
run: cmake --build build --target test
28 changes: 6 additions & 22 deletions .github/workflows/Checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,9 @@ on:
- '!master'

jobs:
documentation:
name: Documentation
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Setup
run: sudo apt-get install -y doxygen

- name: Documentation
shell: bash
run: ./scripts/build_documentation.sh

headers:
name: Header files
runs-on: ubuntu-latest
name: headers
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

Expand All @@ -33,17 +20,14 @@ jobs:
run: ./scripts/check_header_guards.py

style:
name: Code style
runs-on: ubuntu-latest
name: style
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2

- name: Setup
run: sudo apt-get install -y clang-format
run: sudo apt-get install -y clang-format-15

- name: Check
shell: bash
run: |
find . -type f \( -iname "*.h" -o -iname "*.cc" \) -exec clang-format -n {} \; &> checks.txt
cat checks.txt
test ! -s checks.txt
run: ./scripts/check_formatting.sh
36 changes: 36 additions & 0 deletions .github/workflows/Coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Coverage

on:
push:
branches:
- '*'
- '!master'

jobs:
coverage:
name: coverage
runs-on: ubuntu-24.04
env:
COV_THRESHOLD_LINES: 95
COV_THRESHOLD_FUNCS: 90

steps:
- uses: actions/checkout@v2

- name: Setup
shell: bash
run: sudo apt-get install -y lcov

- name: Build
shell: bash
run: |
cmake . -B build -DSCL_BUILD_TEST_WITH_COVERAGE=ON -DSCL_BUILD_DOCUMENTATION=OFF
cmake --build build
- name: Compute coverage
shell: bash
run: cmake --build build --target coverage | tee cov.txt

- name: Check coverage
shell: bash
run: ./scripts/check_coverage.sh cov.txt
35 changes: 35 additions & 0 deletions .github/workflows/Documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Documentation

on:
push:
branches:
- '*'
- '!master'

jobs:
documentation:
name: documentation
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v2

- name: Cache doxygen
id: cache-doxygen
uses: actions/cache@v4
with:
path: ~/doxygen
key: ${{ runner.os }}-doxygen

- name: Install doxygen
if: ${{ steps.cache-doxygen.outputs.cache-hit != 'true' }}
run: |
curl https://www.doxygen.nl/files/doxygen-1.10.0.linux.bin.tar.gz -o doxygen.tar.gz
mkdir ~/doxygen
tar xf doxygen.tar.gz -C ~/doxygen --strip-components=1
- name: Generate documentation
shell: bash
run: |
cmake . -B build -DSCL_BUILD_TESTS=OFF -DSCL_DOXYGEN_BIN=$HOME/doxygen/bin/doxygen
cmake --build build --target documentation
52 changes: 0 additions & 52 deletions .github/workflows/Test.yml

This file was deleted.

4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@
.cache/
.clangd
build/
buildDebug/
buildRelease/
buildOMP/
compile_commands.json

# do not track compiled documentation files
doc/html

Loading

0 comments on commit 258457b

Please sign in to comment.