about summary refs log tree commit diff stats
path: root/.appveyor.yml
diff options
context:
space:
mode:
authorAxel Souchet <0vercl0k@tuxfamily.org>2018-09-09 06:11:00 -0700
committerserpilliere <serpilliere@users.noreply.github.com>2018-09-09 15:11:00 +0200
commit8e6b39d80e9f8db8389bd2a8106d0f64b91c19e9 (patch)
treedbf342089690704e89c10532b83d1d81709a49f4 /.appveyor.yml
parente61116884ac7879db08313542c6c28a8b00297c5 (diff)
downloadfocaccia-miasm-8e6b39d80e9f8db8389bd2a8106d0f64b91c19e9.tar.gz
focaccia-miasm-8e6b39d80e9f8db8389bd2a8106d0f64b91c19e9.zip
Adds Windows support and AppVeyor CI (#835)
* Get miasm to work on Windows, also add AppVeyor CI

* Fix gcc jitter on Linux

* Make the dse_crackme tests work on Windows

* calling build and then install is less confusing than install twice

* fix os.rename race condition on Windows

* clean it up

* Clean up after the unused cl.exe's artifacts

* Use is_win instead of an additional check

* Fix issue on Windows where 'w' and 'wb' modes are different

* Address review feedback

* setuptools is actually not required, so reverting
Diffstat (limited to '.appveyor.yml')
-rw-r--r--.appveyor.yml59
1 files changed, 59 insertions, 0 deletions
diff --git a/.appveyor.yml b/.appveyor.yml
new file mode 100644
index 00000000..1a2c6ef9
--- /dev/null
+++ b/.appveyor.yml
@@ -0,0 +1,59 @@
+version: 1.{build}
+
+configuration:
+  - Release
+
+clone_folder: c:\projects\miasm
+
+environment:
+  matrix:
+    - platform: Win32
+      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+      PLATFORM_TOOLSET: v141
+      PYTHON: c:\Python27
+      Z3_PKG_NAME: z3-4.6.0-x86-win
+
+    - platform: x64
+      APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
+      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
+
+      # on_finish:
+      #  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
+
+install:
+  - cmd: cd c:\projects\miasm
+  - 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
+  - "%PYTHON%\\Scripts\\pip.exe install pyparsing llvmlite"
+  - cmd: git clone https://github.com/serpilliere/elfesteem
+  - cmd: cd elfesteem
+  - "%PYTHON%\\python.exe setup.py install"
+
+build_script:
+  - cmd: if "%platform%"=="Win32" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x86
+  - cmd: if "%platform%"=="x64" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
+  - cmd: cd c:\projects\miasm
+  - "%PYTHON%\\python.exe setup.py build"
+  - "%PYTHON%\\python.exe setup.py install"
+
+test_script:
+  - cmd: set PYTHONPATH=c:\projects\miasm\build\%Z3_PKG_NAME%\bin\python
+  - cmd: set PATH=c:\projects\miasm\build\%Z3_PKG_NAME%\bin;%PATH%
+  - cmd: cd c:\projects\miasm\test
+  - "%PYTHON%\\python.exe test_all.py"
+
+after_test:
+  - cmd: chdir
+  - cmd: set plat
+  - cmd: if "%platform%"=="Win32" 7z a -t7z ..\miasm.x86.release.7z c:\projects\miasm\build\*lib*
+  - cmd: if "%platform%"=="X64" 7z a -t7z ..\miasm.x64.release.7z c:\projects\miasm\build\*lib*
+
+artifacts:
+  - path: miasm.*.7z