forked from qilingframework/qiling
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
158 lines (152 loc) · 6.07 KB
/
.travis.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
language: shell
matrix:
fast_finish: true
include:
- name: "Python 3.6 on Linux"
os: linux
dist: bionic
language: python
python: "3.6"
cache: pip
install:
- pip3 install .
before_script:
- cd tests
script:
- ./test_elf.sh
- name: "Python 3.7 on Linux"
os: linux
dist: bionic
language: python
python: "3.7"
cache: pip
install:
- pip3 install flake8
- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- pip3 install .
before_script:
- cd tests
script:
- ./test_elf.sh
- name: "Python 3.7 on OSX"
os: osx
osx_image: xcode10.1
language: shell
cache:
directories:
- $HOME/Library/Caches/pip
# - $HOME/dist/
before_install:
- pip3 install --upgrade pip
install:
# - pip3 install wheel 'capstone>=4.0.1' 'pefile>=2019.4.18' 'python-registry>=1.3.1' 'unicorn>=1.0.2rc4'
# - |
# if [ ! -f $HOME/dist/keystone*.whl ]; then
# git clone https://github.com/keystone-engine/keystone && \
# cd keystone/bindings/python && \
# sudo python3 setup.py install bdist_wheel && \
# cp dist/*.whl $HOME/dist/;
# else
# sudo pip3 install $HOME/dist/*.whl;
# fi
- cd $TRAVIS_BUILD_DIR
- pip3 install . # Workaround since building from keystone sources doesn't work on Macos. Not sure why and I guess it's due to Travis. :/
before_script:
- ./examples/scripts/collectdylib.sh
- cd tests
script:
- ./test_macho.sh
- name: "Python 3.6.8 on Windows"
os: windows
language: shell
env:
- PATH="/c/Python36:/c/Python36/Scripts:$PATH"
cache:
directories:
# - $HOME/AppData/Local/Temp/chocolatey
- $HOME/AppData/Local/pip/Cache
- /c/Python36
# - $HOME/AppData/Local/NuGet/Cache
before_install:
- |
if [[ ! -f /c/Python36/python ]]; then
choco install python --version=3.6.8
fi
# Prevent worker settings failure
- powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableArchiveScanning \$true'"
- powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableBehaviorMonitoring \$true'"
- powershell Start-Process -PassThru -Wait PowerShell -ArgumentList "'-Command Set-MpPreference -DisableRealtimeMonitoring \$true'"
#- choco install kb2999226
#- python -m pip install --upgrade pip
install:
# - pip3 install wheel 'capstone>=4.0.1' 'pefile>=2019.4.18' 'python-registry>=1.3.1' 'unicorn>=1.0.2rc3'
# - |
# if [ ! -f $HOME/dist/keystone*.zip ]; then
# git clone https://github.com/keystone-engine/keystone && \
# cd keystone && \
# mkdir build && \
# cd build && \
# cmd.exe //C 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Auxiliary\Build\vcvarsall.bat' amd64 '&' cmd.exe //C '..\nmake-dll.bat' '&&' nmake instalL && \
# cd ../bindings/python && \
# python setup.py install && \
# python setup.py bdist --formats=zip && \
# cp dist/*.zip $HOME/dist/ && \
# cp /c/Program\ Files\ \(x86\)/keystone/lib/keystone.dll /c/Python36/Lib/site-packages/keystone/ && \
# cp /c/Program\ Files\ \(x86\)/keystone/lib/keystone.dll $HOME/dist/;
# else
# unzip $HOME/dist/*.zip -d /c && \
# cp $HOME/dist/keystone.dll /c/Python36/Lib/site-packages/keystone/;
# fi
- cd $TRAVIS_BUILD_DIR
- pip3 install .
# - cp /c/Program\ Files\ \(x86\)/keystone/lib/keystone.dll /c/Python36/Lib/site-packages/keystone/
before_script:
- cmd.exe //C 'examples\scripts\dllscollector.bat'
- cd $TRAVIS_BUILD_DIR/examples/rootfs/x86_windows/bin
- unzip -Pinfected wannacry.bin.zip
- unzip -Pinfected UselessDisk.bin.zip
- unzip -Pinfected GandCrab502.bin.zip
- unzip -Pinfected al-khaser.bin.zip
- cd $TRAVIS_BUILD_DIR/tests
script:
- cmd.exe //C '.\test_pe.bat'
- name: "Python 3.6 on Docker"
services:
- docker
# cache:
# bundler: true
# directories:
# - $HOME/docker
before_script:
# - docker build -t qiling:1.1 .
# - docker load -i $HOME/docker/images.tar || true
# - |
# if [[ ! $(docker images -q qiling:1.1) ]]; then
# docker build -t qiling:1.1 . && docker save -o $HOME/docker/images.tar qiling:1.1;
# fi
# - docker run -dt --name qiling -v ${TRAVIS_BUILD_DIR}:/qiling qiling:1.1
# - docker exec qiling pip3 install -r requirements.txt
# - docker exec qiling python3 setup.py install
script:
- docker run -it --rm -v ${TRAVIS_BUILD_DIR}:/qiling qilingframework/qiling:dev bash -c "pip3 install . && cd tests && ./test_elf.sh"
# - docker exec qiling bash -c "cd tests && ./test_elf.sh"
# - name: "Python 3.6 on WSL1 Ubuntu"
# os: windows
# language: shell
# before_install:
# - choco install wsl-ubuntu-1804
# - wsl apt update
# - wsl DEBIAN_FRONTEND=noninteractive apt dist-upgrade -y
# - wsl DEBIAN_FRONTEND=noninteractive apt install -y python3-pip cmake
# - wsl pip3 install --upgrade pip
# install:
# - wsl pip3 install -r requirements.txt
# - wsl python3 setup.py install
# before_script:
# - MSYS_NO_PATHCONV=1 wsl cp $(wsl python3 -c "import site; print(site.getsitepackages()[0])")$(wsl python3 -c "import site; print(site.getsitepackages()[1])")/keystone/libkeystone.so $(wsl python3 -c "import site; print(site.getsitepackages()[0])")/keystone/
# - cd tests
# script:
# - wsl python3 test_all.py
# allow_failures:
# - os: osx
# - services: docker