Skip to content

Commit

Permalink
bump to or-tools v9.9
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Mar 13, 2024
1 parent a7d12d6 commit 95bd7ea
Show file tree
Hide file tree
Showing 12 changed files with 280 additions and 526 deletions.
13 changes: 7 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
common --noenable_bzlmod

# ----CONFIG OPTIONS----
build --flag_alias=with_bop=//ortools/linear_solver:with_bop
build --flag_alias=with_cbc=//ortools/linear_solver:with_cbc
build --flag_alias=with_clp=//ortools/linear_solver:with_clp
build --flag_alias=with_cp_sat=//ortools/linear_solver:with_cp_sat
build --flag_alias=with_glop=//ortools/linear_solver:with_glop
build --flag_alias=with_glpk=//ortools/linear_solver:with_glpk
build --flag_alias=with_highs=//ortools/linear_solver:with_highs
Expand All @@ -18,12 +21,10 @@ build --apple_platform_type=macos
# platform.
build --enable_platform_specific_config

build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
build:linux --host_cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
build:macos --cxxopt="-std=c++17" --features=-supports_dynamic_linker --cxxopt=-Wno-sign-compare
build:macos --host_cxxopt="-std=c++17" --features=-supports_dynamic_linker --cxxopt=-Wno-sign-compare
build:windows --cxxopt="/std:c++20"
build:windows --host_cxxopt="/std:c++20"
build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare
build:macos --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare --cxxopt=-mmacos-version-min=10.15 --features=-supports_dynamic_linker
build:macos --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare --host_cxxopt=-mmacos-version-min=10.15
build:windows --cxxopt="/std:c++20" --host_cxxopt="/std:c++20"

# Print command lines for build commands.
# build --subcommands=pretty_print
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ On any *\*NIX* (MacOS, GNU/Linux) platform:
bazel build --cxxopt=-std=c++20 //main:template
```

On Windows when using *MSVC 2019+*:
On Windows when using *MSVC 2022+*:
```cmd
bazel build --cxxopt="-std:c++20" ///main:template
```
Expand All @@ -48,7 +48,7 @@ On any *\*NIX* (MacOS, GNU/Linux) platform:
bazel test --cxxopt=-std=c++20 //main:template
```

