Skip to content

Commit

Permalink
Merge branch 'main' into issue1036.
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemensBuechner committed Aug 2, 2023
2 parents 9a11e00 + 7fe0ab0 commit d3a1e1e
Show file tree
Hide file tree
Showing 99 changed files with 795 additions and 3,006 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autodoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ jobs:
DOWNWARD_AUTODOC_PASSWORD: ${{ secrets.DOWNWARD_AUTODOC_PASSWORD }}
steps:
- name: Clone repository
uses: actions/checkout@master
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@master
uses: actions/setup-python@v4
with:
python-version: '3.10'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ jobs:
- {macos: macos-12, python: '3.10'}
steps:
- name: Clone repository
uses: actions/checkout@master
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@master
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version.python }}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ USER_INSTALL_DIR=D:\\a\\downward\\cplex_temp
#Copy examples
#-------------------
CPLEX_STUDIO_EXAMPLES_DIR=D:\\a\\downward\\cplex_examples
CPLEX_STUDIO_SAMPLE_COPY_NOT_ACTIVATED=0
CPLEX_STUDIO_SAMPLE_COPY_ACTIVATED=1

#Associate files with CPLEX
#--------------
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
runs-on: ubuntu-22.04
steps:
- name: Clone repository
uses: actions/checkout@master
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@master
uses: actions/setup-python@v4
with:
python-version: '3.10'

Expand Down
97 changes: 29 additions & 68 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,18 @@ jobs:
env:
CC: ${{ matrix.version.cc }}
CXX: ${{ matrix.version.cxx }}
CPLEX_URL: ${{ secrets.CPLEX129_LINUX_URL }}
SOPLEX_URL: ${{ secrets.SOPLEX311_URL }}
DOWNWARD_CPLEX_ROOT: /home/runner/lib/ibm/ILOG/CPLEX_Studio129/cplex
DOWNWARD_SOPLEX_ROOT: /home/runner/lib/soplex-3.1.1
DOWNWARD_COIN_ROOT: /home/runner/lib/coin
CPLEX_URL: ${{ secrets.CPLEX2211_LINUX_URL }}
DOWNWARD_CPLEX_ROOT: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex
CPLEX_LIB: /home/runner/lib/ibm/ILOG/CPLEX_Studio2211/cplex/bin/x86-64_linux/libcplex2211.so
DOWNWARD_SOPLEX_ROOT: /home/runner/lib/soplex-6.0.3x
SOPLEX_LIB: /home/runner/lib/soplex-6.0.3x/lib/
SOPLEX_INCLUDE: /home/runner/lib/soplex-6.0.3x/include/
steps:
- name: Clone repository
uses: actions/checkout@master
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@master
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version.python }}

