From 7f22b7208cee54804ed86392fc6de3f33ce6c351 Mon Sep 17 00:00:00 2001 From: Guillaume Chatelet Date: Mon, 15 Dec 2025 15:26:50 +0100 Subject: [PATCH] Create a presubmit CI (#4934) --- .github/workflows/amd64_docker_bazel.yml | 1 - .github/workflows/amd64_docker_cmake.yml | 1 - .github/workflows/amd64_linux_bazel.yml | 1 - .../amd64_linux_cmake_coinor_off.yml | 1 - .github/workflows/amd64_linux_cmake_cpp.yml | 1 - .../workflows/amd64_linux_cmake_dotnet.yml | 1 - .../workflows/amd64_linux_cmake_glpk_on.yml | 1 - .github/workflows/amd64_linux_cmake_java.yml | 1 - .../workflows/amd64_linux_cmake_python.yml | 1 - .../workflows/amd64_linux_cmake_scip_off.yml | 1 - .../amd64_linux_cmake_system_deps.yml | 1 - .github/workflows/amd64_macos_bazel.yml | 1 - .github/workflows/amd64_macos_cmake_cpp.yml | 1 - .../workflows/amd64_macos_cmake_dotnet.yml | 1 - .github/workflows/amd64_macos_cmake_java.yml | 1 - .../workflows/amd64_macos_cmake_python.yml | 1 - .github/workflows/amd64_windows_bazel.yml | 1 - .github/workflows/amd64_windows_cmake_cpp.yml | 1 - .../workflows/amd64_windows_cmake_dotnet.yml | 1 - .../workflows/amd64_windows_cmake_java.yml | 1 - .../workflows/amd64_windows_cmake_python.yml | 1 - .github/workflows/arm64_macos_bazel.yml | 1 - .github/workflows/arm64_macos_cmake_cpp.yml | 1 - .../workflows/arm64_macos_cmake_dotnet.yml | 1 - .github/workflows/arm64_macos_cmake_java.yml | 1 - .../workflows/arm64_macos_cmake_python.yml | 1 - .github/workflows/check_format.yml | 1 - .github/workflows/presubmit.yml | 127 ++++++++++++++++++ examples/contrib/issue4269.cc | 49 +++---- examples/cpp/xpress_use.cc | 22 +-- examples/tests/min_max_test.cc | 2 +- examples/tests/remote/tsp.cc | 2 +- ortools/math_opt/solvers/highs_solver_test.cc | 21 +-- 33 files changed, 176 insertions(+), 74 deletions(-) create mode 100644 .github/workflows/presubmit.yml diff --git a/.github/workflows/amd64_docker_bazel.yml b/.github/workflows/amd64_docker_bazel.yml index e080b36f07..902743dcbe 100644 --- a/.github/workflows/amd64_docker_bazel.yml +++ b/.github/workflows/amd64_docker_bazel.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_docker_cmake.yml b/.github/workflows/amd64_docker_cmake.yml index 25a54aa5d3..a9a541b9a4 100644 --- a/.github/workflows/amd64_docker_cmake.yml +++ b/.github/workflows/amd64_docker_cmake.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_bazel.yml b/.github/workflows/amd64_linux_bazel.yml index 6f437571f7..f53347522a 100644 --- a/.github/workflows/amd64_linux_bazel.yml +++ b/.github/workflows/amd64_linux_bazel.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_coinor_off.yml b/.github/workflows/amd64_linux_cmake_coinor_off.yml index 2553e51958..c6812d5cc1 100644 --- a/.github/workflows/amd64_linux_cmake_coinor_off.yml +++ b/.github/workflows/amd64_linux_cmake_coinor_off.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_cpp.yml b/.github/workflows/amd64_linux_cmake_cpp.yml index 44e2514c39..497f0887d3 100644 --- a/.github/workflows/amd64_linux_cmake_cpp.yml +++ b/.github/workflows/amd64_linux_cmake_cpp.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_dotnet.yml b/.github/workflows/amd64_linux_cmake_dotnet.yml index 545031c42f..354cd816f2 100644 --- a/.github/workflows/amd64_linux_cmake_dotnet.yml +++ b/.github/workflows/amd64_linux_cmake_dotnet.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_glpk_on.yml b/.github/workflows/amd64_linux_cmake_glpk_on.yml index f44fbdc8a2..1844adf6e1 100644 --- a/.github/workflows/amd64_linux_cmake_glpk_on.yml +++ b/.github/workflows/amd64_linux_cmake_glpk_on.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_java.yml b/.github/workflows/amd64_linux_cmake_java.yml index 59beb34a6a..796c376715 100644 --- a/.github/workflows/amd64_linux_cmake_java.yml +++ b/.github/workflows/amd64_linux_cmake_java.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_python.yml b/.github/workflows/amd64_linux_cmake_python.yml index 336b4410fe..9b0c082d18 100644 --- a/.github/workflows/amd64_linux_cmake_python.yml +++ b/.github/workflows/amd64_linux_cmake_python.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_scip_off.yml b/.github/workflows/amd64_linux_cmake_scip_off.yml index ac30f6a701..6689b1bd92 100644 --- a/.github/workflows/amd64_linux_cmake_scip_off.yml +++ b/.github/workflows/amd64_linux_cmake_scip_off.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_linux_cmake_system_deps.yml b/.github/workflows/amd64_linux_cmake_system_deps.yml index 6a4e822258..aed615d4b6 100644 --- a/.github/workflows/amd64_linux_cmake_system_deps.yml +++ b/.github/workflows/amd64_linux_cmake_system_deps.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_macos_bazel.yml b/.github/workflows/amd64_macos_bazel.yml index 37d47a14dd..6a431f70cd 100644 --- a/.github/workflows/amd64_macos_bazel.yml +++ b/.github/workflows/amd64_macos_bazel.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_macos_cmake_cpp.yml b/.github/workflows/amd64_macos_cmake_cpp.yml index 0d87081838..28964ae5a2 100644 --- a/.github/workflows/amd64_macos_cmake_cpp.yml +++ b/.github/workflows/amd64_macos_cmake_cpp.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_macos_cmake_dotnet.yml b/.github/workflows/amd64_macos_cmake_dotnet.yml index 0a01755e5b..455fc76f82 100644 --- a/.github/workflows/amd64_macos_cmake_dotnet.yml +++ b/.github/workflows/amd64_macos_cmake_dotnet.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_macos_cmake_java.yml b/.github/workflows/amd64_macos_cmake_java.yml index 97c49227b8..80e680ecb7 100644 --- a/.github/workflows/amd64_macos_cmake_java.yml +++ b/.github/workflows/amd64_macos_cmake_java.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_macos_cmake_python.yml b/.github/workflows/amd64_macos_cmake_python.yml index 564ea21495..72b961b480 100644 --- a/.github/workflows/amd64_macos_cmake_python.yml +++ b/.github/workflows/amd64_macos_cmake_python.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_windows_bazel.yml b/.github/workflows/amd64_windows_bazel.yml index ba5d515f2e..1f06be3260 100644 --- a/.github/workflows/amd64_windows_bazel.yml +++ b/.github/workflows/amd64_windows_bazel.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_windows_cmake_cpp.yml b/.github/workflows/amd64_windows_cmake_cpp.yml index fa3ecab501..20457d19a3 100644 --- a/.github/workflows/amd64_windows_cmake_cpp.yml +++ b/.github/workflows/amd64_windows_cmake_cpp.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_windows_cmake_dotnet.yml b/.github/workflows/amd64_windows_cmake_dotnet.yml index 0d689e045e..47269dbc65 100644 --- a/.github/workflows/amd64_windows_cmake_dotnet.yml +++ b/.github/workflows/amd64_windows_cmake_dotnet.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_windows_cmake_java.yml b/.github/workflows/amd64_windows_cmake_java.yml index 88d8960770..c67b1a72e8 100644 --- a/.github/workflows/amd64_windows_cmake_java.yml +++ b/.github/workflows/amd64_windows_cmake_java.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/amd64_windows_cmake_python.yml b/.github/workflows/amd64_windows_cmake_python.yml index bb6f549abf..7a1beb4c76 100644 --- a/.github/workflows/amd64_windows_cmake_python.yml +++ b/.github/workflows/amd64_windows_cmake_python.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/arm64_macos_bazel.yml b/.github/workflows/arm64_macos_bazel.yml index 108b996591..3a6ec458a8 100644 --- a/.github/workflows/arm64_macos_bazel.yml +++ b/.github/workflows/arm64_macos_bazel.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/arm64_macos_cmake_cpp.yml b/.github/workflows/arm64_macos_cmake_cpp.yml index e8486cd2f4..f9ee7eb27d 100644 --- a/.github/workflows/arm64_macos_cmake_cpp.yml +++ b/.github/workflows/arm64_macos_cmake_cpp.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/arm64_macos_cmake_dotnet.yml b/.github/workflows/arm64_macos_cmake_dotnet.yml index c278c19dd1..8b54e39e6c 100644 --- a/.github/workflows/arm64_macos_cmake_dotnet.yml +++ b/.github/workflows/arm64_macos_cmake_dotnet.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/arm64_macos_cmake_java.yml b/.github/workflows/arm64_macos_cmake_java.yml index e9dc560ee3..d859e8fa3f 100644 --- a/.github/workflows/arm64_macos_cmake_java.yml +++ b/.github/workflows/arm64_macos_cmake_java.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/arm64_macos_cmake_python.yml b/.github/workflows/arm64_macos_cmake_python.yml index 9865c48492..0fa219c609 100644 --- a/.github/workflows/arm64_macos_cmake_python.yml +++ b/.github/workflows/arm64_macos_cmake_python.yml @@ -6,7 +6,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/check_format.yml b/.github/workflows/check_format.yml index a8fff68bd3..9f18b2a5a8 100644 --- a/.github/workflows/check_format.yml +++ b/.github/workflows/check_format.yml @@ -5,7 +5,6 @@ on: branches: - main - v99bugfix - pull_request: workflow_dispatch: concurrency: diff --git a/.github/workflows/presubmit.yml b/.github/workflows/presubmit.yml new file mode 100644 index 0000000000..9cd9d456ae --- /dev/null +++ b/.github/workflows/presubmit.yml @@ -0,0 +1,127 @@ +# ref: https://github.com/actions/runner-images +name: Presubmit + +on: + pull_request: + branches: + - main + +concurrency: + group: ortools-presubmit + cancel-in-progress: true + +env: + PYTHON_VERSION: '3.12' + JAVA_DISTRIBUTION: 'temurin' + JAVA_VERSION: '17' + +jobs: +############################################################################### + clang-format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: jidicula/clang-format-action@v4.16.0 + with: + exclude-regex: '\.tab\.hh$' +############################################################################### + Bazel: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-15-intel, macos-latest, windows-2022] + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 + with: + distribution: ${{env.JAVA_DISTRIBUTION}} + java-version: ${{env.JAVA_VERSION}} + - uses: actions/setup-python@v6 + with: + python-version: ${{env.PYTHON_VERSION}} + - uses: bazel-contrib/setup-bazel@0.15.0 + - name: Build + run: bazel test --config=ci //ortools/... + shell: bash +############################################################################### + CMake: + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, macos-15-intel, macos-latest, windows-2022] + build: [cpp, java, dotnet, python] + include: + # Map build to CMake + - build: cpp + cmake: '' + - build: java + cmake: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_JAVA=ON -DSKIP_GPG=ON' + - build: dotnet + cmake: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_DOTNET=ON' + - build: python + cmake: '-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF -DBUILD_PYTHON=ON' + # Map os to platform / generator + - os: ubuntu-latest + platform: linux + generator: Ninja + - os: macos-15-intel + platform: macos + generator: Xcode + - os: macos-latest + platform: macos + generator: Xcode + - os: windows-2022 + platform: windows + generator: 'Visual Studio 17 2022' + runs-on: ${{matrix.os}} + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-java@v5 + if: ${{ matrix.build == 'java' }} + with: + distribution: ${{env.JAVA_DISTRIBUTION}} + java-version: ${{env.JAVA_VERSION}} + - uses: actions/setup-python@v6 + with: + python-version: ${{env.PYTHON_VERSION}} + - name: Setup linux + if: ${{ matrix.platform == 'linux' }} + run: sudo apt install -y ninja-build ccache swig + - name: Setup macos + if: ${{ matrix.platform == 'macos' }} + run: brew install ccache swig + - name: Setup Linux Python Env + if: ${{ matrix.build == 'python' && matrix.platform == 'linux' }} + run: echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Setup MacOs Python Env + if: ${{ matrix.build == 'python' && matrix.platform == 'macos' }} + run: | + echo "$HOME/Library/Python/${{env.PYTHON_VERSION}}/bin" >> $GITHUB_PATH + echo "$HOME/.local/bin" >> $GITHUB_PATH + - name: Setup Windows Python Env + if: ${{ matrix.build == 'python' && matrix.platform == 'windows' }} + run: | + python3 -m pip install --user mypy-protobuf absl-py setuptools wheel numpy pandas + echo "$((Get-Item ~).FullName)/AppData/Roaming/Python/Python312/Scripts" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append + - name: Config + run: > + cmake + -S. + -Bbuild + -G "${{matrix.generator}}" + -DBUILD_DEPS=ON + -DCMAKE_BUILD_TYPE=Release + -DCMAKE_C_FLAGS_RELEASE="-O1 -DNDEBUG" + -DCMAKE_CXX_FLAGS_RELEASE="-O1 -DNDEBUG" + -DCMAKE_INSTALL_PREFIX=install + -DUSE_COINOR=OFF + -DUSE_HIGHS=OFF + -DUSE_SCIP=OFF + ${{matrix.cmake}} + - name: Build + run: cmake --build build --config Release -j --target ${{ matrix.generator == 'Ninja' && 'all' || 'ALL_BUILD'}} + - name: Test + env: + CTEST_OUTPUT_ON_FAILURE: 1 + run: cmake --build build --config Release -j --target ${{ matrix.generator == 'Ninja' && 'test' || 'RUN_TESTS'}} diff --git a/examples/contrib/issue4269.cc b/examples/contrib/issue4269.cc index afb6dd8a1f..e091a24ff5 100644 --- a/examples/contrib/issue4269.cc +++ b/examples/contrib/issue4269.cc @@ -8,32 +8,33 @@ using namespace operations_research; using namespace operations_research::sat; int main() { - std::vector w = {3, 4, 5, 5}; - std::vector c = {9, 9}; + std::vector w = {3, 4, 5, 5}; + std::vector c = {9, 9}; - sat::CpModelBuilder builder; - std::vector> assignment(w.size()); - for (size_t i = 0; i < w.size(); i++) { - assignment[i].reserve(c.size()); - for (size_t j = 0; j < c.size(); j++) { - assignment[i].emplace_back(builder.NewBoolVar()); - } - builder.AddExactlyOne(assignment[i]); - } + sat::CpModelBuilder builder; + std::vector> assignment(w.size()); + for (size_t i = 0; i < w.size(); i++) { + assignment[i].reserve(c.size()); for (size_t j = 0; j < c.size(); j++) { - LinearExpr expr; - for (size_t i = 0; i < w.size(); i++) { - expr += LinearExpr::Term(assignment[i][j], w[i]); - } - builder.AddLinearConstraint(expr, Domain(0, c[j])); + assignment[i].emplace_back(builder.NewBoolVar()); } - sat::Model model; - sat::SatParameters parameters; - parameters.set_num_search_workers(4); - parameters.set_max_time_in_seconds(10.0); - model.Add(sat::NewSatParameters(parameters)); - auto response = sat::SolveCpModel(builder.Build(), &model); - if (response.status() == sat::CpSolverStatus::OPTIMAL || response.status() == sat::CpSolverStatus::FEASIBLE) { - std::cout << "all ok"; + builder.AddExactlyOne(assignment[i]); + } + for (size_t j = 0; j < c.size(); j++) { + LinearExpr expr; + for (size_t i = 0; i < w.size(); i++) { + expr += LinearExpr::Term(assignment[i][j], w[i]); } + builder.AddLinearConstraint(expr, Domain(0, c[j])); + } + sat::Model model; + sat::SatParameters parameters; + parameters.set_num_search_workers(4); + parameters.set_max_time_in_seconds(10.0); + model.Add(sat::NewSatParameters(parameters)); + auto response = sat::SolveCpModel(builder.Build(), &model); + if (response.status() == sat::CpSolverStatus::OPTIMAL || + response.status() == sat::CpSolverStatus::FEASIBLE) { + std::cout << "all ok"; + } } diff --git a/examples/cpp/xpress_use.cc b/examples/cpp/xpress_use.cc index bddc73d65a..7493e0eb90 100644 --- a/examples/cpp/xpress_use.cc +++ b/examples/cpp/xpress_use.cc @@ -25,7 +25,8 @@ using namespace operations_research; /** * This method shows two ways to initialize a Xpress solver instance. * Two environment variables are used to specify the Xpress installation paths: - * * XPRESSDIR : Path to the Xpress root directory (containing bin and lib folders) + * * XPRESSDIR : Path to the Xpress root directory containing bin and lib + * folders * * XPRESS : Path to the directory containing Xpress license */ void useXpressSolver(bool solveAsMip, bool useFactory) { @@ -36,9 +37,9 @@ void useXpressSolver(bool solveAsMip, bool useFactory) { std::string xpressName = (solveAsMip ? "XPRESS" : "XPRESS_LP"); solver.reset(MPSolver::CreateSolver(xpressName)); } else { - MPSolver::OptimizationProblemType problemType = (solveAsMip ? - MPSolver::XPRESS_MIXED_INTEGER_PROGRAMMING - : MPSolver::XPRESS_LINEAR_PROGRAMMING); + MPSolver::OptimizationProblemType problemType = + (solveAsMip ? MPSolver::XPRESS_MIXED_INTEGER_PROGRAMMING + : MPSolver::XPRESS_LINEAR_PROGRAMMING); /* MPSolver::SupportsProblemType(problem_type) will test if Xpress is correctly loaded and has a valid license. This check is important to keep the program running if Xpress is not correctly installed. With the @@ -46,12 +47,12 @@ void useXpressSolver(bool solveAsMip, bool useFactory) { with the license, the program will abort (SIGABRT) */ if (MPSolver::SupportsProblemType(problemType)) { - solver.reset(new MPSolver("IntegerProgrammingExample", problemType)); + solver.reset(new MPSolver("IntegerProgrammingExample", problemType)); } } if (solver == nullptr) { - LOG(WARNING) << "Xpress solver is not available"; - return; + LOG(WARNING) << "Xpress solver is not available"; + return; } // Use the solver /* @@ -78,7 +79,6 @@ void useXpressSolver(bool solveAsMip, bool useFactory) { c1->SetCoefficient(x1, 30.0); c1->SetCoefficient(x2, 3.5); - const MPSolver::ResultStatus result_status = solver->Solve(); // Check that the problem has an optimal solution. @@ -94,9 +94,9 @@ int main(int argc, char** argv) { InitGoogle(argv[0], &argc, &argv, true); std::cout << "start\n"; LOG(WARNING) << "start"; - for (bool solveAsMip: {true, false}) { - for (bool useFactory: {true, false}) { - useXpressSolver(solveAsMip, useFactory); + for (bool solveAsMip : {true, false}) { + for (bool useFactory : {true, false}) { + useXpressSolver(solveAsMip, useFactory); } } return EXIT_SUCCESS; diff --git a/examples/tests/min_max_test.cc b/examples/tests/min_max_test.cc index 38207c1289..2c905adecf 100644 --- a/examples/tests/min_max_test.cc +++ b/examples/tests/min_max_test.cc @@ -12,8 +12,8 @@ // limitations under the License. #include "absl/flags/parse.h" -#include "ortools/base/logging.h" #include "ortools/base/hash.h" +#include "ortools/base/logging.h" #include "ortools/base/map_util.h" #include "ortools/base/stl_util.h" #include "ortools/constraint_solver/constraint_solver.h" diff --git a/examples/tests/remote/tsp.cc b/examples/tests/remote/tsp.cc index e1386b9c2e..7493725256 100644 --- a/examples/tests/remote/tsp.cc +++ b/examples/tests/remote/tsp.cc @@ -26,9 +26,9 @@ #include "base/callback.h" #include "base/commandlineflags.h" -#include "base/types.h" #include "base/join.h" #include "base/random.h" +#include "base/types.h" #include "base/unique_ptr.h" #include "constraint_solver/routing.h" diff --git a/ortools/math_opt/solvers/highs_solver_test.cc b/ortools/math_opt/solvers/highs_solver_test.cc index a05b8fd9f7..199b845a42 100644 --- a/ortools/math_opt/solvers/highs_solver_test.cc +++ b/ortools/math_opt/solvers/highs_solver_test.cc @@ -224,16 +224,17 @@ INSTANTIATE_TEST_SUITE_P(HighsStatusTest, StatusTest, INSTANTIATE_TEST_SUITE_P( HighsMessageCallbackTest, MessageCallbackTest, - Values(MessageCallbackTestParams(SolverType::kHighs, - /*support_message_callback=*/true, - /*support_interrupter=*/false, - /*integer_variables=*/false, - /*ending_substring=*/"HiGHS run time"), - MessageCallbackTestParams(SolverType::kHighs, - /*support_message_callback=*/true, - /*support_interrupter=*/false, - /*integer_variables=*/true, - /*ending_substring=*/"LP iterations 0"))); + Values( + MessageCallbackTestParams(SolverType::kHighs, + /*support_message_callback=*/true, + /*support_interrupter=*/false, + /*integer_variables=*/false, + /*ending_substring=*/"HiGHS run time"), + MessageCallbackTestParams(SolverType::kHighs, + /*support_message_callback=*/true, + /*support_interrupter=*/false, + /*integer_variables=*/true, + /*ending_substring=*/"LP iterations 0"))); // HiGHS does not support callbacks other than message callback. GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(CallbackTest);