Skip to content

Commit

Permalink
[Integration image] Fix Abseil conflict between gRPC and or-tools (#32)
Browse files Browse the repository at this point in the history
I think this'll solve the problem. Gonna kick off the image build
blindly.
  • Loading branch information
teqdruid authored Jun 25, 2024
1 parent e50b281 commit f64307e
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 6 deletions.
12 changes: 8 additions & 4 deletions integration_test/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,18 @@ COPY *.sh /tmp/
# Install modern release of CMake
RUN /tmp/cmake.sh

# Compile, install, then cleanup gRPC
RUN /tmp/grpc.sh
RUN rm -r /tmp/grpc

# Compile, install, then cleanup Verilator
RUN /tmp/verilator.sh
RUN rm -r /tmp/verilator-*

# Install common dep for OR-Tools and gRPC.
RUN /tmp/abseil.sh
RUN rm -r /tmp/abseil-cpp

# Compile, install, then cleanup gRPC
RUN /tmp/grpc.sh
RUN rm -r /tmp/grpc

# Compile, install, then cleanup OR-Tools
RUN /tmp/or-tools.sh
RUN rm -r /tmp/or-tools-*
Expand Down
19 changes: 19 additions & 0 deletions integration_test/abseil.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

set -e

ABSL_VER=20220623.1

cd /tmp
git clone --recurse-submodules -b $ABSL_VER https://github.com/abseil/abseil-cpp.git
cd abseil-cpp

mkdir -p build
cd build
cmake -S .. -B . \
-G Ninja \
-DCMAKE_CXX_STANDARD=14 \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release
ninja -j$(nproc)
cmake --install .
5 changes: 4 additions & 1 deletion integration_test/grpc.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/usr/bin/env bash

set -e

# Installs gRPC from source.

cd /tmp
Expand All @@ -17,8 +19,9 @@ cd cmake/build
cmake -S ../.. -B . \
-G Ninja \
-DgRPC_INSTALL=ON \
-DgRPC_ABSL_PROVIDER=package \
-DCMAKE_BUILD_TYPE=Release
ninja -j$(nproc)
ninja install
cmake --install .

echo "Done."
19 changes: 18 additions & 1 deletion integration_test/or-tools.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash
# Downloads, compiles, and installs OR-Tools into /usr

set -e

OR_TOOLS_VER=9.5

# Disable fetching and building SCIP below because of its license:
Expand All @@ -13,6 +15,21 @@ wget https://github.com/google/or-tools/archive/v$OR_TOOLS_VER.tar.gz
tar -zxf v$OR_TOOLS_VER.tar.gz
rm v$OR_TOOLS_VER.tar.gz
cd or-tools-$OR_TOOLS_VER
cmake -S . -B build -DBUILD_DEPS=ON -DBUILD_SAMPLES=OFF -DBUILD_EXAMPLES=OFF -DBUILD_FLATZINC=OFF -DUSE_SCIP=OFF
cmake -S . -B build \
-DBUILD_DEPS=OFF \
-DBUILD_SAMPLES=OFF \
-DBUILD_EXAMPLES=OFF \
-DBUILD_FLATZINC=OFF \
-DUSE_SCIP=OFF \
-DBUILD_re2=ON \
-DBUILD_Eigen3=ON \
-DBUILD_CoinUtils=ON \
-DBUILD_Osi=ON \
-DBUILD_Clp=ON \
-DBUILD_Cgl=ON \
-DBUILD_Cbc=ON \
-DBUILD_GLPK=ON \
-DBUILD_HIGHS=ON

cmake --build build --parallel $(nproc)
cmake --install build --prefix /usr

0 comments on commit f64307e

Please sign in to comment.