forked from avast/retdec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
57 lines (50 loc) · 2.17 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
version: '{build}'
environment:
WINFLEXBISON_ARCHIVE: win_flex_bison-2.5.14.zip
matrix:
- CMAKE_GENERATOR: Visual Studio 14 2015 Win64
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
matrix:
fast_finish: true
install:
- appveyor DownloadFile "https://downloads.sourceforge.net/project/winflexbison/%WINFLEXBISON_ARCHIVE%"
- 7z x -y -owinflexbison\ "%WINFLEXBISON_ARCHIVE%" > nul
- set Path=%CD%\winflexbison;%Path%
before_build:
- cmd: mkdir build
- cmd: cd build
- cmd: cmake -DCMAKE_CXX_FLAGS_RELEASE="/Od -DNDEBUG" -G"%CMAKE_GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="install" -DRETDEC_TESTS=ON -DRETDEC_DEV_TOOLS=ON ..
build_script:
- cmd: cmake --build . --config Release -- /m
# Get wget, etc. needed for install step. If we do this earlier, build step fails.
# Otherwise, we could use `cmake --build . --config Release --target install -- -m` and save a few seconds.
- set Path=C:\msys64\usr\bin;C:\msys64\mingw64\bin;%Path%
- cmd: cmake --build . --config Release --target install
test_script:
# Test that install is movable and that it does not need build directory.
- cmd: mv install ../retdec-install
- cmd: cd ..
- cmd: rm -rf build
# Run unit tests.
- cmd: C:\msys64\usr\bin\bash.exe retdec-install\bin\retdec-tests-runner.sh
# Run decompilation script.
- cmd: C:\msys64\usr\bin\bash.exe retdec-install\bin\retdec-decompiler.sh --help
# Run simple decompilation.
- cmd: C:\msys64\usr\bin\echo.exe -e "#include <stdio.h>\n#include <stdlib.h>\nint main()\n{\n printf(\"hello world\\\n\");\n return 0;\n}\n" > hello-orig.c
- cmd: cat hello-orig.c
# Make sure 32-bit gcc will be used.
- set Path=C:\MinGW\bin;%Path%
- cmd: gcc.exe -o hello.exe hello-orig.c
# Prefer msys64 after we used 32-bit compiler.
- set Path=C:\msys64\usr\bin;C:\msys64\mingw64\bin;%Path%
- cmd: hello.exe
- cmd: C:\msys64\usr\bin\bash.exe retdec-install\bin\retdec-decompiler.sh hello.exe
- cmd: cat hello.c
- cmd: grep "int main(int argc, char \*\* argv)" hello.c
notifications:
- provider: Email
to:
- '{{commitAuthorEmail}}'
on_build_success: false
on_build_failure: true
on_build_status_changed: true