mirror of
https://github.com/avast/retdec.git
synced 2024-12-24 06:16:00 +00:00
59 lines
2.2 KiB
YAML
59 lines
2.2 KiB
YAML
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 the install step. If we do this earlier, the 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:
|
|
# Check that install is movable and that it does not need the build directory.
|
|
- cmd: mv install ../retdec-install
|
|
- cmd: cd ..
|
|
# Run unit tests.
|
|
- cmd: C:\msys64\usr\bin\bash.exe retdec-install\bin\retdec-tests-runner.sh
|
|
# Run the decompilation script.
|
|
- cmd: C:\msys64\usr\bin\bash.exe retdec-install\bin\retdec-decompiler.sh --help
|
|
# Run a 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 have used 32-bit GCC.
|
|
- 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
|