forked from aibasel/downward
-
Notifications
You must be signed in to change notification settings - Fork 1
177 lines (147 loc) · 6.6 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
---
name: Windows
on: [push, pull_request]
env:
ARCH: "x64"
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"
ZLIB_URL: "https://www.zlib.net/zlib1211.zip"
jobs:
test:
name: Compile and test planner
timeout-minutes: 60
runs-on: ${{ matrix.platform.os }}
strategy:
matrix:
platform:
- {os: "windows-2016", vc: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\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.6]
steps:
- name: Clone repository
uses: actions/checkout@master
- name: Install Python
uses: actions/setup-python@master
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.2.11 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/support/knowledgecenter/SSSA5P_12.9.0/ilog.odms.studio.help/Optimization_Studio/topics/td_silent_install.html"
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
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%
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%
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
- name: Run CPLEX tests
shell: cmd
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
...