Expand All @@ -56,55 +57,27 @@ jobs:
run: |
sudo apt-get -y install ${{ matrix.version.cxx }}
# We only want to set up Osi if both LP solvers are set, hence
# we execute the following three steps only if both secrets
# are set.
# Only install CPLEX if its URL/secret is set.
- name: Install CPLEX
if: ${{ env.CPLEX_URL != 0 && env.SOPLEX_URL != 0 }}
if: ${{ env.CPLEX_URL != 0 }}
run: |
# 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
rm cplex_installer
# Always install SoPlex
- name: Install SoPlex
if: ${{ env.CPLEX_URL != 0 && env.SOPLEX_URL != 0 }}
run: |
# We redirect output of wget to hide the secret URLs.
wget -O soplex-3.1.1.tgz $SOPLEX_URL &> /dev/null
tar xzf soplex-3.1.1.tgz
cd soplex-3.1.1
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX="$DOWNWARD_SOPLEX_ROOT" ..
make
make install
cd ../../
rm -r soplex-3.1.1.tgz soplex-3.1.1
- name: Install Osi
if: ${{ env.CPLEX_URL != 0 && env.SOPLEX_URL != 0 }}
run: |
wget http://www.coin-or.org/download/source/Osi/Osi-0.107.9.tgz
tar xzf Osi-0.107.9.tgz
cd Osi-0.107.9
mkdir $DOWNWARD_COIN_ROOT
./configure CC=$CC CFLAGS="-pthread -Wno-long-long" \
CXX=$CXX CXXFLAGS="-pthread -Wno-long-long" \
LDFLAGS="-L$DOWNWARD_CPLEX_ROOT/lib/x86-64_linux/static_pic \
-L$DOWNWARD_SOPLEX_ROOT/lib" \
--without-lapack --enable-static=no \
--prefix="$DOWNWARD_COIN_ROOT" \
--disable-bzlib \
--with-soplex-incdir=$DOWNWARD_SOPLEX_ROOT/include \
--with-soplex-lib="-lsoplex" \
--with-cplex-incdir=$DOWNWARD_CPLEX_ROOT/include/ilcplex \
--with-cplex-lib="-lcplex -lm -ldl" # -ldl is only needed for CPLEX >= 12.8
make -j2
make install
cd ../
rm -r Osi-0.107.9.tgz Osi-0.107.9
git clone https://github.com/scipopt/soplex.git
cd soplex
git checkout a5df0814d67812c13a00f06eec507b4d071fb862
cd ..
cmake -S soplex -B build
cmake --build build
cmake --install build --prefix "${DOWNWARD_SOPLEX_ROOT}"
rm -rf soplex build
- name: Compile planner
run: |
Expand All @@ -116,24 +89,17 @@ jobs:
# We only run tests on one compiler version per Ubuntu version, so we
# only need to archive that one.
if: ${{ matrix.version.run_tox_tests }}
# We determined the dynamically-linked libraries using ldd. We
# archive the entire lib directory of Osi because we need all
# 4 large library files and several file links to these.
run: |
libs=""
if [[ ! -z "${CPLEX_URL}" || ! -z "${SOPLEX_URL}" ]]; then
libs="${libs} lib/coin/lib/"
fi
files_to_archive="fast-downward.py driver misc builds/debug/bin/ \
builds/release/bin/ ${SOPLEX_LIB} ${SOPLEX_INCLUDE}"
if [[ ! -z "${CPLEX_URL}" ]]; then
libs="${libs} lib/ibm/ILOG/CPLEX_Studio129/cplex/bin/x86-64_linux/libcplex1290.so"
files_to_archive="${files_to_archive} ${CPLEX_LIB}"
fi
# Handle libs first because tar complains when no files follow the last --directory option.
tar cfz archive.tar.gz --directory /home/runner ${libs} --directory ${GITHUB_WORKSPACE} fast-downward.py driver misc builds/debug/bin/ builds/release/bin/
tar cfz archive.tar.gz -C "/home/runner" $(realpath --relative-to="/home/runner" $files_to_archive)
- name: Upload archive
if: ${{ matrix.version.run_tox_tests }}
uses: actions/upload-artifact@master
uses: actions/upload-artifact@v3
with:
name: compiled-planner-${{ matrix.version.ubuntu }}
path: archive.tar.gz
Expand All @@ -150,11 +116,10 @@ jobs:
- {ubuntu: ubuntu-20.04, python: '3.8'}
- {ubuntu: ubuntu-22.04, python: '3.10'}
env:
CPLEX_URL: ${{ secrets.CPLEX129_LINUX_URL }}
SOPLEX_URL: ${{ secrets.SOPLEX311_URL }}
CPLEX_URL: ${{ secrets.CPLEX2211_LINUX_URL }}
steps:
- name: Download archive
uses: actions/download-artifact@master
uses: actions/download-artifact@v3
with:
name: compiled-planner-${{ matrix.version.ubuntu }}

Expand All @@ -164,7 +129,7 @@ jobs:
name: compiled-planner-${{ matrix.version.ubuntu }}

