From 8f164f7d0032892fc43cd8b3303da6556be425ea Mon Sep 17 00:00:00 2001 From: Laurent Perron Date: Thu, 12 Dec 2024 15:25:18 +0100 Subject: [PATCH] fix highs for bazel 8 (#3396) Fix missing files in glob bump dependencies add patch file vs fresh github clone @bazel-io skip_check unstable_url --- modules/highs/1.8.1.bcr.1/MODULE.bazel | 17 ++++++++++++ .../1.8.1.bcr.1/patches/build_dot_bazel.patch | 20 ++++++++++++++ .../1.8.1.bcr.1/patches/dot_bazelrc.patch | 7 +++++ .../patches/module_dot_bazel.patch | 26 +++++++++++++++++++ modules/highs/1.8.1.bcr.1/presubmit.yml | 22 ++++++++++++++++ modules/highs/1.8.1.bcr.1/source.json | 11 ++++++++ modules/highs/metadata.json | 3 ++- 7 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 modules/highs/1.8.1.bcr.1/MODULE.bazel create mode 100644 modules/highs/1.8.1.bcr.1/patches/build_dot_bazel.patch create mode 100644 modules/highs/1.8.1.bcr.1/patches/dot_bazelrc.patch create mode 100644 modules/highs/1.8.1.bcr.1/patches/module_dot_bazel.patch create mode 100644 modules/highs/1.8.1.bcr.1/presubmit.yml create mode 100644 modules/highs/1.8.1.bcr.1/source.json diff --git a/modules/highs/1.8.1.bcr.1/MODULE.bazel b/modules/highs/1.8.1.bcr.1/MODULE.bazel new file mode 100644 index 00000000000..624029bd6e3 --- /dev/null +++ b/modules/highs/1.8.1.bcr.1/MODULE.bazel @@ -0,0 +1,17 @@ +module( + name = "highs", + version = "1.8.1.bcr.1", +) + +bazel_dep( + name = "bazel_skylib", + version = "1.7.1", +) +bazel_dep( + name = "rules_cc", + version = "0.0.16", +) +bazel_dep( + name = "zlib", + version = "1.3.1.bcr.3", +) diff --git a/modules/highs/1.8.1.bcr.1/patches/build_dot_bazel.patch b/modules/highs/1.8.1.bcr.1/patches/build_dot_bazel.patch new file mode 100644 index 00000000000..805cd45f573 --- /dev/null +++ b/modules/highs/1.8.1.bcr.1/patches/build_dot_bazel.patch @@ -0,0 +1,20 @@ +diff --git a/BUILD.bazel b/BUILD.bazel +index c8b6070d0..f028ad5f3 100644 +--- a/BUILD.bazel ++++ b/BUILD.bazel +@@ -18,7 +18,6 @@ cc_library( + name = "highs", + srcs = glob([ + "extern/filereaderlp/*.cpp", +- "extern/zlib/*.cpp", + "src/interfaces/highs_c_api.cpp", + "src/io/*.cpp", + "src/ipm/*.cpp", +@@ -37,7 +36,6 @@ cc_library( + "src/util/*.cpp", + ]), + hdrs = glob([ +- "HConfig.h", + "**/*.h", + "src/qpsolver/*.hpp", + "src/Highs.h", diff --git a/modules/highs/1.8.1.bcr.1/patches/dot_bazelrc.patch b/modules/highs/1.8.1.bcr.1/patches/dot_bazelrc.patch new file mode 100644 index 00000000000..9ae4f1b4180 --- /dev/null +++ b/modules/highs/1.8.1.bcr.1/patches/dot_bazelrc.patch @@ -0,0 +1,7 @@ +diff --git a/.bazelrc b/.bazelrc +index 710c4d81a..4980d66e3 100644 +--- a/.bazelrc ++++ b/.bazelrc +@@ -1,1 +1,1 @@ +-common --noenable_bzlmod ++# common --noenable_bzlmod diff --git a/modules/highs/1.8.1.bcr.1/patches/module_dot_bazel.patch b/modules/highs/1.8.1.bcr.1/patches/module_dot_bazel.patch new file mode 100644 index 00000000000..39f908fd23d --- /dev/null +++ b/modules/highs/1.8.1.bcr.1/patches/module_dot_bazel.patch @@ -0,0 +1,26 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +index adb22ca97..624029bd6 100644 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -1,17 +1,17 @@ + module( + name = "highs", +- version = "1.8.1", ++ version = "1.8.1.bcr.1", + ) + + bazel_dep( + name = "bazel_skylib", +- version = "1.6.1", ++ version = "1.7.1", + ) + bazel_dep( + name = "rules_cc", +- version = "0.0.9", ++ version = "0.0.16", + ) + bazel_dep( + name = "zlib", +- version = "1.3.1.bcr.1", ++ version = "1.3.1.bcr.3", + ) diff --git a/modules/highs/1.8.1.bcr.1/presubmit.yml b/modules/highs/1.8.1.bcr.1/presubmit.yml new file mode 100644 index 00000000000..9e4829ccde3 --- /dev/null +++ b/modules/highs/1.8.1.bcr.1/presubmit.yml @@ -0,0 +1,22 @@ +matrix: + platform: + - debian10 + - ubuntu2004 + - macos + - macos_arm64 + bazel: + - 8.x + - 7.x + - 6.x +tasks: + verify_targets: + name: Verify build targets + platform: ${{ platform }} + bazel: ${{ bazel }} + build_flags: + - '--cxxopt=-std=c++17' + - '--cxxopt=-Wno-sign-compare' + - '--host_cxxopt=-std=c++17' + - '--host_cxxopt=-Wno-sign-compare' + build_targets: + - '@highs//...' diff --git a/modules/highs/1.8.1.bcr.1/source.json b/modules/highs/1.8.1.bcr.1/source.json new file mode 100644 index 00000000000..1cdc15e67b0 --- /dev/null +++ b/modules/highs/1.8.1.bcr.1/source.json @@ -0,0 +1,11 @@ +{ + "url": "https://github.com/ERGO-Code/HiGHS/archive/refs/tags/v1.8.1.tar.gz", + "integrity": "sha256-oNCTcfrbVkiUl5lrKEM74e+RpwXjgR/LH1ChB8fUJ9E=", + "strip_prefix": "HiGHS-1.8.1", + "patches": { + "build_dot_bazel.patch": "sha256-vbqmeK5hsYM4StAduoxvMbvZq5vIvwaPwM2hgM48NYg=", + "dot_bazelrc.patch": "sha256-9DkONOfirjcFZf+o7npe3Uc7D6eYrjy/t6eQ0PVdFKw=", + "module_dot_bazel.patch": "sha256-oXTwXtvKdLSW9sCLZthhbzLko+TPdRC4g+z1cR1ZQOE=" + }, + "patch_strip": 1 +} diff --git a/modules/highs/metadata.json b/modules/highs/metadata.json index 00c7076c1f9..30812a3fda6 100644 --- a/modules/highs/metadata.json +++ b/modules/highs/metadata.json @@ -12,7 +12,8 @@ "versions": [ "1.7.0", "1.8.0", - "1.8.1" + "1.8.1", + "1.8.1.bcr.1" ], "yanked_versions": {} }