Skip to content

[issue1146] Validate SAS file #1620

[issue1146] Validate SAS file

[issue1146] Validate SAS file #1620

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:
- {os: "windows-2022", vc: "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"}
- {os: "windows-2019", vc: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\Enterprise\\VC\\Auxiliary\\Build\\vcvarsall.bat"}
python-version: [3.8]
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 --output zlib.zip %ZLIB_URL%
unzip zlib.zip
del zlib.zip
mkdir zlib
cd zlib
echo "Set up zlib include directory"
move ../zlib-1.3.1 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
...