- name: Install Python
uses: actions/setup-python@master
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version.python }}

Expand All @@ -191,24 +156,20 @@ jobs:
# We need to make sure that library paths are the same as
# during compilation.
run: |
tar xfz archive.tar.gz
if [[ ! -z "${CPLEX_URL}" || ! -z "${SOPLEX_URL}" ]]; then
mv lib/ /home/runner
fi
tar xfz archive.tar.gz -C "/home/runner"
- name: Run driver, translator and search tests
run: |
cd misc/
tox -e driver,translator,search
- name: Run CPLEX tests
if: ${{ env.CPLEX_URL != 0 && env.SOPLEX_URL != 0 }}
if: ${{ env.CPLEX_URL != 0 }}
run: |
cd misc/
tox -e cplex
- name: Run SoPlex tests
if: ${{ env.CPLEX_URL != 0 && env.SOPLEX_URL != 0 }}
run: |
cd misc/
tox -e soplex
Expand Down
78 changes: 6 additions & 72 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ env:
CC: cl
CXX: cl

DOWNWARD_COIN_ROOT_RELEASE: D:\a\downward\osi_release
DOWNWARD_COIN_ROOT_DEBUG: D:\a\downward\osi_debug
DOWNWARD_CPLEX_ROOT: D:\a\downward\cplex
ZLIB_ROOT: D:\a\downward\zlib

CPLEX_URL: "${{ secrets.CPLEX129_WINDOWS_URL }}"
OSI_URL: "https://www.coin-or.org/download/source/Osi/Osi-0.107.9.tgz"
CPLEX_URL: "${{ secrets.CPLEX2211_WINDOWS_URL }}"
ZLIB_URL: "https://www.zlib.net/zlib1213.zip"


Expand All @@ -35,10 +32,10 @@ jobs:
python-version: [3.8]
steps:
- name: Clone repository
uses: actions/checkout@master
uses: actions/checkout@v3

- name: Install Python
uses: actions/setup-python@master
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

