Skip to content

Commit 0783d98

Browse files
authored
Version update (#3)
Update the repo for 2022, add a number of tests, fix clang-tidy issues and add a move to the DelayedObjects objects. Update formatting, and add precommit
1 parent 1ffdb2b commit 0783d98

File tree

79 files changed

+5697
-4317
lines changed

Some content is hidden

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

79 files changed

+5697
-4317
lines changed

.appveyor.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ build_script:
1717
test_script:
1818
- cd build
1919
- ps: ctest --output-on-failure -C Debug
20-

.ci/azure-build.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
steps:
2+
- task: CMake@1
3+
inputs:
4+
cmakeArgs: .. -DCMAKE_CXX_STANDARD=$(concurrency.std) -DCMAKE_BUILD_TYPE=$(concurrency.build_type) $(concurrency.options)
5+
displayName: "Configure"
6+
env:
7+
GIT_SSL_NO_VERIFY: 1
8+
9+
- script: cmake --build .
10+
displayName: "Build"
11+
workingDirectory: build

.ci/azure-cmake.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
steps:
2+
# Note that silkeh/clang does not include ca-certificates, so check the shasum for verification
3+
- bash: |
4+
wget --no-check-certificate "https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
5+
echo "29faa62fb3a0b6323caa3d9557e1a5f1205614c0d4c5c2a9917f16a74f7eff68 cmake-3.14.3-Linux-x86_64.tar.gz" | shasum -sca 256
6+
displayName: Download CMake
7+
8+
- task: ExtractFiles@1
9+
inputs:
10+
archiveFilePatterns: "cmake*.tar.gz"
11+
destinationFolder: "cmake_program"
12+
displayName: Extract CMake
13+
14+
- bash: echo "##vso[task.prependpath]$(Build.SourcesDirectory)/cmake_program/cmake-3.14.3-Linux-x86_64/bin"
15+
displayName: Add CMake to PATH

.ci/azure-steps.yml

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

.ci/azure-test.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
steps:
2+
- script: ctest --output-on-failure -C $(concurrency.build_type) -T test
3+
displayName: "Test"
4+
workingDirectory: build
5+
6+
- task: PublishTestResults@2
7+
inputs:
8+
testResultsFormat: "cTest"
9+
testResultsFiles: "**/Test.xml"

.ci/build_docs.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
# must be installed.
1010
# - Doxygen configuration file must have the destination directory empty and
1111
# source code directory with a $(TRAVIS_BUILD_DIR) prefix.
12-
# - An gh-pages branch should already exist. See below for mor info on hoe to
12+
# - An gh-pages branch should already exist. See below for more info on how to
1313
# create a gh-pages branch.
1414
#
1515
# Required global variables:
@@ -95,7 +95,7 @@ if [ -d "html" ] && [ -f "html/index.html" ]; then
9595
git commit -m "Deploy code docs to GitHub Pages Travis build: ${TRAVIS_BUILD_NUMBER}" -m "Commit: ${TRAVIS_COMMIT}"
9696

9797
# Force push to the remote gh-pages branch.
98-
# The ouput is redirected to /dev/null to hide any sensitive credential data
98+
# The output is redirected to /dev/null to hide any sensitive credential data
9999
# that might otherwise be exposed.
100100
git push --force "https://${GH_REPO_TOKEN}@${GH_REPO_REF}" > /dev/null 2>&1
101101
else

.ci/build_doxygen.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,3 @@ export PATH="${DEPS_DIR}/doxygen/build/bin:${PATH}"
2222
cd "${TRAVIS_BUILD_DIR}"
2323

2424
set +evx
25-

.ci/tsan-cache.cmake

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
set(CMAKE_C_FLAGS "-fsanitize=thread,undefined -g -O1 -stdlib=libc++" CACHE STRING "Flags used by the compiler during all build types.")
2-
set(CMAKE_CXX_FLAGS "-fsanitize=thread,undefined -g -O1 -stdlib=libc++" CACHE STRING "Flags used by the compiler during all build types.")
3-
set(CMAKE_EXE_LINKER_FLAGS "-fsanitize=thread,undefined -stdlib=libc++" CACHE STRING "Flags used by the linker during all build types.")
4-
set(CMAKE_MODULE_LINKER_FLAGS "-fsanitize=thread,undefined -stdlib=libc++" CACHE STRING "Flags used by the linker during all build types.")
1+
set(CMAKE_C_FLAGS
2+
"-fsanitize=thread,undefined -g -O1 -stdlib=libc++"
3+
CACHE STRING "Flags used by the compiler during all build types."
4+
)
5+
set(CMAKE_CXX_FLAGS
6+
"-fsanitize=thread,undefined -g -O1 -stdlib=libc++"
7+
CACHE STRING "Flags used by the compiler during all build types."
8+
)
9+
set(CMAKE_EXE_LINKER_FLAGS
10+
"-fsanitize=thread,undefined -stdlib=libc++"
11+
CACHE STRING "Flags used by the linker during all build types."
12+
)
13+
set(CMAKE_MODULE_LINKER_FLAGS
14+
"-fsanitize=thread,undefined -stdlib=libc++"
15+
CACHE STRING "Flags used by the linker during all build types."
16+
)

.circleci/asan_suppression.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Lines starting with # are ignored.
2+
# Turn off checks for the source file (use absolute path or path relative
3+
# to the current working directory):
4+
src:*functional.cpp
5+
# Turn off checks for a particular functions (use mangled names):
6+
#fun:MyFooBar
7+
#fun:_Z8MyFooBarv
8+
# Extended regular expressions are supported:
9+
#fun:bad_(foo|bar)
10+
#src:bad_source[1-9].c
11+
# Shell like usage of * is supported (* is treated as .*):
12+
#src:bad/sources/*
13+
#fun:*BadFunction*
14+
# Specific sanitizer tools may introduce categories.
15+
#src:/special/path/*=special_sources
16+
# Sections can be used to limit ignorelist entries to specific sanitizers
17+
#[address]
18+
#fun:*BadASanFunc*
19+
# Section names are regular expressions
20+
#[cfi-vcall|cfi-icall]
21+
#fun:*BadCfiCall
22+
# Entries without sections are placed into [*] and apply to all sanitizers

.circleci/config.yml

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
version: 2
22
aliases:
3-
43
- &run_concurrency
54
name: run_concurrency
65
environment:
@@ -9,38 +8,49 @@ aliases:
98
cd build
109
eval cmake .. ${CMAKE_FLAGS}
1110
make -j 4
12-
ctest --output-on-failure
11+
ctest --verbose
1312
1413
jobs:
14+
concurrencygccTSan:
15+
docker:
16+
- image: helics/buildenv:gcc12-builder
17+
environment:
18+
CMAKE_FLAGS: '-DCMAKE_CXX_FLAGS="-fsanitize=thread -g -O1 " '
19+
TSAN_OPTIONS: "second_deadlock_stack=1 suppressions=/root/project/.circleci/tsan_suppression.txt history_size=4"
20+
21+
steps:
22+
- checkout
23+
- run: *run_concurrency
1524

1625
concurrencyTSan:
1726
docker:
18-
- image: helics/buildenv:builder
27+
- image: helics/buildenv:sanitizers-14
1928
environment:
20-
CMAKE_FLAGS: '-DCMAKE_CXX_FLAGS="-fsanitize=thread -g -O1 "'
21-
TSAN_OPTIONS: 'second_deadlock_stack=1'
29+
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=thread -nostdinc++ -nostdlib++ -L/root/develop/libcxx_tsan/lib -lc++ -lc++abi -I/root/develop/libcxx_tsan/include -I/root/develop/libcxx_tsan/include/c++/v1 -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O2 -Wl,-rpath,/root/develop/libcxx_tsan/lib" '
30+
TSAN_OPTIONS: "suppressions=/root/project/.circleci/tsan_suppression.txt"
2231

2332
steps:
2433
- checkout
2534
- run: *run_concurrency
2635

2736
concurrencyASan:
2837
docker:
29-
- image: helics/buildenv:sanitizers
38+
- image: helics/buildenv:sanitizers-14
3039
environment:
31-
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=undefined,address -fsanitize-address-use-after-scope -stdlib=libc++ -L/root/develop/libcxx_asan/lib -lc++abi -I/root/develop/libcxx_asan/include -I/root/develop/libcxx_asan/include/c++/v1 -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -Wl,-rpath=/root/develop/libcxx_asan/lib -fsanitize-blacklist=/root/project/.circleci/asan_blacklist.txt" '
32-
LSAN_OPTIONS: 'suppressions=/root/project/.circleci/leak_suppression.txt'
33-
UBSAN_OPTIONS: 'print_stacktrace=1'
40+
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=undefined,address -lc++ -lc++abi -fsanitize-address-use-after-scope -fsanitize-ignorelist=/root/project/.circleci/asan_suppression.txt -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -fsanitize-blacklist=/root/project/.circleci/asan_blacklist.txt" '
41+
LSAN_OPTIONS: "suppressions=/root/project/.circleci/leak_suppression.txt"
42+
UBSAN_OPTIONS: "print_stacktrace=1"
43+
ASAN_OPTIONS: "alloc_dealloc_mismatch=0"
3444

3545
steps:
3646
- checkout
3747
- run: *run_concurrency
3848

3949
concurrencyMSan:
4050
docker:
41-
- image: helics/buildenv:sanitizers
51+
- image: helics/buildenv:sanitizers-14
4252
environment:
43-
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=memory -stdlib=libc++ -L/root/develop/libcxx_msan/lib -lc++abi -I/root/develop/libcxx_msan/include -I/root/develop/libcxx_msan/include/c++/v1 -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -Wl,-rpath=/root/develop/libcxx_msan/lib" '
53+
CMAKE_FLAGS: '-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_FLAGS="-fsanitize=memory -nostdinc++ -nostdlib++ -L/root/develop/libcxx_msan/lib -lc++ -lc++abi -I/root/develop/libcxx_msan/include -I/root/develop/libcxx_msan/include/c++/v1 -Wno-unused-command-line-argument -fno-omit-frame-pointer -g -O1 -Wl,-rpath,/root/develop/libcxx_msan/lib" '
4454

4555
steps:
4656
- checkout
@@ -53,5 +63,4 @@ workflows:
5363
- concurrencyMSan
5464
- concurrencyASan
5565
- concurrencyTSan
56-
57-
66+
- concurrencygccTSan

0 commit comments

Comments
 (0)