2018-01-26 15:09:07 +00:00
|
|
|
language: cpp
|
|
|
|
|
|
|
|
cache: ccache
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
fast_finish: true
|
|
|
|
include:
|
|
|
|
- os: linux
|
2019-11-19 16:59:02 +00:00
|
|
|
dist: bionic
|
2018-01-26 15:09:07 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- build-essential
|
2019-02-28 13:46:14 +00:00
|
|
|
- gcc-multilib
|
2018-01-26 15:09:07 +00:00
|
|
|
- autoconf
|
|
|
|
- automake
|
|
|
|
- libtool
|
|
|
|
- pkg-config
|
|
|
|
- m4
|
|
|
|
- zlib1g-dev
|
|
|
|
- openssl
|
|
|
|
env:
|
2019-02-28 13:46:14 +00:00
|
|
|
- MATRIX_EVAL="NPROC=$(nproc)"
|
2018-01-26 15:09:07 +00:00
|
|
|
# We need this so that ccache does not cause compilation errors.
|
|
|
|
# e.g. retdec/tests/utils/string_tests.cpp:276:2: error: stray '\' in program
|
|
|
|
- CCACHE_CPP2=true
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- eval "${MATRIX_EVAL}"
|
|
|
|
|
|
|
|
script:
|
2018-07-19 14:07:13 +00:00
|
|
|
- mkdir build && cd build
|
|
|
|
# We use "-O0" to speed up the build.
|
|
|
|
# "-O0" causes segfaults in LLVM if we do not use "-DNDEBUG" as well.
|
2019-05-29 10:24:25 +00:00
|
|
|
- cmake -DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DRETDEC_COMPILE_YARA=OFF ..
|
2020-07-17 12:55:22 +00:00
|
|
|
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then cmake -DCMAKE_LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/7/ .. ; fi
|
2019-05-03 18:45:48 +00:00
|
|
|
- time make install -j $NPROC
|
2018-07-20 12:36:25 +00:00
|
|
|
# Check that install is movable and that it does not need the build directory.
|
2019-05-03 18:45:48 +00:00
|
|
|
- mv install ../retdec-install
|
|
|
|
- cd ..
|
|
|
|
- rm -rf build
|
|
|
|
# Run the decompilation script.
|
2020-06-05 05:42:46 +00:00
|
|
|
- retdec-install/bin/retdec-decompiler --help
|
2019-05-03 18:45:48 +00:00
|
|
|
# Run a simple decompilation.
|
|
|
|
- echo -e '#include <stdio.h>\n#include <stdlib.h>\nint main()\n{\n printf("hello world\\n");\n return 0;\n}\n' > hello-orig.c
|
|
|
|
- cat hello-orig.c
|
2019-11-20 16:10:43 +00:00
|
|
|
- gcc -o hello hello-orig.c
|
2019-05-03 18:45:48 +00:00
|
|
|
- ./hello
|
2020-06-05 05:42:46 +00:00
|
|
|
- retdec-install/bin/retdec-decompiler hello
|
2019-05-03 18:45:48 +00:00
|
|
|
- cat hello.c
|
|
|
|
- grep "int main(int argc, char \*\* argv)" hello.c
|
2018-01-26 15:09:07 +00:00
|
|
|
|
|
|
|
branches:
|
|
|
|
only:
|
|
|
|
# Pushes and PRs to the master branch.
|
|
|
|
- master
|
|
|
|
# Version tags.
|
|
|
|
- /^v?\d+\.\d+.*$/
|
2019-11-19 16:59:02 +00:00
|
|
|
# Temporarily enable build of this branch.
|
|
|
|
- issue-650
|
2018-01-26 15:09:07 +00:00
|
|
|
|
|
|
|
notifications:
|
|
|
|
email:
|
|
|
|
on_success: never
|