Expand Down Expand Up @@ -72,79 +69,22 @@ jobs:
if: ${{ env.CPLEX_URL != 0 }}
run: |
echo "For information about the CPLEX silent installation consult:"
echo "https://www.ibm.com/support/knowledgecenter/SSSA5P_12.9.0/ilog.odms.studio.help/Optimization_Studio/topics/td_silent_install.html"
echo "https://www.ibm.com/docs/en/icos/22.1.1?topic=2211-silent-installation-cplex-optimization-studio"
curl.exe --output cplex.exe $ENV:CPLEX_URL
echo "Install CPLEX"
Start-Process -FilePath .\cplex.exe -ArgumentList "-f", "D:\a\downward\downward\.github\workflows\misc\cplex129_windows_installer.properties" -PassThru | Wait-Process
Start-Process -FilePath .\cplex.exe -ArgumentList "-f", "D:\a\downward\downward\.github\workflows\misc\cplex2211_windows_installer.properties" -PassThru | Wait-Process
del .\cplex.exe
echo "Copy the relevant directory to a location which is not magically protected against cmake"
Xcopy /E /I ..\cplex_temp\cplex ..\cplex
- name: Install Coin
shell: cmd
if: ${{ env.CPLEX_URL != 0 }}
run: |
call "${{ matrix.platform.vc }}" %ARCH%
set SET_RUNTIME_LIBRARY=python D:\a\downward\downward\.github\workflows\misc\set-visual-studio-static-runtime-libraries.py
cd ..
echo "Download OSI"
curl.exe --output osi.tgz %OSI_URL%
tar xf osi.tgz
del osi.tgz
cd Osi-0.107.9
echo "Set up Include Directory"
mkdir ..\osi_release\include
copy CoinUtils\src\*.hpp ..\osi_release\include
copy CoinUtils\src\*.h ..\osi_release\include
copy Osi\src\Osi\*.hpp ..\osi_release\include
copy Osi\src\Osi\*.h ..\osi_release\include
copy Osi\src\OsiCpx\*.hpp ..\osi_release\include
copy Osi\src\OsiCpx\*.h ..\osi_release\include
Xcopy /E /I ..\osi_release\include ..\osi_debug\include
echo "Set up Lib Directory"
mkdir ..\osi_release\lib
mkdir ..\osi_debug\lib
echo "Compile libOsi"
cd Osi\MSVisualStudio\v10\
devenv Osi.sln /Upgrade
cd libOsi\
%SET_RUNTIME_LIBRARY% libOsi.vcxproj libOsi.vcxproj
msbuild libOsi.vcxproj /p:Configuration=Release /p:Platform=x64 /p:DefaultWindowsSDKVersion=%WindowsSDKVersion% /p:OutDir=lib
move lib\* ..\..\..\..\..\osi_release\lib\
msbuild libOsi.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:DefaultWindowsSDKVersion=%WindowsSDKVersion% /p:OutDir=lib
move lib\* ..\..\..\..\..\osi_debug\lib\
echo "Compile libOsiCpx"
cd ..\..\..\src\OsiCpx
cl /EHsc OsiCpxSolverInterface.cpp /I ..\Osi /I ..\..\..\CoinUtils\src /I "%DOWNWARD_CPLEX_ROOT%\include\ilcplex" /c
lib OsiCpxSolverInterface.obj
move OsiCpxSolverInterface.lib ..\..\..\..\osi_release\lib\libOsiCpx.lib
cl /EHsc OsiCpxSolverInterface.cpp /I ..\Osi /I ..\..\..\CoinUtils\src /I "%DOWNWARD_CPLEX_ROOT%\include\ilcplex" /c /MTd
lib OsiCpxSolverInterface.obj
move OsiCpxSolverInterface.lib ..\..\..\..\osi_debug\lib\libOsiCpx.lib
echo "Compile libCoinUtils"
cd ..\..\..\CoinUtils\MSVisualStudio\v10
devenv CoinUtils.sln /Upgrade
cd libCoinUtils
%SET_RUNTIME_LIBRARY% libCoinUtils.vcxproj libCoinUtils.vcxproj
msbuild libCoinUtils.vcxproj /p:Configuration=Release /p:Platform=x64 /p:DefaultWindowsSDKVersion=%WindowsSDKVersion% /p:OutDir=lib
move lib\* ..\..\..\..\..\osi_release\lib\
msbuild libCoinUtils.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:DefaultWindowsSDKVersion=%WindowsSDKVersion% /p:OutDir=lib
move lib\* ..\..\..\..\..\osi_debug\lib\
- name: Compile planner
shell: cmd
run: |
call "${{ matrix.platform.vc }}" %ARCH%
set CXXFLAGS=/WX
python build.py release
python build.py debug
Expand All @@ -161,11 +101,6 @@ jobs:
# steps, we hope to be able to install VAL natively on Windows.
run: |
call "${{ matrix.platform.vc }}" %ARCH%
rem "dumpbin /dependents builds\release\bin\downward.exe shows that"
rem "downward.exe depends on cplexXYZ.dll. Thus, we have to add it to"
rem "the PATH. On my local CPLEX installation this is done"
rem "automatically. For the GitHub Action we have to do it manually:"
set PATH=%PATH%;D:\a\downward\cplex_temp\opl\bin\x64_win64/
cd misc/
tox -e translator,search
Expand All @@ -174,7 +109,6 @@ jobs:
if: ${{ env.CPLEX_URL != 0 }}
run: |
call "${{ matrix.platform.vc }}" %ARCH%
set PATH=%PATH%;D:\a\downward\cplex_temp\opl\bin\x64_win64/
cd misc/
tox -e cplex
Expand Down
Loading

0 comments on commit d3a1e1e

Please sign in to comment.