forked from JonathanSalwan/Triton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
146 lines (129 loc) · 6.26 KB
/
.appveyor.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
version: 0.6.{build}
branches:
only:
- master
- /dev-.*/
configuration:
- Release
# XXX: LNK1104: cannot open file 'python27_d.lib'
# - Debug
clone_folder: c:\projects\triton
environment:
CAPSTONE_INCLUDE_DIRS: c:\projects\triton\build\capstone-4.0.1\include\capstone
matrix:
- platform: Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
BOOST_ROOT: c:\Libraries\boost_1_62_0
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\%configuration%\capstone.lib
CMAKE_TEMPLATE: Visual Studio 12 2013
LIEF_ZIP: windows_x86_lief-0.7.0_py2.7.zip
PLATFORM_TOOLSET: v120
PYTHON: C:\Python27
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.6.0-x86-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.6.0-x86-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.6.0-x86-win
- platform: Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
BOOST_ROOT: c:\Libraries\boost_1_62_0
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\%configuration%\capstone.lib
CMAKE_TEMPLATE: Visual Studio 14 2015
LIEF_ZIP: windows_x86_lief-0.7.0_py2.7.zip
PLATFORM_TOOLSET: v140
PYTHON: C:\Python27
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.6.0-x86-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.6.0-x86-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.6.0-x86-win
- platform: Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BOOST_ROOT: c:\Libraries\boost_1_65_1
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\%configuration%\capstone.lib
CMAKE_TEMPLATE: Visual Studio 15 2017
LIEF_ZIP: windows_x86_lief-0.7.0_py2.7.zip
PLATFORM_TOOLSET: v141
PYTHON: C:\Python27
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.6.0-x86-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.6.0-x86-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.6.0-x86-win
- platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2013
BOOST_ROOT: c:\Libraries\boost_1_62_0
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\x64\%configuration%\capstone.lib
CMAKE_TEMPLATE: Visual Studio 12 2013 Win64
LIEF_ZIP: windows_x64_lief-0.7.0_py2.7.zip
PLATFORM_TOOLSET: v120
PYTHON: C:\Python27-x64
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.6.0-x64-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.6.0-x64-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.6.0-x64-win
- platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
BOOST_ROOT: c:\Libraries\boost_1_62_0
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\x64\%configuration%\capstone.lib
CMAKE_TEMPLATE: Visual Studio 14 2015 Win64
LIEF_ZIP: windows_x64_lief-0.7.0_py2.7.zip
PLATFORM_TOOLSET: v140
PYTHON: C:\Python27-x64
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.6.0-x64-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.6.0-x64-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.6.0-x64-win
- platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
BOOST_ROOT: c:\Libraries\boost_1_65_1
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\x64\%configuration%\capstone.lib
CMAKE_TEMPLATE: Visual Studio 15 2017 Win64
LIEF_ZIP: windows_x64_lief-0.7.0_py2.7.zip
PLATFORM_TOOLSET: v141
PYTHON: C:\Python27-x64
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.6.0-x64-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.6.0-x64-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.6.0-x64-win
install:
- set PATH=%PYTHON%;%PATH%
- cmd: cd C:\projects\triton
- cmd: mkdir build
- cmd: cd build
- cmd: echo Downloading z3...
- cmd: appveyor DownloadFile https://github.com/Z3Prover/z3/releases/download/z3-4.6.0/%Z3_PKG_NAME%.zip
- cmd: 7z x %Z3_PKG_NAME%.zip
# Install z3 in the path
- set PATH=C:\projects\triton\build\%Z3_PKG_NAME%\bin;%PATH%
- set PYTHONPATH=C:\projects\triton\build\%Z3_PKG_NAME%\bin\python;%PYTHONPATH%
- cmd: echo Downloading capstone...
- cmd: appveyor DownloadFile https://github.com/aquynh/capstone/archive/4.0.1.zip
- cmd: 7z x 4.0.1.zip
- cmd: echo Building capstone...
# This is required because capstone's slns/vcxprojs file have been made with an old version of MSVC which is not a problem in itself,
# the issue will show up when trying to link capstone.lib (generated with an old toolset) into triton that is generated with the new toolset.
# This result in annoying linking errors (sprintf/and similar functions don't get resolved) - we could also link legacy_stdio_definitions.lib to triton
# but I would rather build everything I can with the same toolset:
# http://stackoverflow.com/questions/32418766/c-unresolved-external-symbol-sprintf-and-sscanf-in-visual-studio-2015
# The switch /p:PlatformToolset allows you to override the toolset version specified in the solution/project files :-)
- cmd: msbuild capstone-4.0.1\msvc\capstone.sln /p:Configuration=%configuration% /p:Platform=%platform% /p:PlatformToolset=%PLATFORM_TOOLSET% /t:capstone_static /m
- cmd: echo Running cmake...
- cmd: cmake .. -G "%CMAKE_TEMPLATE%"
# Install LIEF
- cmd: echo Downloading LIEF...
- cmd: appveyor DownloadFile https://github.com/lief-project/LIEF/releases/download/0.7.0/%LIEF_ZIP%
- cmd: echo Install LIEF...
- cmd: python -m pip install %LIEF_ZIP%
#build:
# Build manually until we can build every target. For now, we can't run test-python
# target without installation
# parallel: true
# project: c:\projects\triton\build\triton.sln
build_script:
- cmd: msbuild c:\projects\triton\build\triton.sln /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll" /t:python-triton /m:3
# - cmd: cmake --build . --config release
test_script:
- cmd: cmake --build . --config Release --target check
after_test:
# Check installation
- cmd: cmake --build . --config Release --target install
# generate artifact
- cmd: cd src\libtriton\%configuration%
- cmd: copy ..\..\..\%Z3_PKG_NAME%\bin\libz3.dll libz3.dll
- cmd: copy triton.dll triton.pyd
- cmd: if "%platform%"=="Win32" 7z a -t7z ..\..\..\..\triton.x86.release.7z *
- cmd: if "%platform%"=="x64" 7z a -t7z ..\..\..\..\triton.x64.release.7z *
artifacts:
- path: triton.*.7z