retdec/.travis.yml

111 lines
3.7 KiB
YAML
Raw Normal View History

2018-01-26 15:09:07 +00:00
language: cpp
cache: ccache
matrix:
fast_finish: true
include:
- os: linux
dist: trusty
compiler: gcc-4.9
addons:
apt:
sources:
[WIP] Convert Bash scripts to Python #147 (#338) * Convert most Bash scripts to Python * Port cmake/install-share to python * Some cleanup * Replaced install-share in cmake file with fully working python version * Attemp to fix compile error * Fix compile for older python version * Try calling python 3 instead * Make install-share.py executable Compilable decompiler version * Decompiler script now runs successfully until unpacking * Running until calling bin2llvmir now * [skip ci] Integrate @silverbacknet changes + some fixes * [skip ci] Use CmdRunner.run_cmd everywhere in retdec_decompiler Small fixes and cleanup Early out if an error occurs * [skip ci] Latest fixes add retdec_tests_runner.py * [skip ci] Check that options are correct + cleanup and fixes * [skip ci] Fixed various errors * Try to fix running install-share script * Should now work on every os * Fix compile error * Convert compile-yara to python * [skip ci] Make test runner more portable * [skip ci] Use correct code style * [skip ci] Decompiler script now runs successfully * Now generates the same output as the bash script * Try fixing Travis on macOS * Upgrade python instead * Test scripts in travis * Fix build * Fix path * Update build Small cleanup * Fix error in decompiler script * Try to debug failure reason Fix test runner Use Python 3.5 on ubuntu * Use newer Python version and fix some errors * [skip ci] Little cleanup to make the code more clear Don't parse_args twice * [skip ci] First version of reimplementing logging * [skip ci] Some fixes and cleanup * [skip ci] Print memory usage, print output from unpacker, match code convention and some other fixes * [skip ci] Fix crash when using cleanup option; fix crash when using color ida * [skip ci] Fix --backend-aggressive-opts argument * [skip ci] Fix error when file arch is followed by a comment * [skip ci] Match Bash script more closely * [skip ci] Fix a few comments * [skip ci] Add some comments * [skip ci] Add early type_extractor/gen_cstdlib_and_linux_jsons.py and type_extractor/gen_windows_and_windrivers_jsons.py version * Try Unit tests * Try to fix test * Use absolute path instead * [skip ci] Add check for python scripts * scripts/retdec_decompiler.py: use output if specified via -o option
2018-07-12 14:36:16 +00:00
- deadsnakes
2018-01-26 15:09:07 +00:00
- ubuntu-toolchain-r-test
packages:
- build-essential
- gcc-4.8-multilib
- gcc-4.9
- g++-4.9
- cmake
- perl
[WIP] Convert Bash scripts to Python #147 (#338) * Convert most Bash scripts to Python * Port cmake/install-share to python * Some cleanup * Replaced install-share in cmake file with fully working python version * Attemp to fix compile error * Fix compile for older python version * Try calling python 3 instead * Make install-share.py executable Compilable decompiler version * Decompiler script now runs successfully until unpacking * Running until calling bin2llvmir now * [skip ci] Integrate @silverbacknet changes + some fixes * [skip ci] Use CmdRunner.run_cmd everywhere in retdec_decompiler Small fixes and cleanup Early out if an error occurs * [skip ci] Latest fixes add retdec_tests_runner.py * [skip ci] Check that options are correct + cleanup and fixes * [skip ci] Fixed various errors * Try to fix running install-share script * Should now work on every os * Fix compile error * Convert compile-yara to python * [skip ci] Make test runner more portable * [skip ci] Use correct code style * [skip ci] Decompiler script now runs successfully * Now generates the same output as the bash script * Try fixing Travis on macOS * Upgrade python instead * Test scripts in travis * Fix build * Fix path * Update build Small cleanup * Fix error in decompiler script * Try to debug failure reason Fix test runner Use Python 3.5 on ubuntu * Use newer Python version and fix some errors * [skip ci] Little cleanup to make the code more clear Don't parse_args twice * [skip ci] First version of reimplementing logging * [skip ci] Some fixes and cleanup * [skip ci] Print memory usage, print output from unpacker, match code convention and some other fixes * [skip ci] Fix crash when using cleanup option; fix crash when using color ida * [skip ci] Fix --backend-aggressive-opts argument * [skip ci] Fix error when file arch is followed by a comment * [skip ci] Match Bash script more closely * [skip ci] Fix a few comments * [skip ci] Add some comments * [skip ci] Add early type_extractor/gen_cstdlib_and_linux_jsons.py and type_extractor/gen_windows_and_windrivers_jsons.py version * Try Unit tests * Try to fix test * Use absolute path instead * [skip ci] Add check for python scripts * scripts/retdec_decompiler.py: use output if specified via -o option
2018-07-12 14:36:16 +00:00
- python3.5
2018-01-26 15:09:07 +00:00
- flex
- bison
- autoconf
- automake
- libtool
- pkg-config
- m4
- coreutils
- zlib1g-dev
- libtinfo-dev
- wget
- bc
- upx
- openssl
env:
- MATRIX_EVAL="CC=gcc-4.9 && CXX=g++-4.9 && 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: xcode8.3
env:
- MATRIX_EVAL="NPROC=$(sysctl -n hw.physicalcpu)"
- CCACHE_CPP2=true
install:
# We need to install newer versions of Flex and Bison on MacOS X.
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install flex bison; fi
# ccache is not installed on OS X.
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install ccache; fi
# gnu-getopt
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install gnu-getopt; fi
# bash 4
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install bash; fi
[WIP] Convert Bash scripts to Python #147 (#338) * Convert most Bash scripts to Python * Port cmake/install-share to python * Some cleanup * Replaced install-share in cmake file with fully working python version * Attemp to fix compile error * Fix compile for older python version * Try calling python 3 instead * Make install-share.py executable Compilable decompiler version * Decompiler script now runs successfully until unpacking * Running until calling bin2llvmir now * [skip ci] Integrate @silverbacknet changes + some fixes * [skip ci] Use CmdRunner.run_cmd everywhere in retdec_decompiler Small fixes and cleanup Early out if an error occurs * [skip ci] Latest fixes add retdec_tests_runner.py * [skip ci] Check that options are correct + cleanup and fixes * [skip ci] Fixed various errors * Try to fix running install-share script * Should now work on every os * Fix compile error * Convert compile-yara to python * [skip ci] Make test runner more portable * [skip ci] Use correct code style * [skip ci] Decompiler script now runs successfully * Now generates the same output as the bash script * Try fixing Travis on macOS * Upgrade python instead * Test scripts in travis * Fix build * Fix path * Update build Small cleanup * Fix error in decompiler script * Try to debug failure reason Fix test runner Use Python 3.5 on ubuntu * Use newer Python version and fix some errors * [skip ci] Little cleanup to make the code more clear Don't parse_args twice * [skip ci] First version of reimplementing logging * [skip ci] Some fixes and cleanup * [skip ci] Print memory usage, print output from unpacker, match code convention and some other fixes * [skip ci] Fix crash when using cleanup option; fix crash when using color ida * [skip ci] Fix --backend-aggressive-opts argument * [skip ci] Fix error when file arch is followed by a comment * [skip ci] Match Bash script more closely * [skip ci] Fix a few comments * [skip ci] Add some comments * [skip ci] Add early type_extractor/gen_cstdlib_and_linux_jsons.py and type_extractor/gen_windows_and_windrivers_jsons.py version * Try Unit tests * Try to fix test * Use absolute path instead * [skip ci] Add check for python scripts * scripts/retdec_decompiler.py: use output if specified via -o option
2018-07-12 14:36:16 +00:00
# python 3
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew upgrade python; fi
2018-01-26 15:09:07 +00:00
before_script:
- eval "${MATRIX_EVAL}"
# We need to use newer versions of Flex and Bison on MacOS X (the ones from Homebrew).
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export CMAKE_INCLUDE_PATH="/usr/local/opt/flex/include"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export CMAKE_LIBRARY_PATH="/usr/local/opt/flex/lib;/usr/local/opt/bison/lib"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/opt/flex/bin:/usr/local/opt/bison/bin:$PATH"; fi
# Coreutils.
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="$(brew --prefix coreutils)/libexec/gnubin:$PATH"; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/opt/gnu-getopt/bin:$PATH"; fi
# We need to add ccache before everything else into PATH.
2018-01-26 15:09:07 +00:00
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then export PATH="/usr/local/opt/ccache/libexec:$PATH"; fi
script:
2018-07-19 13:47:29 +00:00
- python3 --version
- python3.5 --version
#- 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_TESTS=ON -DRETDEC_DEV_TOOLS=ON ..
#- 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.
#- python3 retdec-install/bin/retdec-tests-runner.py
## 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
2018-01-26 15:09:07 +00:00
branches:
only:
# Pushes and PRs to the master branch.
- master
# Version tags.
- /^v?\d+\.\d+.*$/
# TODO: temporary
- bash-to-python
2018-01-26 15:09:07 +00:00
notifications:
email:
on_success: never