-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy path.travis.yml
58 lines (52 loc) · 1.96 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
language: python
matrix:
include:
- os: linux
dist: trusty
sudo: required
python: 2.7
virtualenv:
system_site_packages: true
env:
- R2_VERSION=2.9.0 R2M2_UBUNTU=yes
- os: linux
dist: trusty
python: 2.7
sudo: required
env:
- R2M2_DOCKER=yes
- os: osx
language: generic
osx_image: xcode7.3
env:
- R2_VERSION=3.4.0 R2M2_OSX=yes
before_install:
- if [ ! -z $R2M2_DOCKER ]; then docker build -t travis/r2m2 . ; fi
install:
### Ubuntu & OS X ###
# Install C related dependencies
- if [ ! -z $R2M2_UBUNTU ]; then sudo apt-get install make gcc git pkg-config; fi
# Install Python related dependencies
- if [ ! -z $R2M2_UBUNTU ]; then sudo apt-get install libffi-dev libpython-dev; fi
- if [ -z $R2M2_DOCKER ]; then pip2 install cffi jinja2; fi
# Install radare2
- if [ -z $R2M2_DOCKER ]; then git clone https://github.com/radare/radare2 --depth 1 --branch $R2_VERSION; cd radare2; ./configure; cd shlr; make capstone-sync; cd ..; ./sys/user.sh --without-pull; cd ..; fi
- if [ -z $R2M2_DOCKER ]; then export PATH=$HOME/bin/:$PATH; fi
- if [ -z $R2M2_DOCKER ]; then export PKG_CONFIG_PATH=~/bin/prefix/radare2/lib/pkgconfig/; fi
# Install miasm2
- if [ -z $R2M2_DOCKER ]; then pip2 install pyparsing future; fi
- if [ -z $R2M2_DOCKER ]; then git clone https://github.com/cea-sec/miasm --depth 1; fi
# Install bats
- if [ -z $R2M2_DOCKER ]; then git clone https://github.com/sstephenson/bats --depth 1; fi
- if [ -z $R2M2_DOCKER ]; then export PATH=bats/bin:$PATH; fi
script:
- env
### Ubuntu & OS X ###
# Build & install r2m2
- if [ -z $R2M2_DOCKER ]; then make install; fi
- if [ -z $R2M2_DOCKER ]; then export PYTHONPATH=miasm/; fi
# Launch tests
- if [ -z $R2M2_DOCKER ]; then bats test/r2m2.bats; fi
### Docker ###
# Launch Docker based tests
- if [ ! -z $R2M2_DOCKER ]; then docker run --rm -it travis/r2m2 bats test/r2m2.bats; fi