Skip to content

Commit

Permalink
[trivial] Rename DOWNWARD_CPLEX_ROOT to cplex_DIR and fix remaining D…
Browse files Browse the repository at this point in the history
…OWNWARD_SOPLEX_ROOT.
  • Loading branch information
remochristen committed Sep 15, 2023
1 parent 6b192cd commit a0fb5a0
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
CC: ${{ matrix.version.cc }}
CXX: ${{ matrix.version.cxx }}
CPLEX_URL: ${{ secrets.CPLEX2211_LINUX_URL }}
DOWNWARD_CPLEX_ROOT: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex
cplex_DIR: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex
CPLEX_LIB: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex/bin/x86-64_linux/libcplex2211.so
soplex_DIR: /home/runner/lib/soplex-6.0.3x
SOPLEX_LIB: /home/runner/lib/soplex-6.0.3x/lib/
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
# We redirect output of wget to hide the secret URLs.
wget -O cplex_installer $CPLEX_URL &> /dev/null
chmod +x cplex_installer
./cplex_installer -DLICENSE_ACCEPTED=TRUE -DUSER_INSTALL_DIR="$(dirname "${DOWNWARD_CPLEX_ROOT}")" -i silent
./cplex_installer -DLICENSE_ACCEPTED=TRUE -DUSER_INSTALL_DIR="$(dirname "${cplex_DIR}")" -i silent
rm cplex_installer
# Always install SoPlex
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ env:
CC: cl
CXX: cl

DOWNWARD_CPLEX_ROOT: D:\a\downward\cplex
cplex_DIR: D:\a\downward\cplex

CPLEX_URL: "${{ secrets.CPLEX2211_WINDOWS_URL }}"
ZLIB_URL: "https://www.zlib.net/zlib13.zip"
Expand Down
8 changes: 4 additions & 4 deletions misc/releases/templates/_Dockerfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
ENV CXX g++
# TODO: on next release, replace this with a tagged SoPlex release > 6.0.3.
ENV SOPLEX_REVISION a5df081
ENV DOWNWARD_SOPLEX_ROOT /opt/soplex
ENV soplex_DIR /opt/soplex

# Install SoPlex.
WORKDIR /workspace/soplex
Expand All @@ -32,7 +32,7 @@ WORKDIR /workspace/soplex
# another distribution mechanism.
RUN git clone --branch master https://github.com/scipopt/soplex.git . && \
git checkout $SOPLEX_REVISION && \
cmake -DCMAKE_INSTALL_PREFIX="$DOWNWARD_SOPLEX_ROOT" -S . -B build && \
cmake -DCMAKE_INSTALL_PREFIX="$soplex_DIR" -S . -B build && \
cmake --build build && \
cmake --install build

Expand Down Expand Up @@ -61,7 +61,7 @@ COPY --from=builder /workspace/downward/builds/debug/bin/ ./builds/debug/bin/
COPY --from=builder /workspace/downward/driver ./driver
COPY --from=builder /opt/soplex /opt/soplex

ENV DOWNWARD_SOPLEX_ROOT=/opt/soplex
ENV LD_LIBRARY_PATH=$DOWNWARD_SOPLEX_ROOT/lib
ENV soplex_DIR=/opt/soplex
ENV LD_LIBRARY_PATH=$soplex_DIR/lib

ENTRYPOINT ["/workspace/downward/fast-downward.py"]
6 changes: 3 additions & 3 deletions misc/releases/templates/_Vagrantfile.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Vagrant.configure("2") do |config|
if [ -f "$CPLEX_INSTALLER" ]; then
# Set environment variables for CPLEX.
cat > /etc/profile.d/downward-cplex.sh <<-EOM
export DOWNWARD_CPLEX_ROOT="/opt/ibm/ILOG/CPLEX_Studio2211/cplex"
export cplex_DIR="/opt/ibm/ILOG/CPLEX_Studio2211/cplex"
EOM
source /etc/profile.d/downward-cplex.sh

Expand All @@ -53,13 +53,13 @@ Vagrant.configure("2") do |config|

# Set environment variables for SoPlex.
cat > /etc/profile.d/downward-soplex.sh <<-EOM
export DOWNWARD_SOPLEX_ROOT="/opt/soplex"
export soplex_DIR="/opt/soplex"
EOM
source /etc/profile.d/downward-soplex.sh
git clone --branch master https://github.com/scipopt/soplex.git soplex
cd soplex
git checkout a5df081
cmake -DCMAKE_INSTALL_PREFIX="$DOWNWARD_SOPLEX_ROOT" -S . -B build
cmake -DCMAKE_INSTALL_PREFIX="$soplex_DIR" -S . -B build
cmake --build build
cmake --install build

Expand Down
2 changes: 1 addition & 1 deletion misc/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ commands =
[testenv:build]
changedir = {toxinidir}/../
passenv =
DOWNWARD_CPLEX_ROOT
cplex_DIR
soplex_DIR
commands =
./build.py
Expand Down
4 changes: 2 additions & 2 deletions src/search/cmake/FindCplex.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
# target_link_libraries(<target> PRIVATE cplex::cplex)
#
# The location of CPLEX can be specified using the environment variable
# or cmake parameter DOWNWARD_CPLEX_ROOT.
# or cmake parameter cplex_DIR.
#
# The standard FIND_PACKAGE features are supported (QUIET, REQUIRED, etc.).

set(IMPORTED_CONFIGURATIONS "Debug" "Release")
set(HINT_PATHS ${DOWNWARD_CPLEX_ROOT} $ENV{DOWNWARD_CPLEX_ROOT})
set(HINT_PATHS ${cplex_DIR} $ENV{cplex_DIR})

add_library(cplex::cplex IMPORTED SHARED)
set_target_properties(cplex::cplex PROPERTIES
Expand Down

0 comments on commit a0fb5a0

Please sign in to comment.