From 43ead490e25c1e3165660520e17750b18f8bdae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20A=CC=81lvaro?= Date: Tue, 23 Apr 2024 09:01:56 +0200 Subject: [PATCH] catboost-cli(formula): 1.2.5 --- Formula/catboost-cli.rb | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/Formula/catboost-cli.rb b/Formula/catboost-cli.rb index ef0738f..e828806 100644 --- a/Formula/catboost-cli.rb +++ b/Formula/catboost-cli.rb @@ -1,9 +1,27 @@ +require "yaml" + +module Utils + extend ::Utils + + def self.add_clang_version_to_conan_settings(version) + system "conan", "config", "init" + conan_home = safe_popen_read("conan", "config", "home").strip + settings_file = "#{conan_home}/settings.yml" + settings = YAML.load_file(settings_file, aliases: true) + clang_versions = settings["compiler"]["clang"]["version"] + unless clang_versions.include?(version) + clang_versions << version + File.write(settings_file, YAML.dump(settings)) + end + end +end + class CatboostCli < Formula desc "Fast, scalable, high performance Gradient Boosting on Decision Trees cli tool" homepage "https://catboost.ai" url "https://github.com/catboost/catboost.git", - tag: "v1.2.3", - revision: "fe0941b208f9c392ce788c314463b6816d335c6a" + tag: "v1.2.5", + revision: "2605fe627ed4271aa8a87ff3564fb68de5f116f0" license "Apache-2.0" head "https://github.com/catboost/catboost.git", branch: "master" @@ -28,6 +46,8 @@ class CatboostCli < Formula end def install + Utils.add_clang_version_to_conan_settings(Formula["llvm"].version.major.to_s) if ENV.key?("GITHUB_ACTIONS") + args = [ "-DCATBOOST_COMPONENTS=app", "-DHAVE_CUDA=NO",