From 1e240f65c0eb094842c28024352af0b2dce67284 Mon Sep 17 00:00:00 2001 From: "power-grid-model-ci-bot[bot]" <249743335+power-grid-model-ci-bot[bot]@users.noreply.github.com> Date: Tue, 20 Oct 2026 02:08:37 +0000 Subject: [PATCH 1/3] Sync version Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- Formula/power-grid-model.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/power-grid-model.rb b/Formula/power-grid-model.rb index 05233ce..91dc25d 100644 --- a/Formula/power-grid-model.rb +++ b/Formula/power-grid-model.rb @@ -5,8 +5,8 @@ class PowerGridModel < Formula desc "Python/C++ library for distribution power system analysis" homepage "https://lfenergy.org/projects/power-grid-model/" - url "https://github.com/PowerGridModel/power-grid-model/archive/refs/tags/v1.13.196.tar.gz" - sha256 "d42f484091b54e23ec0fc7bf6373c4f8524be0c86bef368a3e5ed9f06aaefe36" + url "https://github.com/PowerGridModel/power-grid-model/archive/refs/tags/v1.13.197.tar.gz" + sha256 "2d677450c70d92014541877eb4339cb56266b0d82a11cca541e5af99dd4e8630" license "MPL-2.0" head "https://github.com/PowerGridModel/power-grid-model.git", branch: "main" From aaa4f4bfb5193e6724fc26b117cdaf7fb1da3583 Mon Sep 17 00:00:00 2001 From: Santiago Figueroa Manrique Date: Wed, 21 Oct 2026 14:06:47 +0200 Subject: [PATCH 2/3] pin to ubuntu 26.04 Signed-off-by: Santiago Figueroa Manrique --- .github/workflows/sync-version.yml | 2 +- .github/workflows/validate-formula.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sync-version.yml b/.github/workflows/sync-version.yml index 5b84196..526f018 100644 --- a/.github/workflows/sync-version.yml +++ b/.github/workflows/sync-version.yml @@ -11,7 +11,7 @@ on: jobs: sync-version: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 steps: - name: generate GitHub App token diff --git a/.github/workflows/validate-formula.yml b/.github/workflows/validate-formula.yml index 1c32ef6..29b1408 100644 --- a/.github/workflows/validate-formula.yml +++ b/.github/workflows/validate-formula.yml @@ -10,7 +10,7 @@ on: jobs: validate-formula: - runs-on: ubuntu-latest + runs-on: ubuntu-26.04 steps: - name: Checkout repository From b7af2dbb40480dd218d907254305f5921a4c420f Mon Sep 17 00:00:00 2001 From: Santiago Figueroa Manrique Date: Wed, 21 Oct 2026 14:07:23 +0200 Subject: [PATCH 3/3] use gcc16 for linux Signed-off-by: Santiago Figueroa Manrique --- Formula/power-grid-model.rb | 35 ++++++-------------- formula_generation/power-grid-model.rb.jinja | 35 ++++++-------------- 2 files changed, 20 insertions(+), 50 deletions(-) diff --git a/Formula/power-grid-model.rb b/Formula/power-grid-model.rb index 91dc25d..4ffcac3 100644 --- a/Formula/power-grid-model.rb +++ b/Formula/power-grid-model.rb @@ -13,38 +13,23 @@ class PowerGridModel < Formula depends_on "boost" => :build depends_on "cmake" => :build depends_on "eigen" => :build - depends_on "gcc@14" => :build depends_on "msgpack-cxx" => :build depends_on "ninja" => :build depends_on "nlohmann-json" => :build + on_linux do + depends_on "gcc@16" => :build + end + + fails_with :gcc do + version "15" + cause "Use the same GCC version as in main PGM" + end + def install rm buildpath/"VERSION" (buildpath/"VERSION").write(version.to_s) - begin - system_gcc_version = Utils.safe_popen_read("gcc", "-dumpversion").strip.to_i - rescue - system_gcc_version = 0 - end - - user_cxx = ENV["CXX"].to_s - user_cc = ENV["CC"].to_s - using_non_gcc = (!user_cxx.empty? && user_cxx.exclude?("g++")) || - (!user_cc.empty? && user_cc.exclude?("gcc")) - - # If the user has not requested a non-GCC compiler and the system GCC version is less than 14, - # use the GCC 14 compiler from Homebrew. - # This minimum was added because we use some features in PGM not available in older versions of GCC. - if !using_non_gcc && system_gcc_version < 14 - gcc = Formula["gcc@14"] - system "cmake", "-GNinja", "-S", ".", "-B", "build", - "-DCMAKE_C_COMPILER=#{gcc.opt_bin}/gcc-14", - "-DCMAKE_CXX_COMPILER=#{gcc.opt_bin}/g++-14", - *std_cmake_args - else - system "cmake", "-GNinja", "-S", ".", "-B", "build", - *std_cmake_args - end + system "cmake", "-GNinja", "-S", ".", "-B", "build", *std_cmake_args system "cmake", "--build", "build" system "cmake", "--install", "build" end diff --git a/formula_generation/power-grid-model.rb.jinja b/formula_generation/power-grid-model.rb.jinja index 8c04298..7f72c61 100644 --- a/formula_generation/power-grid-model.rb.jinja +++ b/formula_generation/power-grid-model.rb.jinja @@ -13,38 +13,23 @@ class PowerGridModel < Formula depends_on "boost" => :build depends_on "cmake" => :build depends_on "eigen" => :build - depends_on "gcc@14" => :build depends_on "msgpack-cxx" => :build depends_on "ninja" => :build depends_on "nlohmann-json" => :build + on_linux do + depends_on "gcc@16" => :build + end + + fails_with :gcc do + version "15" + cause "Use the same GCC version as in main PGM" + end + def install rm buildpath/"VERSION" (buildpath/"VERSION").write(version.to_s) - begin - system_gcc_version = Utils.safe_popen_read("gcc", "-dumpversion").strip.to_i - rescue - system_gcc_version = 0 - end - - user_cxx = ENV["CXX"].to_s - user_cc = ENV["CC"].to_s - using_non_gcc = (!user_cxx.empty? && user_cxx.exclude?("g++")) || - (!user_cc.empty? && user_cc.exclude?("gcc")) - - # If the user has not requested a non-GCC compiler and the system GCC version is less than 14, - # use the GCC 14 compiler from Homebrew. - # This minimum was added because we use some features in PGM not available in older versions of GCC. - if !using_non_gcc && system_gcc_version < 14 - gcc = Formula["gcc@14"] - system "cmake", "-GNinja", "-S", ".", "-B", "build", - "-DCMAKE_C_COMPILER=#{gcc.opt_bin}/gcc-14", - "-DCMAKE_CXX_COMPILER=#{gcc.opt_bin}/g++-14", - *std_cmake_args - else - system "cmake", "-GNinja", "-S", ".", "-B", "build", - *std_cmake_args - end + system "cmake", "-GNinja", "-S", ".", "-B", "build", *std_cmake_args system "cmake", "--build", "build" system "cmake", "--install", "build" end