Skip to content

use updated make for zlip #2047

use updated make for zlip

use updated make for zlip #2047

Workflow file for this run

---
name: Windows
on:
push:
branches: [main, release-*]
pull_request:
branches: [main, release-*]
env:
ARCH: "x64"
CC: cl
CXX: cl
cplex_DIR: D:\a\cplex
CPLEX_URL: "${{ secrets.CPLEX2211_WINDOWS_URL }}"
ZLIB_URL: "https://www.zlib.net/zlib131.zip"
jobs:
test:
name: Compile and test planner
timeout-minutes: 60
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
# The compiler used by the runner for Windows 2022 and Windows 2025 is
# the same. We could just run tests on Windows 2025 but there the silent
# CPLEX installation times out without an error message. We tested that
# the disk where we plan to install CPLEX is available, has enough space
# we could create a test file on it. It is unclear if the installer does
# something and is just slow, or if it does nothing because of some error.
# We thus only test on Windows 2022 for now.
# - {os: "windows-2025", vc: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"}
- {os: "windows-2022", vc: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"}
python-version: [3.9]
steps:
- name: Clone repository
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install zlib
# if: ${{ env.CPLEX_URL != 0 }}
shell: cmd
run: |
call "${{ matrix.platform.vc }}" %ARCH%
cd ..
curl.exe -f --output zlib.zip %ZLIB_URL% || (
echo ERROR: Failed to download zlib from %ZLIB_URL%
echo zlib release could be outdated. Check https://zlib.net/.
exit /b 1
)
unzip zlib.zip
del zlib.zip
mkdir zlib
cd zlib
echo "Set up zlib include directory"
move ../zlib-1.3.2 include
echo "Compile zlib library"
cd include
nmake /f win32/Makefile.msc
mkdir ..\lib
move zdll.lib ..\lib\zdll.lib
move zlib.lib ..\lib\zlib.lib
move zlib1.dll ..\lib\zlib1.dll
- name: Install CPLEX
if: ${{ env.CPLEX_URL != 0 }}
run: |
echo "For information about the CPLEX silent installation consult:"
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", "$ENV:GITHUB_WORKSPACE\.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 D:\a\cplex_temp\cplex $ENV:cplex_DIR
- name: Compile planner
shell: cmd
run: |
call "${{ matrix.platform.vc }}" %ARCH%
set CXXFLAGS=/WX
python build.py release
python build.py debug
- name: Install tox
run: |
pip3 install tox
- name: Run translator and search tests
shell: cmd
# We do not run driver tests here because that would require
# VAL to be installed, which currently cannot be easily done
# on Windows for the version of VAL we use. When the maintainers
# of VAL fix the latest version to accept plans without time
# steps, we hope to be able to install VAL natively on Windows.
run: |
call "${{ matrix.platform.vc }}" %ARCH%
cd misc/
tox -e translator,search
- name: Run CPLEX tests
shell: cmd
if: ${{ env.CPLEX_URL != 0 }}
run: |
call "${{ matrix.platform.vc }}" %ARCH%
cd misc/
tox -e cplex
...