-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
79 lines (67 loc) · 2.75 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
75
76
77
78
79
language: python # Need python environment for pip
sudo: false # Use container-based infrastructure
addons:
apt:
sources:
- kubuntu-backports
- ubuntu-toolchain-r-test
packages:
- gcc-4.8
- g++-4.8
- cmake
- ragel
- valgrind # for /usr/lib/valgrind/default.supp
- libc6-dbg
env:
- LUA="lua 5.1"
- LUA="lua 5.2"
- LUA="lua 5.3"
- LUA="luajit 2.0"
- LUA="luajit 2.1"
before_install:
# use gcc 4.8
- export CC=gcc-4.8
- export CXX=g++-4.8
- export HYPERSCAN_VERSION=4.3.1
- export HYPERSCAN_SHA256=a7bce1287c06d53d1fb34266d024331a92ee24cbb2a7a75061b4ae50a30bae97
# valgrind 3.10.1
# https://github.com/travis-ci/apt-source-whitelist/issues/261
- wget 'http://ppa.launchpad.net/nodakai/valgrind/ubuntu/pool/main/v/valgrind/valgrind_3.10.1-0ppa0~ubuntu12.04.5_amd64.deb'
- ar vx valgrind_3.10.1-0ppa0~ubuntu12.04.5_amd64.deb
- tar -xf data.tar.gz
- mv usr/{lib,bin} /tmp/
- perl -pi -e 's@/usr/lib/valgrind@/tmp/lib/valgrind@g;' /tmp/lib/valgrind/*-lin /tmp/bin/valgrind.bin
# hyperscan and its dependencies
- wget -O "hyperscan-${HYPERSCAN_VERSION}.tar.gz" "https://github.com/01org/hyperscan/archive/v${HYPERSCAN_VERSION}.tar.gz"
- echo "${HYPERSCAN_SHA256} hyperscan-${HYPERSCAN_VERSION}.tar.gz" | sha256sum -c -
- tar -xf "hyperscan-${HYPERSCAN_VERSION}.tar.gz"
# boost
- wget 'http://downloads.sourceforge.net/project/boost/boost/1.60.0/boost_1_60_0.tar.bz2'
- echo '686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b boost_1_60_0.tar.bz2' | sha256sum -c -
- tar -xf boost_1_60_0.tar.bz2
- ln -s ../../boost_1_60_0/boost "hyperscan-${HYPERSCAN_VERSION}/include/"
# build hyperscan
- mkdir hyperscan-build
- cd hyperscan-build
- cmake "../hyperscan-${HYPERSCAN_VERSION}" -DCMAKE_INSTALL_PREFIX=$(pwd)/../hyperscan-install/ -DBUILD_SHARED_LIBS=ON
- make -j 2
- make install
- cd ..
- export LD_LIBRARY_PATH="$(pwd)/hyperscan-install/lib/:$LD_LIBRARY_PATH"
# Lua
- pip install hererocks
- pip install cpp-coveralls
- hererocks here --$LUA --luarocks "2.2"
- export PATH=$PATH:$PWD/here/bin
- luarocks install busted
install:
- luarocks make HS_DIR=$(pwd)/hyperscan-install/ CFLAGS="-O0 -fPIC --coverage" LIBFLAG="-shared --coverage"
script:
- busted
- if [[ "$LUA" != *"luajit"* ]]; then /tmp/bin/valgrind --suppressions=/usr/lib/valgrind/default.supp --error-exitcode=1 --leak-check=full lua spec/exitless-busted.lua; fi
after_success:
# Disable timestamp check of gcno and gcda.
# See http://stackoverflow.com/q/22860538
# Some .o are rebuilt two times because of luahs_runtime.
- for i in src/luahs/*.gcno; do dd conv=notrunc if=$i bs=1 skip=8 count=4 of=$(echo $i | sed 's/gcno$/gcda/') seek=8; done
- coveralls -b . -i src/luahs