-
Notifications
You must be signed in to change notification settings - Fork 145
115 lines (93 loc) · 3.32 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
---
name: Windows
on:
push:
branches: [main, issue*, release-*]
pull_request:
branches: [main, issue*, release-*]
env:
ARCH: "x64"
CC: cl
CXX: cl
DOWNWARD_CPLEX_ROOT: D:\a\downward\cplex
ZLIB_ROOT: D:\a\downward\zlib
CPLEX_URL: "${{ secrets.CPLEX2211_WINDOWS_URL }}"
ZLIB_URL: "https://www.zlib.net/zlib1213.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.2.13 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", "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: 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
...