Skip to content

Commit

Permalink
big sync with main
Browse files Browse the repository at this point in the history
  • Loading branch information
lperron committed Nov 13, 2024
1 parent 3bf66db commit af212e1
Show file tree
Hide file tree
Showing 229 changed files with 5,321 additions and 1,642 deletions.
17 changes: 12 additions & 5 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
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
Expand All @@ -21,10 +19,19 @@ build --apple_platform_type=macos
# platform.
build --enable_platform_specific_config

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 --cxxopt=-Wno-dangling-field --features=-supports_dynamic_linker
# Fix the python version
build --@rules_python//python/config_settings:python_version=3.12

# Per platform parameters.
build:linux --cxxopt="-std=c++17" --cxxopt=-Wno-sign-compare
build:linux --host_cxxopt="-std=c++17" --host_cxxopt=-Wno-sign-compare

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

build:windows --cxxopt="/std:c++20"
build:windows --host_cxxopt="/std:c++20"

# Enable the runfiles symlink tree on Windows. This makes it possible to build
# the pip package on Windows without an intermediate data-file archive, as the
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ cache/
**/.vscode/*
.DS_Store
**/.vs/*
/.helix
/compile_commands.json

ortools/linear_solver/lpi_glop.cc

Expand Down Expand Up @@ -106,3 +108,6 @@ CMakeFiles
DartConfiguration.tcl
*build*/*
build/

# Ignore Bzlmod lock file until it is more stable
MODULE.bazel.lock
150 changes: 150 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################

OR_TOOLS_VERSION = "10.0.0"

module(
name = "or-tools",
repo_name = "com_google_ortools",
version = OR_TOOLS_VERSION,
)

bazel_dep(name = "abseil-cpp", version = "20240722.0", repo_name = "com_google_absl")
bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "contrib_rules_jvm", version = "0.27.0")
bazel_dep(name = "eigen", version = "3.4.0.bcr.1")
bazel_dep(name = "gazelle", version = "0.39.1", repo_name = "bazel_gazelle")
bazel_dep(name = "glpk", version = "5.0.bcr.1")
bazel_dep(name = "google_benchmark", version = "1.8.5", repo_name = "com_google_benchmark")
bazel_dep(name = "googletest", version = "1.15.2", repo_name = "com_google_googletest")
bazel_dep(name = "highs", version = "1.8.0")
bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "protobuf", version = "28.3", repo_name = "com_google_protobuf")
bazel_dep(name = "pybind11_abseil", version = "202402.0", repo_name = "org_pybind11_abseil")
bazel_dep(name = "pybind11_bazel", version = "2.13.6")
bazel_dep(name = "pybind11_protobuf", version = "0.0.0-20240524-1d7a729")
bazel_dep(name = "re2", version = "2024-07-02", repo_name = "com_google_re2")
bazel_dep(name = "rules_cc", version = "0.0.10")
bazel_dep(name = "rules_go", version = "0.50.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "rules_java", version = "7.12.2")
bazel_dep(name = "rules_jvm_external", version = "6.4")
bazel_dep(name = "rules_license", version = "1.0.0")
bazel_dep(name = "rules_proto", version = "6.0.2")
bazel_dep(name = "rules_python", version = "0.37.2")
bazel_dep(name = "scip", version = "8.1.0")
bazel_dep(name = "swig", version = "4.2.0")
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")

git_override(
module_name = "pybind11_abseil",
commit = "70f8b693b3b70573ca785ef62d9f48054f45d786",
patches = ["//patches:pybind11_abseil.patch"],
patch_strip = 1,
remote = "https://github.com/pybind/pybind11_abseil.git",
)

SUPPORTED_PYTHON_VERSIONS = [
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13",
]

DEFAULT_PYTHON = "3.11"

python = use_extension("@rules_python//python/extensions:python.bzl", "python", dev_dependency=True)
[
python.toolchain(
python_version = version,
is_default = version == DEFAULT_PYTHON,
)
for version in SUPPORTED_PYTHON_VERSIONS
]

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")

[
pip.parse(
hub_name = "ortools_pip_deps",
python_version = python_version,
requirements_lock = "//bazel:ortools_requirements.txt",
)
for python_version in SUPPORTED_PYTHON_VERSIONS
]

[
pip.parse(
hub_name = "ortools_notebook_deps",
python_version = python_version,
requirements_lock = "//bazel:notebook_requirements.txt",
)
for python_version in SUPPORTED_PYTHON_VERSIONS
]

use_repo(pip, pip_deps = "ortools_pip_deps")
use_repo(pip, "ortools_notebook_deps")

JUNIT_PLATFORM_VERSION = "1.9.2"

JUNIT_JUPITER_VERSION = "5.9.2"

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
maven.install(
artifacts = [
"net.java.dev.jna:jna:5.14.0",
"com.google.truth:truth:0.32",
"org.junit.platform:junit-platform-launcher:%s" % JUNIT_PLATFORM_VERSION,
"org.junit.platform:junit-platform-reporting:%s" % JUNIT_PLATFORM_VERSION,
"org.junit.jupiter:junit-jupiter-api:%s" % JUNIT_JUPITER_VERSION,
"org.junit.jupiter:junit-jupiter-params:%s" % JUNIT_JUPITER_VERSION,
"org.junit.jupiter:junit-jupiter-engine:%s" % JUNIT_JUPITER_VERSION,
],
repositories = [
"https://repo1.maven.org/maven2",
],
)
use_repo(maven, "maven")

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.22.4")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.module(
path = "github.com/golang/glog",
sum = "h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY=",
version = "v1.2.2",
)
go_deps.module(
path = "github.com/golang/protobuf",
sum = "h1:LUVKkCeviFUMKqHa4tXIIij/lbhnMbP7Fn5wKdKkRh4=",
version = "v1.5.0",
)
go_deps.module(
path = "github.com/google/go-cmp",
sum = "h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=",
version = "v0.6.0",
)
go_deps.module(
path = "google.golang.org/protobuf",
sum = "h1:6xV6lTsCfpGD21XK49h7MhtcApnLqkfYgPcdHftf6hg=",
version = "v1.34.2",
)
go_deps.module(
path = "golang.org/x/xerrors",
sum = "h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4=",
version = "v0.0.0-20191204190536-9bdfabe68543",
)
use_repo(
go_deps,
"com_github_golang_glog",
"com_github_golang_protobuf",
"com_github_google_go_cmp",
"org_golang_google_protobuf",
"org_golang_x_xerrors",
)
2 changes: 1 addition & 1 deletion Version.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
OR_TOOLS_MAJOR=9
OR_TOOLS_MINOR=11
OR_TOOLS_MINOR=12
#PRE_RELEASE=YES
Loading

0 comments on commit af212e1

Please sign in to comment.