forked from JonathanSalwan/Triton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
121 lines (105 loc) · 5 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
version: 0.8.{build}
branches:
only:
- master
- /dev-.*/
configuration:
- Release
clone_folder: c:\projects\triton
environment:
CAPSTONE_INCLUDE_DIRS: c:\projects\triton\build\capstone-4.0.1\include\capstone
PLATFORM_TOOLSET: v142
CMAKE_TEMPLATE: Visual Studio 16 2019
BOOST_ROOT: c:\Libraries\boost_1_71_0
matrix:
- platform: Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYTHON: C:\Python27
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\%configuration%\capstone.lib
LIEF_VERSION: 0.7.0
LIEF_ZIP: windows_x86_lief-0.7.0_py2.7.zip
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.8.7-x86-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.8.7-x86-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.8.7-x86-win
PYTHON_3: OFF
- platform: Win32
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYTHON: C:\Python36
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\%configuration%\capstone.lib
LIEF_VERSION: 0.10.1
LIEF_ZIP: lief-0.10.1-cp36-cp36m-win32.whl
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.8.7-x86-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.8.7-x86-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.8.7-x86-win
PYTHON_3: ON
- platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYTHON: C:\Python27-x64
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\x64\%configuration%\capstone.lib
LIEF_VERSION: 0.7.0
LIEF_ZIP: windows_x64_lief-0.7.0_py2.7.zip
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.8.7-x64-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.8.7-x64-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.8.7-x64-win
PYTHON_3: OFF
- platform: x64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
PYTHON: C:\Python36-x64
CAPSTONE_LIBRARIES: c:\projects\triton\build\capstone-4.0.1\msvc\x64\%configuration%\capstone.lib
LIEF_VERSION: 0.10.1
LIEF_ZIP: lief-0.10.1-cp36-cp36m-win_amd64.whl
Z3_INCLUDE_DIRS: c:\projects\triton\build\z3-4.8.7-x64-win\include
Z3_LIBRARIES: c:\projects\triton\build\z3-4.8.7-x64-win\bin\libz3.lib
Z3_PKG_NAME: z3-4.8.7-x64-win
PYTHON_3: ON
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.8.7/%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
# Install LIEF
- cmd: echo Downloading LIEF...
- cmd: appveyor DownloadFile https://github.com/lief-project/LIEF/releases/download/%LIEF_VERSION%/%LIEF_ZIP%
- cmd: echo Install LIEF...
- cmd: python -m pip install %LIEF_ZIP%
# Running cmake for Triton
- cmd: echo Running cmake for Triton...
- cmd: cmake -DPYTHON36=%PYTHON_3% .. -A %platform% -G "%CMAKE_TEMPLATE%"
#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