-
Notifications
You must be signed in to change notification settings - Fork 70
/
.travis.yml
74 lines (67 loc) · 1.57 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
language: c++
dist: trusty
sudo: true
env:
global:
- TRAVIS_ENCRYPTION_LABEL="d0f036b99c7e"
matrix:
include:
- os: linux
- os: osx
addons:
apt:
sources:
- llvm-toolchain-trusty-4.0
- ubuntu-toolchain-r-test
packages:
- clang-4.0
- clang-4.0-dev
- cmake
- cmake-data
- libz-dev
- libedit-dev
- llvm-4.0
- llvm-4.0-dev
- libstdc++-6-dev
- python-dev
before_install:
- git clone "https://github.com/zneak/fcd-tests.git" tests
install:
-
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
curl -Ls https://github.com/aquynh/capstone/archive/3.0.4.tar.gz -o capstone-3.0.4.tar.gz;
tar -xf capstone-3.0.4.tar.gz;
pushd capstone-3.0.4;
make -j3;
sudo make install;
popd;
else
brew update;
brew install capstone;
mkdir -p "llvm";
curl -s "http://llvm.org/pre-releases/4.0.0/rc2/clang+llvm-4.0.0-rc2-x86_64-apple-darwin.tar.xz" -o llvm.tar.xz;
tar -xf llvm.tar.xz --strip-components=1 -C llvm;
fi;
script:
-
if [ "${TRAVIS_OS_NAME}" = "linux" ]; then
rm -rf build && mkdir build && pushd build;
export LLVM_DIR="/usr/lib/llvm-4.0/lib/cmake/llvm/";
export CC="clang-4.0" CXX="clang++-4.0";
cmake ..;
if make -j3; then
export FCD="build/fcd";
else
exit 1;
fi;
popd;
else
if xcodebuild -target fcd -configuration Release CAPSTONE_DIR="/usr/local/Cellar/capstone/3.0.4" LLVM_BUILD_DIR="llvm"; then
export FCD="build/Release/fcd";
else
exit 1;
fi;
fi;
after_success:
-
tests/test.sh "${FCD}" "$(git rev-parse --verify HEAD)"