Skip to content

Commit

Permalink
Radeco - integrate into the Travis build
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Kochkov committed Jun 18, 2019
1 parent 4a50767 commit e5ea107
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 77 deletions.
23 changes: 16 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ dist: xenial
language: rust
# No environment varibles by default
env:
# Necessary for `travis-cargo coveralls --no-sudo`
addons:
apt:
packages:
Expand All @@ -25,15 +26,16 @@ notifications:
email: false
os:
- linux

before_install:
# Install all required dependencies (radare2)
- ./scripts/install-dependencies.sh

before_script:
# Load travis-cargo
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH
# Clone and build radare2
- |
export CC=gcc-7 && export CXX=g++7 &&
git clone https://github.com/radare/radare2.git &&
cd ./radare2 && ./sys/install.sh && cd ../
# Clone and build capstone
- |
export CC=gcc-7 && export CXX=g++7 &&
Expand All @@ -43,18 +45,25 @@ before_script:
- |
rustup component add rustfmt
# the main build
script:
- |
travis-cargo build &&
travis-cargo test &&
chmod 644 src/middle/ir_reader/parser.rs &&
rustfmt src/middle/ir_reader/parser.rs
chmod 644 radeco-lib/src/middle/ir_reader/parser.rs &&
rustfmt radeco-lib/src/middle/ir_reader/parser.rs
travis-cargo fmt -- -- --check &&
travis-cargo bench
after_success:
# Upload the documentation from the build with stable (automatically only actually
# runs on the master branch, not individual PRs)
- travis-cargo --only nightly coveralls --no-sudo --verify
# Measure code coverage and upload to coveralls.io
- travis-cargo --only nightly doc-upload

env:
global:
# Override the default `--features unstable` used for the nightly branch (optional)
- TRAVIS_CARGO_NIGHTLY_FEATURE=""
- secure:"6Hai838Ii8T5f9g2HvioILGulY3aoH6gEQudAzeRW/EwJYyIS3dnd+dqzklxZg5NzDfS2iqcVc8KplevRviR6WLdGnpAWNyLqni+hJepNgpJESPH4g7jYYlmVK7VCXvhWKNpoYXd3Gjx6CLCpF2NVX3cnSKAgPz1SMMWm+ulAI8Bqj6NnG53fme6siQwyajVdKcsvawim2JlDtIl0sTsJDpAYr7ivQvc1MCjvLY1PUV5cUEGhnOJFv3RQS32gklGvk96FKFyb0kiPIsCvIIL4ZzeP8SpiJyW1DYNlUqMvxGwSzie8mowdNvh3gbzj9ll7y9B1bTYbaYY8ETLbqDtBZF52rC+4Cnxkbj9275ij7lvJcfr1wBvN1DxVmUnfWyWUBi2aQpNePmKJvMxLSlKW+U5diQrf/NS34gmblccv1aPQszT11Le5kVhZm4KEXQWvh/L4+NO/DOWRmHvBjHH+Ov/sHx59jbgd/OYsiIQ0WIWKaCIT/oU3w6jTBCeKzX7arw0k8hQlNdOKOJCdjAHsI50kln2yXm4rJnVnXaX7spJP1v00csbK95fjxn8dp/f4L6gWrBQzmeKTLjrMFQQTHAx+JC3Oigt28eKwkJVIo9cO25wdUD52rjPPTOMqVHONqpHq735sMYfDItKAG7FmQ427ZgfQRuRblvjijcexBM="
50 changes: 0 additions & 50 deletions radeco/.travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions radeco/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ authors = [
"pancake <pancake@nopcode.org>",
"Sushant <sushant.dinesh94@gmail.com>"
]
edition = "2018"
build = "build.rs"

[build-dependencies]
Expand Down
13 changes: 0 additions & 13 deletions radeco/scripts/install-dependencies.sh

This file was deleted.

18 changes: 11 additions & 7 deletions scripts/install-dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/usr/bin/env sh

echo "[*] Getting radare2" && \
cd ${HOME} && \
git clone https://github.com/radare/radare2 && \
cd radare2 && \
./sys/user.sh && \
export PATH=$PATH:${HOME}/bin && \
cd ${HOME}/build/radare/radeco-lib && \
# This is because Travis CI uses very old GCC version
# which still not have C99 as a default.
# .travis.yml has installation instructions for gcc-7
# Thus we enable it as a default compiler for dependencies
export CC=gcc-7
export CXX=g++-7

echo "[*] Getting radare2"
git clone https://github.com/radare/radare2 || exit 1
cd radare2 || exit 1
./sys/install.sh || exit 1
echo "[*] radare2 install success"

0 comments on commit e5ea107

Please sign in to comment.