mirror of
https://github.com/avast/retdec.git
synced 2024-12-20 04:18:30 +00:00
dcca9bee47
* deps/yaramod: update to version v3.0.0b0 * Remove all mentions of flex and bison. We don't need them anymore. The new yaramod does not use them. * deps/yaramod: do not require Flex and Bison. * deps/yaramod: fix paths in target_link_libraries() * CHANGELOG.md: add entry for Yaramod update - PR #680.
81 lines
2.5 KiB
YAML
81 lines
2.5 KiB
YAML
language: cpp
|
|
|
|
cache: ccache
|
|
|
|
matrix:
|
|
fast_finish: true
|
|
include:
|
|
- os: linux
|
|
dist: bionic
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- build-essential
|
|
- gcc-multilib
|
|
- autoconf
|
|
- automake
|
|
- libtool
|
|
- pkg-config
|
|
- m4
|
|
- zlib1g-dev
|
|
- openssl
|
|
env:
|
|
- MATRIX_EVAL="NPROC=$(nproc)"
|
|
# 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
|
|
|
|
- os: osx
|
|
osx_image: xcode11.2
|
|
env:
|
|
- MATRIX_EVAL="NPROC=$(sysctl -n hw.physicalcpu)"
|
|
- CCACHE_CPP2=true
|
|
|
|
install:
|
|
# ccache is not installed on OS X.
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install ccache; fi
|
|
# install for os x the gnu time library
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install gnu-time; fi
|
|
|
|
before_script:
|
|
- eval "${MATRIX_EVAL}"
|
|
# We need to add ccache before everything else into PATH.
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
|
|
|
|
script:
|
|
- 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.
|
|
- cmake -DCMAKE_CXX_FLAGS_RELEASE="-O0 -DNDEBUG" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="$(pwd)/install" -DRETDEC_COMPILE_YARA=OFF ..
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cmake -DRETDEC_TESTS=ON -DRETDEC_DEV_TOOLS=ON .. ; fi
|
|
- time make install -j $NPROC
|
|
# Check that install is movable and that it does not need the build directory.
|
|
- mv install ../retdec-install
|
|
- cd ..
|
|
- rm -rf build
|
|
# Run unit tests.
|
|
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then python3 retdec-install/bin/retdec-tests-runner.py ; fi
|
|
# Run the decompilation script.
|
|
- python3 retdec-install/bin/retdec-decompiler.py --help
|
|
# 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
|
|
- gcc -m32 -o hello hello-orig.c
|
|
- ./hello
|
|
- python3 retdec-install/bin/retdec-decompiler.py hello
|
|
- cat hello.c
|
|
- grep "int main(int argc, char \*\* argv)" hello.c
|
|
|
|
branches:
|
|
only:
|
|
# Pushes and PRs to the master branch.
|
|
- master
|
|
# Version tags.
|
|
- /^v?\d+\.\d+.*$/
|
|
# Temporarily enable build of this branch.
|
|
- issue-650
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|