From 147a479e7ecd35db29b23a4f14557c3dd8dfc6b1 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Wed, 17 Dec 2025 12:54:48 +0100 Subject: [PATCH 01/23] add ubsan + hardening for gcc Signed-off-by: Martijn Govers --- CMakePresets.json | 4 +- .../power_grid_model/CMakeLists.txt | 3 +- .../power_grid_model/auxiliary/dataset.hpp | 16 +++--- .../power_grid_model/math_solver/y_bus.hpp | 54 +++++++++++-------- .../include/power_grid_model/topology.hpp | 13 +++-- .../power_grid_model_c/CMakeLists.txt | 22 ++++++++ pyproject.toml | 1 + 7 files changed, 74 insertions(+), 39 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 9e68e113fa..4052c63de0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -61,7 +61,7 @@ "hidden": true, "environment": { "PreferredToolArchitecture": "x64", - "PLATFORM_C_FLAGS": "/DWIN32 /D_WINDOWS /W4 /WX /GR /EHsc /utf-8 /bigobj /FC" + "PLATFORM_C_FLAGS": "/DWIN32 /D_WINDOWS /W4 /WX /GR /EHsc /utf-8 /bigobj /FC /RTC1" }, "condition": { "type": "equals", @@ -109,7 +109,7 @@ { "name": "unix-sanitizer", "environment": { - "SANITIZER_FLAGS": "-fsanitize=address" + "SANITIZER_FLAGS": "-fsanitize=address,pointer-compare,undefined" }, "inherits": "unix-base", "hidden": true diff --git a/power_grid_model_c/power_grid_model/CMakeLists.txt b/power_grid_model_c/power_grid_model/CMakeLists.txt index 6584a571fa..a2ec3f3b57 100644 --- a/power_grid_model_c/power_grid_model/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model/CMakeLists.txt @@ -29,6 +29,7 @@ target_compile_options( power_grid_model BEFORE INTERFACE + "$<$:-fstack-protector>" "$<$:-Wno-unknown-attributes>" - "$<$:/bigobj>" + "$<$:/bigobj /RTC1>" ) diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp index 3108f6307c..970dc5b6ce 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp @@ -97,14 +97,14 @@ class ColumnarAttributeRange : public std::ranges::view_interface { - AttributeType const* buffer_ptr = - reinterpret_cast(attribute_buffer.data) + idx_; - auto& attribute_ref = - meta_attribute.template get_attribute(reinterpret_cast(&result)); - attribute_ref = *buffer_ptr; - }); + ctype_func_selector(meta_attribute.ctype, [&result, &attribute_buffer, &meta_attribute, + idx = idx_] { + AttributeType const* buffer_ptr = + reinterpret_cast(attribute_buffer.data) + idx; + AttributeType& attribute_ref = + meta_attribute.template get_attribute(reinterpret_cast(&result)); + attribute_ref = *buffer_ptr; + }); } return result; } diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp index 9f76876fb3..33fe9e2003 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp @@ -289,6 +289,9 @@ template class YBus { std::shared_ptr const> const& param, std::shared_ptr const& y_bus_struct = {}) : math_topology_{topo_ptr} { + assert(math_topology_ != nullptr); + assert(param != nullptr); + // use existing struct or make new struct if (y_bus_struct) { y_bus_struct_ = y_bus_struct; @@ -447,29 +450,32 @@ template class YBus { template requires std::same_as> || std::same_as> std::vector calculate_branch_flow(ComplexValueVector const& u) const { - std::vector branch_flow(math_topology_->branch_bus_idx.size()); - std::transform(math_topology_->branch_bus_idx.cbegin(), math_topology_->branch_bus_idx.cend(), - math_model_param_->branch_param.cbegin(), branch_flow.begin(), - [&u](BranchIdx branch_idx, BranchCalcParam const& param) { - auto const [f, t] = branch_idx; - // if one side is disconnected, use zero voltage at that side - ComplexValue const uf = f != -1 ? u[f] : ComplexValue{0.0}; - ComplexValue const ut = t != -1 ? u[t] : ComplexValue{0.0}; - T output; - - // See "Branch Flow Calculation" in "State Estimation Alliander" - output.i_f = dot(param.yff(), uf) + dot(param.yft(), ut); - output.i_t = dot(param.ytf(), uf) + dot(param.ytt(), ut); - - if constexpr (std::same_as>) { - // See "Shunt Injection Flow Calculation" in "State Estimation Alliander" - output.s_f = uf * conj(output.i_f); - output.s_t = ut * conj(output.i_t); - } - - return output; - }); - return branch_flow; + assert(math_topology_ != nullptr); + + return std::views::zip(std::as_const(math_topology_->branch_bus_idx), + std::as_const(math_model_param_->branch_param)) | + std::views::transform([&u](auto const& branch_idx_params) -> T { + auto const& [branch_idx, param] = branch_idx_params; + + auto const [f, t] = branch_idx; + // if one side is disconnected, use zero voltage at that side + ComplexValue const uf = f != -1 ? u[f] : ComplexValue{0.0}; + ComplexValue const ut = t != -1 ? u[t] : ComplexValue{0.0}; + T output; + + // See "Branch Flow Calculation" in "State Estimation Alliander" + output.i_f = dot(param.yff(), uf) + dot(param.yft(), ut); + output.i_t = dot(param.ytf(), uf) + dot(param.ytt(), ut); + + if constexpr (std::same_as>) { + // See "Shunt Injection Flow Calculation" in "State Estimation Alliander" + output.s_f = uf * conj(output.i_f); + output.s_t = ut * conj(output.i_t); + } + + return output; + }) | + std::ranges::to>(); } // calculate shunt flow based on voltage, injection direction @@ -477,6 +483,8 @@ template class YBus { requires std::same_as> || std::same_as> std::vector calculate_shunt_flow(ComplexValueVector const& u) const { + assert(math_topology_ != nullptr); + std::vector shunt_flow(math_topology_->n_shunt()); for (auto const [bus, shunts] : enumerated_zip_sequence(math_topology_->shunts_per_bus)) { for (Idx const shunt : shunts) { diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp index 367792666a..817d9342fd 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp @@ -353,8 +353,9 @@ class Topology { }; // k as branch number for 2-way branch for (auto const& [idx, branch_node_idx, branch_connected] : - std::views::zip(std::views::iota(0), comp_topo_.branch_node_idx, comp_conn_.branch_connected)) { - assert(std::ssize(branch_connected) == 2); // NOSONAR(R354) + std::views::zip(std::views::iota(0), std::as_const(comp_topo_.branch_node_idx), + std::as_const(comp_conn_.branch_connected))) { + assert(std::ssize(branch_connected) == 2); auto const [i, j] = branch_node_idx; IntS const i_status = branch_connected[0]; @@ -387,8 +388,9 @@ class Topology { } // k as branch number for 3-way branch for (auto const& [idx, i, i_status, j_math] : - std::views::zip(std::views::iota(0), comp_topo_.branch3_node_idx, comp_conn_.branch3_connected, - std::views::drop(comp_coup_.node, comp_topo_.n_node))) { + std::views::zip(std::views::iota(0), std::as_const(comp_topo_.branch3_node_idx), + std::as_const(comp_conn_.branch3_connected), + std::views::drop(std::as_const(comp_coup_.node), comp_topo_.n_node))) { std::array const i_math{ comp_coup_.node[i[0]], comp_coup_.node[i[1]], @@ -553,7 +555,8 @@ class Topology { std::ranges::for_each(math_topology_, [](MathModelTopology& topo) { topo.load_gen_type.resize(topo.n_load_gen()); }); // assign load type - for (auto const& [idx_math, load_gen_type] : std::views::zip(comp_coup_.load_gen, comp_topo_.load_gen_type)) { + for (auto const& [idx_math, load_gen_type] : + std::views::zip(std::as_const(comp_coup_.load_gen), std::as_const(comp_topo_.load_gen_type))) { if (idx_math.group == -1) { continue; } diff --git a/power_grid_model_c/power_grid_model_c/CMakeLists.txt b/power_grid_model_c/power_grid_model_c/CMakeLists.txt index 14a8ad9868..644e0b1ecc 100644 --- a/power_grid_model_c/power_grid_model_c/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model_c/CMakeLists.txt @@ -49,6 +49,28 @@ set_target_properties( INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE ) +target_compile_options( + power_grid_model_c + BEFORE + PUBLIC + # "$<$,$>:-fstack-protector;-fsanitize=undefined>" + "$<$:-fstack-protector;-fsanitize=undefined;-static-libubsan>" + # "$<$:-fsanitize=undefined>" + # "$<$,$>:-fsanitize-minimal-runtime>" + "$<$:/RTC1>" +) + +target_link_options( + power_grid_model_c + BEFORE + PUBLIC + # "$<$,$>:-fstack-protector;-fsanitize=undefined>" + "$<$:-fstack-protector;-fsanitize=undefined;-static-libubsan>" + # "$<$:-fsanitize=undefined>" + # "$<$,$>:-fsanitize-minimal-runtime>" + "$<$:/RTC1>" +) + install( TARGETS power_grid_model_c EXPORT power_grid_modelTargets diff --git a/pyproject.toml b/pyproject.toml index 4da16335b8..91023ba771 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,6 +76,7 @@ Discussion = "https://github.com/orgs/PowerGridModel/discussions" power_grid_model = "power_grid_model._core.power_grid_model_c" [tool.scikit-build] +build.verbose = true logging.level = "INFO" cmake.version = ">=3.23" From 2c7c08529df9579ba3f7e88158afb2d5753780b6 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Wed, 17 Dec 2025 16:03:56 +0100 Subject: [PATCH 02/23] enable hardening for clang Signed-off-by: Martijn Govers --- CMakePresets.json | 2 +- .../power_grid_model_c/CMakeLists.txt | 23 +++++++++++-------- pyproject.toml | 1 - tests/native_api_tests/CMakeLists.txt | 5 ++++ 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 4052c63de0..4f6c91f2b6 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -109,7 +109,7 @@ { "name": "unix-sanitizer", "environment": { - "SANITIZER_FLAGS": "-fsanitize=address,pointer-compare,undefined" + "SANITIZER_FLAGS": "-fstack-protector;-fsanitize=address,pointer-compare,undefined" }, "inherits": "unix-base", "hidden": true diff --git a/power_grid_model_c/power_grid_model_c/CMakeLists.txt b/power_grid_model_c/power_grid_model_c/CMakeLists.txt index 644e0b1ecc..cef497aafe 100644 --- a/power_grid_model_c/power_grid_model_c/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model_c/CMakeLists.txt @@ -49,25 +49,30 @@ set_target_properties( INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE ) +# Always-on hardening +target_compile_definitions( + power_grid_model_c + PUBLIC + "$<$,$>:_FORTIFY_SOURCE=2>" +) target_compile_options( power_grid_model_c BEFORE PUBLIC - # "$<$,$>:-fstack-protector;-fsanitize=undefined>" - "$<$:-fstack-protector;-fsanitize=undefined;-static-libubsan>" - # "$<$:-fsanitize=undefined>" - # "$<$,$>:-fsanitize-minimal-runtime>" + "$<$,$>:-fstack-protector;-fsanitize=undefined>" + "$<$:-static-libubsan>" + "$<$:-lubsan>" + "$<$,$,$>>>:-fsanitize-minimal-runtime>" "$<$:/RTC1>" ) - target_link_options( power_grid_model_c BEFORE PUBLIC - # "$<$,$>:-fstack-protector;-fsanitize=undefined>" - "$<$:-fstack-protector;-fsanitize=undefined;-static-libubsan>" - # "$<$:-fsanitize=undefined>" - # "$<$,$>:-fsanitize-minimal-runtime>" + "$<$,$>:-fstack-protector;-fsanitize=undefined>" + "$<$:-static-libubsan>" + "$<$:-lubsan>" + "$<$,$>>:-fsanitize-minimal-runtime>" "$<$:/RTC1>" ) diff --git a/pyproject.toml b/pyproject.toml index 91023ba771..4da16335b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,7 +76,6 @@ Discussion = "https://github.com/orgs/PowerGridModel/discussions" power_grid_model = "power_grid_model._core.power_grid_model_c" [tool.scikit-build] -build.verbose = true logging.level = "INFO" cmake.version = ">=3.23" diff --git a/tests/native_api_tests/CMakeLists.txt b/tests/native_api_tests/CMakeLists.txt index e58c80b726..c8f998db99 100644 --- a/tests/native_api_tests/CMakeLists.txt +++ b/tests/native_api_tests/CMakeLists.txt @@ -25,4 +25,9 @@ target_compile_definitions( PRIVATE PGM_ENABLE_EXPERIMENTAL ) +set_target_properties( + power_grid_model_api_tests + PROPERTIES BUILD_RPATH $ +) + doctest_discover_tests(power_grid_model_api_tests) From a482a73c7ec4b2016c1fc8657c624f9c54df483c Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 18 Dec 2025 06:57:50 +0100 Subject: [PATCH 03/23] fix typo Signed-off-by: Martijn Govers --- CMakePresets.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index 4f6c91f2b6..caeb0c41e3 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -109,7 +109,7 @@ { "name": "unix-sanitizer", "environment": { - "SANITIZER_FLAGS": "-fstack-protector;-fsanitize=address,pointer-compare,undefined" + "SANITIZER_FLAGS": "-fstack-protector -fsanitize=address,pointer-compare,undefined" }, "inherits": "unix-base", "hidden": true From 43b2aa6a72296f95d925607496ba7f8552120ac6 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 18 Dec 2025 07:46:42 +0100 Subject: [PATCH 04/23] windows hardening Signed-off-by: Martijn Govers --- CMakePresets.json | 5 ++++- power_grid_model_c/power_grid_model/CMakeLists.txt | 9 --------- power_grid_model_c/power_grid_model_c/CMakeLists.txt | 9 ++++----- 3 files changed, 8 insertions(+), 15 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index caeb0c41e3..a4e01a49e0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -61,7 +61,7 @@ "hidden": true, "environment": { "PreferredToolArchitecture": "x64", - "PLATFORM_C_FLAGS": "/DWIN32 /D_WINDOWS /W4 /WX /GR /EHsc /utf-8 /bigobj /FC /RTC1" + "PLATFORM_C_FLAGS": "/DWIN32 /D_WINDOWS /W4 /WX /GR /EHsc /utf-8 /bigobj /FC" }, "condition": { "type": "equals", @@ -137,6 +137,9 @@ { "name": "msvc-debug", "displayName": "Debug (MSVC)", + "environment": { + "SANITIZER_FLAGS": "/RTC1" + }, "inherits": [ "msvc-base", "debug" diff --git a/power_grid_model_c/power_grid_model/CMakeLists.txt b/power_grid_model_c/power_grid_model/CMakeLists.txt index a2ec3f3b57..ff1c4f3eb7 100644 --- a/power_grid_model_c/power_grid_model/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model/CMakeLists.txt @@ -24,12 +24,3 @@ target_include_directories( # only use MPL version of eigen target_compile_definitions(power_grid_model INTERFACE "EIGEN_MPL2_ONLY=1") - -target_compile_options( - power_grid_model - BEFORE - INTERFACE - "$<$:-fstack-protector>" - "$<$:-Wno-unknown-attributes>" - "$<$:/bigobj /RTC1>" -) diff --git a/power_grid_model_c/power_grid_model_c/CMakeLists.txt b/power_grid_model_c/power_grid_model_c/CMakeLists.txt index cef497aafe..e74c5d5b58 100644 --- a/power_grid_model_c/power_grid_model_c/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model_c/CMakeLists.txt @@ -52,28 +52,27 @@ set_target_properties( # Always-on hardening target_compile_definitions( power_grid_model_c - PUBLIC + PRIVATE "$<$,$>:_FORTIFY_SOURCE=2>" + "$<$:_ITERATOR_DEBUG_LEVEL=$,2,1>>" ) target_compile_options( power_grid_model_c BEFORE - PUBLIC + PRIVATE "$<$,$>:-fstack-protector;-fsanitize=undefined>" "$<$:-static-libubsan>" "$<$:-lubsan>" "$<$,$,$>>>:-fsanitize-minimal-runtime>" - "$<$:/RTC1>" ) target_link_options( power_grid_model_c BEFORE - PUBLIC + PRIVATE "$<$,$>:-fstack-protector;-fsanitize=undefined>" "$<$:-static-libubsan>" "$<$:-lubsan>" "$<$,$>>:-fsanitize-minimal-runtime>" - "$<$:/RTC1>" ) install( From 0a6a25eaf00ce1bac918dd64ff3f8607d22c51b7 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 18 Dec 2025 15:54:56 +0100 Subject: [PATCH 05/23] revert Signed-off-by: Martijn Govers --- power_grid_model_c/power_grid_model/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/power_grid_model_c/power_grid_model/CMakeLists.txt b/power_grid_model_c/power_grid_model/CMakeLists.txt index ff1c4f3eb7..53519648f9 100644 --- a/power_grid_model_c/power_grid_model/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model/CMakeLists.txt @@ -24,3 +24,11 @@ target_include_directories( # only use MPL version of eigen target_compile_definitions(power_grid_model INTERFACE "EIGEN_MPL2_ONLY=1") + +target_compile_options( + power_grid_model + BEFORE + INTERFACE + "$<$:-Wno-unknown-attributes>" + "$<$:/bigobj /RTC1>" +) From d95c9d33716d367cd938ac9ac724b564b5a28ad9 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 18 Dec 2025 15:55:33 +0100 Subject: [PATCH 06/23] remove rtc1 Signed-off-by: Martijn Govers --- power_grid_model_c/power_grid_model/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/power_grid_model_c/power_grid_model/CMakeLists.txt b/power_grid_model_c/power_grid_model/CMakeLists.txt index 53519648f9..6584a571fa 100644 --- a/power_grid_model_c/power_grid_model/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model/CMakeLists.txt @@ -30,5 +30,5 @@ target_compile_options( BEFORE INTERFACE "$<$:-Wno-unknown-attributes>" - "$<$:/bigobj /RTC1>" + "$<$:/bigobj>" ) From 70c0d1a4e920c8ecc56c215df8b3223ffbdad4a8 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Wed, 14 Jan 2026 09:45:58 +0100 Subject: [PATCH 07/23] partial revert Signed-off-by: Martijn Govers --- .../include/power_grid_model/math_solver/y_bus.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp index 33fe9e2003..3c5a48a96a 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/math_solver/y_bus.hpp @@ -452,8 +452,7 @@ template class YBus { std::vector calculate_branch_flow(ComplexValueVector const& u) const { assert(math_topology_ != nullptr); - return std::views::zip(std::as_const(math_topology_->branch_bus_idx), - std::as_const(math_model_param_->branch_param)) | + return std::views::zip(math_topology_->branch_bus_idx, math_model_param_->branch_param) | std::views::transform([&u](auto const& branch_idx_params) -> T { auto const& [branch_idx, param] = branch_idx_params; From 8c718b42ae657027ac915996f49bd6fd65e8a3fd Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Wed, 14 Jan 2026 11:21:34 +0100 Subject: [PATCH 08/23] cleanup + fix clang-cl linking issues Signed-off-by: Martijn Govers --- CMakeLists.txt | 1 + CMakePresets.json | 4 +- .../power_grid_model_c/CMakeLists.txt | 54 ++++++++++--------- 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1bb14a5b44..a1d363ae82 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ include("cmake/pgm_version.cmake") project(power_grid_model VERSION ${PGM_VERSION}) option(PGM_ENABLE_DEV_BUILD "Enable developer build (e.g.: tests)" OFF) +option(PGM_ENABLE_HARDENING "Enable compile and link time hardening options" ON) set(CMAKE_CXX_STANDARD 23) set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/CMakePresets.json b/CMakePresets.json index a4e01a49e0..397d74e428 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -45,7 +45,7 @@ "description": "Target Unix platform.", "hidden": true, "environment": { - "PLATFORM_C_FLAGS": "-Wall -Wextra -pedantic -Werror -Wno-deprecated-declarations", + "PLATFORM_C_FLAGS": "-Wall -Wextra -pedantic -Werror -Wno-deprecated-declarations -fsanitize-minimal-runtime", "PLATFORM_CXX_FLAGS": "$env{PLATFORM_C_FLAGS} -Wno-deprecated-copy" }, "condition": { @@ -109,7 +109,7 @@ { "name": "unix-sanitizer", "environment": { - "SANITIZER_FLAGS": "-fstack-protector -fsanitize=address,pointer-compare,undefined" + "SANITIZER_FLAGS": "-fstack-protector -fsanitize=address,pointer-compare,undefined -fno-sanitize-minimal-runtime" }, "inherits": "unix-base", "hidden": true diff --git a/power_grid_model_c/power_grid_model_c/CMakeLists.txt b/power_grid_model_c/power_grid_model_c/CMakeLists.txt index e74c5d5b58..1c1cbec522 100644 --- a/power_grid_model_c/power_grid_model_c/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model_c/CMakeLists.txt @@ -49,31 +49,35 @@ set_target_properties( INTERPROCEDURAL_OPTIMIZATION_RELWITHDEBINFO TRUE ) -# Always-on hardening -target_compile_definitions( - power_grid_model_c - PRIVATE - "$<$,$>:_FORTIFY_SOURCE=2>" - "$<$:_ITERATOR_DEBUG_LEVEL=$,2,1>>" -) -target_compile_options( - power_grid_model_c - BEFORE - PRIVATE - "$<$,$>:-fstack-protector;-fsanitize=undefined>" - "$<$:-static-libubsan>" - "$<$:-lubsan>" - "$<$,$,$>>>:-fsanitize-minimal-runtime>" -) -target_link_options( - power_grid_model_c - BEFORE - PRIVATE - "$<$,$>:-fstack-protector;-fsanitize=undefined>" - "$<$:-static-libubsan>" - "$<$:-lubsan>" - "$<$,$>>:-fsanitize-minimal-runtime>" -) +if(PGM_ENABLE_HARDENING) + target_compile_definitions( + power_grid_model_c + PRIVATE + "$<$,$>:_FORTIFY_SOURCE=2>" + "$<$:_ITERATOR_DEBUG_LEVEL=$,2,1>>" + ) + if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows") + set(_HAS_ADDRESS_SANITIZER + "$,$>>" + ) + target_compile_options( + power_grid_model_c + BEFORE + PRIVATE + "-fstack-protector" + "-fsanitize=undefined" + "$<$:-static-libubsan>" + "$<$:-lubsan>" + ) + endif() + target_link_options( + power_grid_model_c + BEFORE + PRIVATE + "$<$,$>:-fstack-protector;-fsanitize=undefined>" + "$<$:-static-libubsan>" + ) +endif() install( TARGETS power_grid_model_c From 44ebe4cb5467870be157ab958056191e8786c6ed Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Wed, 14 Jan 2026 11:26:09 +0100 Subject: [PATCH 09/23] fix cmakepresets Signed-off-by: Martijn Govers --- CMakePresets.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 397d74e428..a4e01a49e0 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -45,7 +45,7 @@ "description": "Target Unix platform.", "hidden": true, "environment": { - "PLATFORM_C_FLAGS": "-Wall -Wextra -pedantic -Werror -Wno-deprecated-declarations -fsanitize-minimal-runtime", + "PLATFORM_C_FLAGS": "-Wall -Wextra -pedantic -Werror -Wno-deprecated-declarations", "PLATFORM_CXX_FLAGS": "$env{PLATFORM_C_FLAGS} -Wno-deprecated-copy" }, "condition": { @@ -109,7 +109,7 @@ { "name": "unix-sanitizer", "environment": { - "SANITIZER_FLAGS": "-fstack-protector -fsanitize=address,pointer-compare,undefined -fno-sanitize-minimal-runtime" + "SANITIZER_FLAGS": "-fstack-protector -fsanitize=address,pointer-compare,undefined" }, "inherits": "unix-base", "hidden": true From b026dade9de655602daba767d084a2c552f5e490 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Wed, 14 Jan 2026 12:01:38 +0100 Subject: [PATCH 10/23] clang also compiles now Signed-off-by: Martijn Govers --- power_grid_model_c/power_grid_model_c/CMakeLists.txt | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/power_grid_model_c/power_grid_model_c/CMakeLists.txt b/power_grid_model_c/power_grid_model_c/CMakeLists.txt index 1c1cbec522..a7c3836415 100644 --- a/power_grid_model_c/power_grid_model_c/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model_c/CMakeLists.txt @@ -63,11 +63,7 @@ if(PGM_ENABLE_HARDENING) target_compile_options( power_grid_model_c BEFORE - PRIVATE - "-fstack-protector" - "-fsanitize=undefined" - "$<$:-static-libubsan>" - "$<$:-lubsan>" + PRIVATE "-fstack-protector" "-fsanitize=undefined" ) endif() target_link_options( @@ -76,6 +72,7 @@ if(PGM_ENABLE_HARDENING) PRIVATE "$<$,$>:-fstack-protector;-fsanitize=undefined>" "$<$:-static-libubsan>" + "$<$:-lubsan>" ) endif() From c2af03b944602a54394cb83b3d821dc974468bb1 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 15 Jan 2026 07:08:20 +0100 Subject: [PATCH 11/23] cleanup forgotten dereference Signed-off-by: Martijn Govers --- power_grid_model_c/power_grid_model_c/src/dataset.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/power_grid_model_c/power_grid_model_c/src/dataset.cpp b/power_grid_model_c/power_grid_model_c/src/dataset.cpp index 15d15f5dc8..5c43824999 100644 --- a/power_grid_model_c/power_grid_model_c/src/dataset.cpp +++ b/power_grid_model_c/power_grid_model_c/src/dataset.cpp @@ -29,7 +29,7 @@ using power_grid_model_c::to_c_size; // dataset info char const* PGM_dataset_info_name(PGM_Handle* handle, PGM_DatasetInfo const* info) { - return call_with_catch(handle, [info] { return safe_ptr_get(safe_ptr(info)->dataset).name; }); + return call_with_catch(handle, [info] { return safe_ptr_get(safe_ptr_get(info).dataset).name; }); } PGM_Idx PGM_dataset_info_is_batch(PGM_Handle* handle, PGM_DatasetInfo const* info) { From b9b19e015b5a8051fe5a07d9a24d8294f35861c0 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 15 Jan 2026 08:30:58 +0100 Subject: [PATCH 12/23] Apply suggestion from @mgovers Signed-off-by: Martijn Govers Signed-off-by: Martijn Govers --- .../power_grid_model/include/power_grid_model/topology.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp index 95d3884d3f..e707dd97e2 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/topology.hpp @@ -356,7 +356,7 @@ class Topology { for (auto&& [idx, branch_node_idx, branch_connected] : std::views::zip(std::views::iota(0), std::as_const(comp_topo_.branch_node_idx), std::as_const(comp_conn_.branch_connected))) { - assert(std::ssize(branch_connected) == 2); + assert(std::ssize(branch_connected) == 2); // NOSONAR(R354) auto const [i, j] = branch_node_idx; IntS const i_status = branch_connected[0]; From 00a23d7558244e15dc18f693a8de9dd109e8bcba Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Thu, 15 Jan 2026 17:27:11 +0100 Subject: [PATCH 13/23] use gcc-14 to build python, install lubsan Signed-off-by: Martijn Govers --- .github/workflows/build-test-release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 360cd33ec9..ea2cae9197 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -199,6 +199,13 @@ jobs: name: version path: . + - name: Set up gcc + if: runner.os == 'Linux' + run: | + sudo apt-get install -y ninja-build gcc-14 g++-14 + sudo ln -s /usr/bin/gcc-14 /usr/local/bin/gcc + sudo ln -s /usr/bin/g++-14 /usr/local/bin/g++ + - uses: ./.github/actions/enable-msvc if: runner.os == 'Windows' From 422112be7a2f6054fcb3a50c2f93ffba9fb7631c Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 09:34:41 +0100 Subject: [PATCH 14/23] attempt to fix gcc CI Signed-off-by: Martijn Govers --- .../include/power_grid_model/common/three_phase_tensor.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp index 1cb1a4867b..8629932409 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/common/three_phase_tensor.hpp @@ -28,7 +28,7 @@ template using EigenDiagonalTensor3 = Eigen::DiagonalMatrix; template class Vector : public EigenVector3 { public: - Vector() { (*this) = EigenVector3::Zero(); }; + Vector() { this->setConstant(T{}); }; // eigen expression template Vector(Eigen::ArrayBase const& other) : EigenVector3{other} {} template Vector& operator=(Eigen::ArrayBase const& other) { From 036a32c95a5be03a61df4b19032ef4bfdfed9781 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 11:48:43 +0100 Subject: [PATCH 15/23] safeguards for columnar attribute range proxy Signed-off-by: Martijn Govers --- .../power_grid_model/auxiliary/dataset.hpp | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp index d758944d44..6b02a18bf9 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp @@ -83,10 +83,15 @@ class ColumnarAttributeRange : public std::ranges::view_interface { - AttributeType* buffer_ptr = reinterpret_cast(attribute_buffer.data) + idx_; - auto const& attribute_ref = meta_attribute.template get_attribute( - reinterpret_cast(&value)); - *buffer_ptr = attribute_ref; + if constexpr (std::same_as) { + AttributeType* buffer_ptr = reinterpret_cast(attribute_buffer.data) + idx_; + auto const& attribute_ref = meta_attribute.template get_attribute( + reinterpret_cast(&value)); + *buffer_ptr = attribute_ref; + } else { + throw UnreachableHit{"ColumnarAttributeRange::operator=", + "Attribute type should be identical to the return type!"}; + } }); } return *this; @@ -99,11 +104,16 @@ class ColumnarAttributeRange : public std::ranges::view_interface { - AttributeType const* buffer_ptr = - reinterpret_cast(attribute_buffer.data) + idx; - AttributeType& attribute_ref = - meta_attribute.template get_attribute(reinterpret_cast(&result)); - attribute_ref = *buffer_ptr; + if constexpr (std::same_as) { + AttributeType const* buffer_ptr = + reinterpret_cast(attribute_buffer.data) + idx; + AttributeType& attribute_ref = + meta_attribute.template get_attribute(reinterpret_cast(&result)); + attribute_ref = *buffer_ptr; + } else { + throw UnreachableHit{"ColumnarAttributeRange::get", + "Attribute type should be identical to the return type!"}; + } }); } return result; From 4ca6f145958ddaf102ce72331ba6cc0564b8bc1b Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 11:51:47 +0100 Subject: [PATCH 16/23] small fix Signed-off-by: Martijn Govers --- .../include/power_grid_model/auxiliary/dataset.hpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp index 6b02a18bf9..1257d0d440 100644 --- a/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp +++ b/power_grid_model_c/power_grid_model/include/power_grid_model/auxiliary/dataset.hpp @@ -83,14 +83,14 @@ class ColumnarAttributeRange : public std::ranges::view_interface { - if constexpr (std::same_as) { + if constexpr (sizeof(AttributeType) <= sizeof(value_type)) { AttributeType* buffer_ptr = reinterpret_cast(attribute_buffer.data) + idx_; auto const& attribute_ref = meta_attribute.template get_attribute( reinterpret_cast(&value)); *buffer_ptr = attribute_ref; } else { throw UnreachableHit{"ColumnarAttributeRange::operator=", - "Attribute type should be identical to the return type!"}; + "AttributeType larger than value_type!"}; } }); } @@ -104,15 +104,14 @@ class ColumnarAttributeRange : public std::ranges::view_interface { - if constexpr (std::same_as) { + if constexpr (sizeof(AttributeType) <= sizeof(value_type)) { AttributeType const* buffer_ptr = reinterpret_cast(attribute_buffer.data) + idx; AttributeType& attribute_ref = meta_attribute.template get_attribute(reinterpret_cast(&result)); attribute_ref = *buffer_ptr; } else { - throw UnreachableHit{"ColumnarAttributeRange::get", - "Attribute type should be identical to the return type!"}; + throw UnreachableHit{"ColumnarAttributeRange::get", "AttributeType larger than value_type!"}; } }); } From 7507da738c08f6c1a3a3c6a76e827b9ab09901bc Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 12:06:51 +0100 Subject: [PATCH 17/23] test whether it works now Signed-off-by: Martijn Govers --- .github/workflows/build-test-release.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index ea2cae9197..13982735f7 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -202,7 +202,10 @@ jobs: - name: Set up gcc if: runner.os == 'Linux' run: | - sudo apt-get install -y ninja-build gcc-14 g++-14 + sudo apt-get update + sudo apt-get install -y ninja-build gcc-14 g++-14 clang-18 + sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang + sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ sudo ln -s /usr/bin/gcc-14 /usr/local/bin/gcc sudo ln -s /usr/bin/g++-14 /usr/local/bin/g++ From 46f8519b1a36019114c5ece715fbc89a694882f6 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 12:25:34 +0100 Subject: [PATCH 18/23] verbose python compilation Signed-off-by: Martijn Govers --- .github/workflows/build-test-release.yml | 322 +++++++++++------------ pyproject.toml | 4 +- 2 files changed, 164 insertions(+), 162 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index 13982735f7..ab6c352b18 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -59,116 +59,116 @@ jobs: name: wheelhouse path: ./wheelhouse/*.tar.gz - build-cpp-test-linux: - runs-on: ubuntu-24.04 - strategy: - matrix: - build-option: [ debug, release ] - compiler: [gcc, clang] - include: - - compiler: gcc - - compiler: clang - - env: - CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew - PRESET: ci-${{ matrix.compiler }}-${{ matrix.build-option }} - HOMEBREW_FORCE_BREWED_CURL: 1 - - steps: - - uses: actions/checkout@v6 - - name: Install packages - run: | - sudo apt-get update - sudo apt-get install -y ninja-build gcc-14 g++-14 clang-18 - sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang - sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ - sudo ln -s /usr/bin/gcc-14 /usr/local/bin/gcc - sudo ln -s /usr/bin/g++-14 /usr/local/bin/g++ - - - name: Install uv - uses: astral-sh/setup-uv@v7 + # build-cpp-test-linux: + # runs-on: ubuntu-24.04 + # strategy: + # matrix: + # build-option: [ debug, release ] + # compiler: [gcc, clang] + # include: + # - compiler: gcc + # - compiler: clang + + # env: + # CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew + # PRESET: ci-${{ matrix.compiler }}-${{ matrix.build-option }} + # HOMEBREW_FORCE_BREWED_CURL: 1 + + # steps: + # - uses: actions/checkout@v6 + # - name: Install packages + # run: | + # sudo apt-get update + # sudo apt-get install -y ninja-build gcc-14 g++-14 clang-18 + # sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang + # sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ + # sudo ln -s /usr/bin/gcc-14 /usr/local/bin/gcc + # sudo ln -s /usr/bin/g++-14 /usr/local/bin/g++ + + # - name: Install uv + # uses: astral-sh/setup-uv@v7 - - name: Install pgm-build-dependencies - run: | - uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl - pgm-build-setup-ga-ci + # - name: Install pgm-build-dependencies + # run: | + # uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl + # pgm-build-setup-ga-ci - - name: Build and test - run: ./build.sh -p ${{ env.PRESET }} -e -i -t + # - name: Build and test + # run: ./build.sh -p ${{ env.PRESET }} -e -i -t - build-cpp-test-windows: - runs-on: windows-latest - strategy: - matrix: - build-option: [ debug, release ] - compiler: [msvc, clang-cl] + # build-cpp-test-windows: + # runs-on: windows-latest + # strategy: + # matrix: + # build-option: [ debug, release ] + # compiler: [msvc, clang-cl] - env: - PRESET: ${{ matrix.compiler }}-${{ matrix.build-option }} + # env: + # PRESET: ${{ matrix.compiler }}-${{ matrix.build-option }} - steps: - - uses: actions/checkout@v6 + # steps: + # - uses: actions/checkout@v6 - - name: Install uv - uses: astral-sh/setup-uv@v7 + # - name: Install uv + # uses: astral-sh/setup-uv@v7 - - name: Install pgm-build-dependencies - run: | - uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl - pgm-build-setup-ga-ci + # - name: Install pgm-build-dependencies + # run: | + # uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl + # pgm-build-setup-ga-ci - - uses: ./.github/actions/enable-msvc - if: runner.os == 'Windows' + # - uses: ./.github/actions/enable-msvc + # if: runner.os == 'Windows' - - name: Build and test - run: | - # Resolve dirty PATH environment - # TODO(mgovers): Remove after https://github.com/actions/runner-images/issues/10001 is resolved - $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';' - - # generate cmake cache - cmake --preset ${{ env.PRESET }} -DCMAKE_PREFIX_PATH=C:\conda_envs\cpp_pkgs\Library; if(!$?) { Exit $LASTEXITCODE } - # build - cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } - # test - ctest --preset ${{ env.PRESET }} --output-on-failure; if(!$?) { Exit $LASTEXITCODE } - # install - cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } - - # build and run integration test - cd tests/package_tests; if(!$?) { Exit $LASTEXITCODE } - cmake --preset ${{ env.PRESET }}; if(!$?) { Exit $LASTEXITCODE } - cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } - cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } - install\${{ env.PRESET }}\bin\power_grid_model_package_test; if(!$?) { Exit $LASTEXITCODE } - - build-cpp-test-macos: - runs-on: macos-15 - strategy: - matrix: - build-option: [ debug, release ] - env: - CMAKE_PREFIX_PATH: /usr/local - PRESET: ci-clang-${{ matrix.build-option }} - - steps: - - uses: actions/checkout@v6 - - - name: Set up XCode - uses: maxim-lobanov/setup-xcode@v1 - with: - xcode-version: latest-stable - - - name: Install uv - uses: astral-sh/setup-uv@v7 + # - name: Build and test + # run: | + # # Resolve dirty PATH environment + # # TODO(mgovers): Remove after https://github.com/actions/runner-images/issues/10001 is resolved + # $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';' + + # # generate cmake cache + # cmake --preset ${{ env.PRESET }} -DCMAKE_PREFIX_PATH=C:\conda_envs\cpp_pkgs\Library; if(!$?) { Exit $LASTEXITCODE } + # # build + # cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } + # # test + # ctest --preset ${{ env.PRESET }} --output-on-failure; if(!$?) { Exit $LASTEXITCODE } + # # install + # cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } + + # # build and run integration test + # cd tests/package_tests; if(!$?) { Exit $LASTEXITCODE } + # cmake --preset ${{ env.PRESET }}; if(!$?) { Exit $LASTEXITCODE } + # cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } + # cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } + # install\${{ env.PRESET }}\bin\power_grid_model_package_test; if(!$?) { Exit $LASTEXITCODE } + + # build-cpp-test-macos: + # runs-on: macos-15 + # strategy: + # matrix: + # build-option: [ debug, release ] + # env: + # CMAKE_PREFIX_PATH: /usr/local + # PRESET: ci-clang-${{ matrix.build-option }} + + # steps: + # - uses: actions/checkout@v6 + + # - name: Set up XCode + # uses: maxim-lobanov/setup-xcode@v1 + # with: + # xcode-version: latest-stable + + # - name: Install uv + # uses: astral-sh/setup-uv@v7 - - name: Install pgm-build-dependencies - run: | - uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl - pgm-build-setup-ga-ci + # - name: Install pgm-build-dependencies + # run: | + # uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl + # pgm-build-setup-ga-ci - - name: Build and test - run: ./build.sh -p ${{ env.PRESET }} -e -i -t + # - name: Build and test + # run: ./build.sh -p ${{ env.PRESET }} -e -i -t build-and-test-python: strategy: @@ -234,69 +234,69 @@ jobs: name: wheelhouse-${{ matrix.platform }} path: ./wheelhouse/*.whl - build-and-test-conda: - name: Build and test in Conda - - runs-on: ${{ matrix.os }}-latest - strategy: - matrix: - os: ["ubuntu", "windows"] # We do not test conda for MacOS - include: - - os: ubuntu - shell: bash -el {0} - - os: windows - shell: powershell - env: - POWER_GRID_MODEL_NO_BINARY_BUILD: 1 - - defaults: - run: - shell: ${{ matrix.shell }} - steps: - - uses: actions/checkout@v6 - - - uses: conda-incubator/setup-miniconda@v3 - with: - miniforge-version: latest # use miniforge instead of miniconda - activate-environment: conda-pgm-env - environment-file: .github/conda_pgm_env.yml - auto-activate-base: false - channels: conda-forge - conda-remove-defaults: "true" + # build-and-test-conda: + # name: Build and test in Conda + + # runs-on: ${{ matrix.os }}-latest + # strategy: + # matrix: + # os: ["ubuntu", "windows"] # We do not test conda for MacOS + # include: + # - os: ubuntu + # shell: bash -el {0} + # - os: windows + # shell: powershell + # env: + # POWER_GRID_MODEL_NO_BINARY_BUILD: 1 + + # defaults: + # run: + # shell: ${{ matrix.shell }} + # steps: + # - uses: actions/checkout@v6 + + # - uses: conda-incubator/setup-miniconda@v3 + # with: + # miniforge-version: latest # use miniforge instead of miniconda + # activate-environment: conda-pgm-env + # environment-file: .github/conda_pgm_env.yml + # auto-activate-base: false + # channels: conda-forge + # conda-remove-defaults: "true" - - name: List conda - run: | - conda info - conda list - - - name: Enable MSVC - uses: ./.github/actions/enable-msvc - if: runner.os == 'Windows' - - - name: Enable gcc/g++ - if: matrix.os == 'ubuntu' - run: | - conda install -y gcc_linux-64 gxx_linux-64 - - - name: Build and install cmake target for Windows - if: matrix.os == 'windows' - run: | - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . - cmake --build build/ --verbose -j1 - cmake --install build/ --prefix ${env:CONDA_PREFIX}/Library - - - name: Build and install cmake target for Linux - if: matrix.os == 'ubuntu' - run: | - cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_PREFIX_PATH=$CONDA_PREFIX - cmake --build build/ --verbose -j1 - cmake --install build/ - - - name: Build python - run: python -m pip install . --no-build-isolation --no-deps -C wheel.cmake=false - - - name: Test - run: pytest + # - name: List conda + # run: | + # conda info + # conda list + + # - name: Enable MSVC + # uses: ./.github/actions/enable-msvc + # if: runner.os == 'Windows' + + # - name: Enable gcc/g++ + # if: matrix.os == 'ubuntu' + # run: | + # conda install -y gcc_linux-64 gxx_linux-64 + + # - name: Build and install cmake target for Windows + # if: matrix.os == 'windows' + # run: | + # cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . + # cmake --build build/ --verbose -j1 + # cmake --install build/ --prefix ${env:CONDA_PREFIX}/Library + + # - name: Build and install cmake target for Linux + # if: matrix.os == 'ubuntu' + # run: | + # cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_PREFIX_PATH=$CONDA_PREFIX + # cmake --build build/ --verbose -j1 + # cmake --install build/ + + # - name: Build python + # run: python -m pip install . --no-build-isolation --no-deps -C wheel.cmake=false + + # - name: Test + # run: pytest github-release: name: Create and release assets to GitHub diff --git a/pyproject.toml b/pyproject.toml index 4da16335b8..0373b9c87d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,11 +76,13 @@ Discussion = "https://github.com/orgs/PowerGridModel/discussions" power_grid_model = "power_grid_model._core.power_grid_model_c" [tool.scikit-build] -logging.level = "INFO" +logging.level = "DEBUG" cmake.version = ">=3.23" cmake.build-type = "Release" cmake.args = ["-GNinja"] +cmake.verbose = true + build-dir = "build" From 2258e0ccfe0878ddcd1fa11b39b17a12bc70d148 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 12:41:21 +0100 Subject: [PATCH 19/23] before-all cibw reinstall gcc Signed-off-by: Martijn Govers --- .github/workflows/build-test-release.yml | 10 ---------- CMakePresets.json | 2 +- power_grid_model_c/power_grid_model_c/CMakeLists.txt | 4 ++-- pyproject.toml | 3 ++- 4 files changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index ab6c352b18..e1ba1b0168 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -199,16 +199,6 @@ jobs: name: version path: . - - name: Set up gcc - if: runner.os == 'Linux' - run: | - sudo apt-get update - sudo apt-get install -y ninja-build gcc-14 g++-14 clang-18 - sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang - sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ - sudo ln -s /usr/bin/gcc-14 /usr/local/bin/gcc - sudo ln -s /usr/bin/g++-14 /usr/local/bin/g++ - - uses: ./.github/actions/enable-msvc if: runner.os == 'Windows' diff --git a/CMakePresets.json b/CMakePresets.json index a4e01a49e0..055f0e1af8 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -109,7 +109,7 @@ { "name": "unix-sanitizer", "environment": { - "SANITIZER_FLAGS": "-fstack-protector -fsanitize=address,pointer-compare,undefined" + "SANITIZER_FLAGS": "-fstack-protector -fsanitize=address,pointer-compare,undefined -fno-sanitize-recover" }, "inherits": "unix-base", "hidden": true diff --git a/power_grid_model_c/power_grid_model_c/CMakeLists.txt b/power_grid_model_c/power_grid_model_c/CMakeLists.txt index a7c3836415..96f21adc7e 100644 --- a/power_grid_model_c/power_grid_model_c/CMakeLists.txt +++ b/power_grid_model_c/power_grid_model_c/CMakeLists.txt @@ -63,14 +63,14 @@ if(PGM_ENABLE_HARDENING) target_compile_options( power_grid_model_c BEFORE - PRIVATE "-fstack-protector" "-fsanitize=undefined" + PRIVATE "-fstack-protector" "-fsanitize=undefined" "-fno-sanitize-recover=undefined" ) endif() target_link_options( power_grid_model_c BEFORE PRIVATE - "$<$,$>:-fstack-protector;-fsanitize=undefined>" + "$<$,$>:-fstack-protector;-fsanitize=undefined;-fno-sanitize-recover=undefined>" "$<$:-static-libubsan>" "$<$:-lubsan>" ) diff --git a/pyproject.toml b/pyproject.toml index 0373b9c87d..33531efdd5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -211,7 +211,8 @@ skip = ["pp*", "*-musllinux_aarch64"] [tool.cibuildwheel.linux] archs = ["x86_64", "aarch64"] -environment = { CC = "gcc", CXX = "g++" } +before-all = """yum install -y gcc-14 g++-14""" +environment = { CC = "gcc-14", CXX = "g++-14" } manylinux-x86_64-image = "manylinux_2_28" manylinux-aarch64-image = "manylinux_2_28" musllinux-x86_64-image = "musllinux_1_2" From f87f5c3026f026e98c9cbd8cb2937a2b1d072070 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 12:44:29 +0100 Subject: [PATCH 20/23] re-enable github Signed-off-by: Martijn Govers --- .github/workflows/build-test-release.yml | 322 +++++++++++------------ 1 file changed, 161 insertions(+), 161 deletions(-) diff --git a/.github/workflows/build-test-release.yml b/.github/workflows/build-test-release.yml index e1ba1b0168..360cd33ec9 100644 --- a/.github/workflows/build-test-release.yml +++ b/.github/workflows/build-test-release.yml @@ -59,116 +59,116 @@ jobs: name: wheelhouse path: ./wheelhouse/*.tar.gz - # build-cpp-test-linux: - # runs-on: ubuntu-24.04 - # strategy: - # matrix: - # build-option: [ debug, release ] - # compiler: [gcc, clang] - # include: - # - compiler: gcc - # - compiler: clang - - # env: - # CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew - # PRESET: ci-${{ matrix.compiler }}-${{ matrix.build-option }} - # HOMEBREW_FORCE_BREWED_CURL: 1 - - # steps: - # - uses: actions/checkout@v6 - # - name: Install packages - # run: | - # sudo apt-get update - # sudo apt-get install -y ninja-build gcc-14 g++-14 clang-18 - # sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang - # sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ - # sudo ln -s /usr/bin/gcc-14 /usr/local/bin/gcc - # sudo ln -s /usr/bin/g++-14 /usr/local/bin/g++ - - # - name: Install uv - # uses: astral-sh/setup-uv@v7 + build-cpp-test-linux: + runs-on: ubuntu-24.04 + strategy: + matrix: + build-option: [ debug, release ] + compiler: [gcc, clang] + include: + - compiler: gcc + - compiler: clang + + env: + CMAKE_PREFIX_PATH: /home/linuxbrew/.linuxbrew + PRESET: ci-${{ matrix.compiler }}-${{ matrix.build-option }} + HOMEBREW_FORCE_BREWED_CURL: 1 + + steps: + - uses: actions/checkout@v6 + - name: Install packages + run: | + sudo apt-get update + sudo apt-get install -y ninja-build gcc-14 g++-14 clang-18 + sudo ln -s /usr/bin/clang-18 /usr/local/bin/clang + sudo ln -s /usr/bin/clang++-18 /usr/local/bin/clang++ + sudo ln -s /usr/bin/gcc-14 /usr/local/bin/gcc + sudo ln -s /usr/bin/g++-14 /usr/local/bin/g++ + + - name: Install uv + uses: astral-sh/setup-uv@v7 - # - name: Install pgm-build-dependencies - # run: | - # uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl - # pgm-build-setup-ga-ci + - name: Install pgm-build-dependencies + run: | + uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl + pgm-build-setup-ga-ci - # - name: Build and test - # run: ./build.sh -p ${{ env.PRESET }} -e -i -t + - name: Build and test + run: ./build.sh -p ${{ env.PRESET }} -e -i -t - # build-cpp-test-windows: - # runs-on: windows-latest - # strategy: - # matrix: - # build-option: [ debug, release ] - # compiler: [msvc, clang-cl] + build-cpp-test-windows: + runs-on: windows-latest + strategy: + matrix: + build-option: [ debug, release ] + compiler: [msvc, clang-cl] - # env: - # PRESET: ${{ matrix.compiler }}-${{ matrix.build-option }} + env: + PRESET: ${{ matrix.compiler }}-${{ matrix.build-option }} - # steps: - # - uses: actions/checkout@v6 + steps: + - uses: actions/checkout@v6 - # - name: Install uv - # uses: astral-sh/setup-uv@v7 + - name: Install uv + uses: astral-sh/setup-uv@v7 - # - name: Install pgm-build-dependencies - # run: | - # uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl - # pgm-build-setup-ga-ci + - name: Install pgm-build-dependencies + run: | + uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl + pgm-build-setup-ga-ci - # - uses: ./.github/actions/enable-msvc - # if: runner.os == 'Windows' + - uses: ./.github/actions/enable-msvc + if: runner.os == 'Windows' - # - name: Build and test - # run: | - # # Resolve dirty PATH environment - # # TODO(mgovers): Remove after https://github.com/actions/runner-images/issues/10001 is resolved - # $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';' - - # # generate cmake cache - # cmake --preset ${{ env.PRESET }} -DCMAKE_PREFIX_PATH=C:\conda_envs\cpp_pkgs\Library; if(!$?) { Exit $LASTEXITCODE } - # # build - # cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } - # # test - # ctest --preset ${{ env.PRESET }} --output-on-failure; if(!$?) { Exit $LASTEXITCODE } - # # install - # cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } - - # # build and run integration test - # cd tests/package_tests; if(!$?) { Exit $LASTEXITCODE } - # cmake --preset ${{ env.PRESET }}; if(!$?) { Exit $LASTEXITCODE } - # cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } - # cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } - # install\${{ env.PRESET }}\bin\power_grid_model_package_test; if(!$?) { Exit $LASTEXITCODE } - - # build-cpp-test-macos: - # runs-on: macos-15 - # strategy: - # matrix: - # build-option: [ debug, release ] - # env: - # CMAKE_PREFIX_PATH: /usr/local - # PRESET: ci-clang-${{ matrix.build-option }} - - # steps: - # - uses: actions/checkout@v6 - - # - name: Set up XCode - # uses: maxim-lobanov/setup-xcode@v1 - # with: - # xcode-version: latest-stable - - # - name: Install uv - # uses: astral-sh/setup-uv@v7 + - name: Build and test + run: | + # Resolve dirty PATH environment + # TODO(mgovers): Remove after https://github.com/actions/runner-images/issues/10001 is resolved + $env:PATH = ($env:PATH -split ';' | Where-Object { $_ -ne 'C:\Program Files\LLVM\bin' }) -join ';' + + # generate cmake cache + cmake --preset ${{ env.PRESET }} -DCMAKE_PREFIX_PATH=C:\conda_envs\cpp_pkgs\Library; if(!$?) { Exit $LASTEXITCODE } + # build + cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } + # test + ctest --preset ${{ env.PRESET }} --output-on-failure; if(!$?) { Exit $LASTEXITCODE } + # install + cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } + + # build and run integration test + cd tests/package_tests; if(!$?) { Exit $LASTEXITCODE } + cmake --preset ${{ env.PRESET }}; if(!$?) { Exit $LASTEXITCODE } + cmake --build --preset ${{ env.PRESET }} --verbose -j 1; if(!$?) { Exit $LASTEXITCODE } + cmake --build --preset ${{ env.PRESET }} --verbose -j 1 --target install; if(!$?) { Exit $LASTEXITCODE } + install\${{ env.PRESET }}\bin\power_grid_model_package_test; if(!$?) { Exit $LASTEXITCODE } + + build-cpp-test-macos: + runs-on: macos-15 + strategy: + matrix: + build-option: [ debug, release ] + env: + CMAKE_PREFIX_PATH: /usr/local + PRESET: ci-clang-${{ matrix.build-option }} + + steps: + - uses: actions/checkout@v6 + + - name: Set up XCode + uses: maxim-lobanov/setup-xcode@v1 + with: + xcode-version: latest-stable + + - name: Install uv + uses: astral-sh/setup-uv@v7 - # - name: Install pgm-build-dependencies - # run: | - # uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl - # pgm-build-setup-ga-ci + - name: Install pgm-build-dependencies + run: | + uv tool install https://github.com/PowerGridModel/pgm-build-dependencies/releases/latest/download/pgm_build_dependencies-0.1.0-py3-none-any.whl + pgm-build-setup-ga-ci - # - name: Build and test - # run: ./build.sh -p ${{ env.PRESET }} -e -i -t + - name: Build and test + run: ./build.sh -p ${{ env.PRESET }} -e -i -t build-and-test-python: strategy: @@ -224,69 +224,69 @@ jobs: name: wheelhouse-${{ matrix.platform }} path: ./wheelhouse/*.whl - # build-and-test-conda: - # name: Build and test in Conda - - # runs-on: ${{ matrix.os }}-latest - # strategy: - # matrix: - # os: ["ubuntu", "windows"] # We do not test conda for MacOS - # include: - # - os: ubuntu - # shell: bash -el {0} - # - os: windows - # shell: powershell - # env: - # POWER_GRID_MODEL_NO_BINARY_BUILD: 1 - - # defaults: - # run: - # shell: ${{ matrix.shell }} - # steps: - # - uses: actions/checkout@v6 - - # - uses: conda-incubator/setup-miniconda@v3 - # with: - # miniforge-version: latest # use miniforge instead of miniconda - # activate-environment: conda-pgm-env - # environment-file: .github/conda_pgm_env.yml - # auto-activate-base: false - # channels: conda-forge - # conda-remove-defaults: "true" + build-and-test-conda: + name: Build and test in Conda + + runs-on: ${{ matrix.os }}-latest + strategy: + matrix: + os: ["ubuntu", "windows"] # We do not test conda for MacOS + include: + - os: ubuntu + shell: bash -el {0} + - os: windows + shell: powershell + env: + POWER_GRID_MODEL_NO_BINARY_BUILD: 1 + + defaults: + run: + shell: ${{ matrix.shell }} + steps: + - uses: actions/checkout@v6 + + - uses: conda-incubator/setup-miniconda@v3 + with: + miniforge-version: latest # use miniforge instead of miniconda + activate-environment: conda-pgm-env + environment-file: .github/conda_pgm_env.yml + auto-activate-base: false + channels: conda-forge + conda-remove-defaults: "true" - # - name: List conda - # run: | - # conda info - # conda list - - # - name: Enable MSVC - # uses: ./.github/actions/enable-msvc - # if: runner.os == 'Windows' - - # - name: Enable gcc/g++ - # if: matrix.os == 'ubuntu' - # run: | - # conda install -y gcc_linux-64 gxx_linux-64 - - # - name: Build and install cmake target for Windows - # if: matrix.os == 'windows' - # run: | - # cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . - # cmake --build build/ --verbose -j1 - # cmake --install build/ --prefix ${env:CONDA_PREFIX}/Library - - # - name: Build and install cmake target for Linux - # if: matrix.os == 'ubuntu' - # run: | - # cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_PREFIX_PATH=$CONDA_PREFIX - # cmake --build build/ --verbose -j1 - # cmake --install build/ - - # - name: Build python - # run: python -m pip install . --no-build-isolation --no-deps -C wheel.cmake=false - - # - name: Test - # run: pytest + - name: List conda + run: | + conda info + conda list + + - name: Enable MSVC + uses: ./.github/actions/enable-msvc + if: runner.os == 'Windows' + + - name: Enable gcc/g++ + if: matrix.os == 'ubuntu' + run: | + conda install -y gcc_linux-64 gxx_linux-64 + + - name: Build and install cmake target for Windows + if: matrix.os == 'windows' + run: | + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . + cmake --build build/ --verbose -j1 + cmake --install build/ --prefix ${env:CONDA_PREFIX}/Library + + - name: Build and install cmake target for Linux + if: matrix.os == 'ubuntu' + run: | + cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/ -S . -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX -DCMAKE_PREFIX_PATH=$CONDA_PREFIX + cmake --build build/ --verbose -j1 + cmake --install build/ + + - name: Build python + run: python -m pip install . --no-build-isolation --no-deps -C wheel.cmake=false + + - name: Test + run: pytest github-release: name: Create and release assets to GitHub From 2f4597be67c5998da4730d03a2b73fdca016fd85 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 12:47:26 +0100 Subject: [PATCH 21/23] install gcc-toolset instead Signed-off-by: Martijn Govers --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 33531efdd5..9ced36e6d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -211,7 +211,8 @@ skip = ["pp*", "*-musllinux_aarch64"] [tool.cibuildwheel.linux] archs = ["x86_64", "aarch64"] -before-all = """yum install -y gcc-14 g++-14""" +before-all = """yum install -y gcc-toolset-14 && \ + source /opt/rh/gcc-toolset-14/enable""" environment = { CC = "gcc-14", CXX = "g++-14" } manylinux-x86_64-image = "manylinux_2_28" manylinux-aarch64-image = "manylinux_2_28" From da8a3dd463158ac7d87f787a9542ba9cacc5e79c Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Fri, 16 Jan 2026 12:50:45 +0100 Subject: [PATCH 22/23] use correct version Signed-off-by: Martijn Govers --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9ced36e6d4..7d08ebe19f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -213,7 +213,7 @@ skip = ["pp*", "*-musllinux_aarch64"] archs = ["x86_64", "aarch64"] before-all = """yum install -y gcc-toolset-14 && \ source /opt/rh/gcc-toolset-14/enable""" -environment = { CC = "gcc-14", CXX = "g++-14" } +environment = { CC = "gcc", CXX = "g++" } manylinux-x86_64-image = "manylinux_2_28" manylinux-aarch64-image = "manylinux_2_28" musllinux-x86_64-image = "musllinux_1_2" From 53e2856164a45326202049c8b7958620a81cb233 Mon Sep 17 00:00:00 2001 From: Martijn Govers Date: Mon, 19 Jan 2026 09:10:14 +0100 Subject: [PATCH 23/23] remove old comment regarding disabling python3.14 Signed-off-by: Martijn Govers --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 7d08ebe19f..31aab07dc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -206,7 +206,6 @@ test-command = "pytest {package}/tests" # we do not support # PyPy # musllinux in aarch64 -# disable Python 3.14 for now until it is released skip = ["pp*", "*-musllinux_aarch64"] [tool.cibuildwheel.linux]