On Windows when using *MSVC 2019+*:
On Windows when using *MSVC 2022+*:
```cmd
bazel test --cxxopt="-std:c++20" ///main:template
```
Expand Down
63 changes: 23 additions & 40 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository", "new_git_r
## Bazel Skylib rules.
git_repository(
name = "bazel_skylib",
tag = "1.4.2",
tag = "1.5.0",
remote = "https://github.com/bazelbuild/bazel-skylib.git",
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
Expand All @@ -16,7 +16,7 @@ bazel_skylib_workspace()
## Bazel rules.
git_repository(
name = "platforms",
tag = "0.0.7",
tag = "0.0.8",
remote = "https://github.com/bazelbuild/platforms.git",
)

Expand All @@ -32,42 +32,13 @@ git_repository(
remote = "https://github.com/bazelbuild/rules_proto.git",
)

git_repository(
name = "rules_java",
tag = "6.4.0",
#tag = "6.5.1",
remote = "https://github.com/bazelbuild/rules_java.git",
)

git_repository(
name = "rules_jvm_external",
tag = "5.2",
#tag = "5.3",
remote = "https://github.com/bazelbuild/rules_jvm_external.git",
)

git_repository(
name = "contrib_rules_jvm",
tag = "v0.9.0",
#tag = "v0.14.0",
remote = "https://github.com/bazel-contrib/rules_jvm.git",
)

git_repository(
name = "rules_python",
tag = "0.26.0",
remote = "https://github.com/bazelbuild/rules_python.git",
)

load("@rules_python//python:repositories.bzl", "py_repositories")
py_repositories()

# Dependencies

## Abseil-cpp
git_repository(
name = "com_google_absl",
tag = "20230802.1",
patches = ["//patches:abseil-cpp-20230802.1.patch"],
tag = "20240116.1",
patches = ["//patches:abseil-cpp-20240116.1.patch"],
patch_args = ["-p1"],
remote = "https://github.com/abseil/abseil-cpp.git",
)
Expand All @@ -78,9 +49,9 @@ git_repository(
# This statement defines the @com_google_protobuf repo.
git_repository(
name = "com_google_protobuf",
tag = "v25.0",
patches = ["//patches:protobuf-v25.0.patch"],
patches = ["//patches:protobuf-v25.3.patch"],
patch_args = ["-p1"],
tag = "v25.3",
remote = "https://github.com/protocolbuffers/protobuf.git",
)
# Load common dependencies.
Expand All @@ -89,19 +60,18 @@ protobuf_deps()

http_archive(
name = "bliss",
build_file = "//bazel:bliss.BUILD",
build_file = "//bazel:bliss.BUILD.bazel",
patches = ["//bazel:bliss-0.73.patch"],
sha256 = "f57bf32804140cad58b1240b804e0dbd68f7e6bf67eba8e0c0fa3a62fd7f0f84",
url = "https://github.com/google/or-tools/releases/download/v9.0/bliss-0.73.zip",
#url = "http://www.tcs.hut.fi/Software/bliss/bliss-0.73.zip",
)

new_git_repository(
name = "scip",
build_file = "//bazel:scip.BUILD.bazel",
patches = ["//bazel:scip.patch"],
patch_args = ["-p1"],
tag = "v804",
tag = "v810",
remote = "https://github.com/scipopt/scip.git",
)

Expand All @@ -126,6 +96,19 @@ cc_library(
git_repository(
name = "com_google_ortools",
#branch = "main",
tag = "v9.8",
tag = "v9.9",
remote = "https://github.com/google/or-tools.git",
)

## Testing
git_repository(
name = "com_google_googletest",
tag = "v1.13.0",
remote = "https://github.com/google/googletest.git",
)

git_repository(
name = "com_google_benchmark",
tag = "v1.8.3",
remote = "https://github.com/google/benchmark.git",
)
18 changes: 2 additions & 16 deletions bazel/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -11,23 +11,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_python//python:pip.bzl", "compile_pip_requirements")

exports_files([
"gtest.BUILD",
"glpk.BUILD",
"pcre2.BUILD",
"pcre2.patch",
"re2.patch",
"bliss.BUILD.bazel",
"bliss-0.73.patch",
"scip.BUILD.bazel",
"scip.patch",
"swig.BUILD",
"swig.patch",
"bliss.BUILD",
"bliss-0.73.patch",
"archive_helper.bzl",
"notebook_requirements.in",
"notebook_requirements.txt",
"ortools_requirements.in",
"ortools_requirements.txt",
])
15 changes: 14 additions & 1 deletion bazel/bliss.BUILD → bazel/bliss.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright 2010-2024 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

cc_library(
name = "libbliss",
srcs = [
Expand Down Expand Up @@ -27,4 +40,4 @@ cc_library(
],
includes = ["."],
visibility = ["//visibility:public"],
)
)
18 changes: 17 additions & 1 deletion bazel/scip.BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# Copyright 2010-2024 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

exports_files(
["src/lpi/lpi_glop.cpp"],
)
Expand Down Expand Up @@ -64,12 +77,14 @@ cc_library(
],
exclude = [
"src/lpi/lpi_*.c",
"src/nauty/*",
"src/scip/exprinterpret_*.c",
"src/scip/nlpi_filtersqp.c",
"src/scip/nlpi_worhp.c",
"src/scip/compr_xyz.c",
"src/scip/*_xyz.c",
"src/scip/sorttpl.c",
"src/symmetry/compute_symmetry_*.cpp",
"src/symmetry/*nauty*",
"src/tpi/tpi_*.c",
],
) + BLISS_FILE + [
Expand All @@ -87,6 +102,7 @@ cc_library(
exclude =
[
#"src/scip/prop_symmetry.h",
"src/scip/*_xyz.h",
]),
copts = [
"$(STACK_FRAME_UNLIMITED)", # src/scip/reader_cnf.c
Expand Down
Loading

0 comments on commit 95bd7ea

Please sign in to comment.