File tree 4 files changed +10
-15
lines changed
tests/cpp_validation_tests
4 files changed +10
-15
lines changed Original file line number Diff line number Diff line change 53
53
clang-tidy :
54
54
uses : " ./.github/workflows/clang-tidy.yml"
55
55
with :
56
- target : " power_grid_model_api_tests "
56
+ target : " all "
57
57
58
58
ci-passed :
59
59
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change 65
65
run : |
66
66
brew install boost eigen nlohmann-json msgpack-cxx doctest
67
67
68
- - name : Set build target in case of push
69
- if : inputs.target == null
70
- run : |
71
- echo "TARGET=power_grid_model_api_tests" >> $GITHUB_ENV
72
-
73
68
- name : Set build target in case of workflow dispatch
74
69
if : inputs.target != null
75
70
run : |
78
73
- name : Build
79
74
run : |
80
75
cmake --preset ${{ env.PRESET }}
81
- cmake --build --preset ${{ env.PRESET }} --target ${{ env.TARGET }}
76
+ cmake --build --preset ${{ env.PRESET }} --target ${{ env.TARGET }} -- -k 0
Original file line number Diff line number Diff line change 31
31
clang-tidy :
32
32
uses : " ./.github/workflows/clang-tidy.yml"
33
33
with :
34
- target : " all power_grid_model_benchmark_cpp "
34
+ target : " all"
35
35
36
36
citations :
37
37
uses : " ./.github/workflows/citations.yml"
Original file line number Diff line number Diff line change @@ -37,13 +37,6 @@ class UnsupportedValidationCase : public PowerGridError {
37
37
38
38
using nlohmann::json;
39
39
40
- auto read_file (std::filesystem::path const & path) {
41
- std::ifstream const f{path};
42
- std::ostringstream buffer;
43
- buffer << f.rdbuf ();
44
- return buffer.str ();
45
- }
46
-
47
40
auto read_json (std::filesystem::path const & path) {
48
41
json j;
49
42
std::ifstream f{path};
@@ -77,6 +70,13 @@ OwningDataset load_dataset(std::filesystem::path const& path) {
77
70
// Issue in msgpack, reported in https://github.com/msgpack/msgpack-c/issues/1098
78
71
// May be a Clang Analyzer bug
79
72
#ifndef __clang_analyzer__ // TODO(mgovers): re-enable this when issue in msgpack is fixed
73
+ auto read_file = [](std::filesystem::path const & read_file_path) {
74
+ std::ifstream const f{read_file_path};
75
+ std::ostringstream buffer;
76
+ buffer << f.rdbuf ();
77
+ return buffer.str ();
78
+ };
79
+
80
80
Deserializer deserializer{read_file (path), PGM_json};
81
81
auto & writable_dataset = deserializer.get_dataset ();
82
82
auto dataset = create_owning_dataset (writable_dataset);
You can’t perform that action at this time.
0 commit comments