Skip to content

Commit

Permalink
fix highs for bazel 8 (#3396)
Browse files Browse the repository at this point in the history
Fix missing files in glob

bump dependencies 

add patch file vs fresh github clone

@bazel-io skip_check unstable_url
  • Loading branch information
lperron authored Dec 12, 2024
1 parent 2cec619 commit 8f164f7
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 1 deletion.
17 changes: 17 additions & 0 deletions modules/highs/1.8.1.bcr.1/MODULE.bazel
Original file line number Diff line number Diff line change
@@ -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",
)
20 changes: 20 additions & 0 deletions modules/highs/1.8.1.bcr.1/patches/build_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -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",
7 changes: 7 additions & 0 deletions modules/highs/1.8.1.bcr.1/patches/dot_bazelrc.patch
Original file line number Diff line number Diff line change
@@ -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
26 changes: 26 additions & 0 deletions modules/highs/1.8.1.bcr.1/patches/module_dot_bazel.patch
Original file line number Diff line number Diff line change
@@ -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",
)
22 changes: 22 additions & 0 deletions modules/highs/1.8.1.bcr.1/presubmit.yml
Original file line number Diff line number Diff line change
@@ -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//...'
11 changes: 11 additions & 0 deletions modules/highs/1.8.1.bcr.1/source.json
Original file line number Diff line number Diff line change
@@ -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
}
3 changes: 2 additions & 1 deletion modules/highs/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
"versions": [
"1.7.0",
"1.8.0",
"1.8.1"
"1.8.1",
"1.8.1.bcr.1"
],
"yanked_versions": {}
}

0 comments on commit 8f164f7

Please sign in to comment.