Skip to content

[Added] travis ci config file and requirements. #2

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Mar 21, 2017
Merged
18 changes: 13 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require: sudo
dist: trusty
sudo: required

language: rust
rust:
Expand All @@ -11,18 +12,25 @@ addons:
packages:
- gcc-6
- g++-6
- cmake
- ragel
- python3
- libboost-all-dev
- libpcap0.8-dev
- autoconf
- automake
- autopoint
- gettext
- libtool

before_install:
install:
- sudo add-apt-repository ppa:kzemek/boost -y
- sudo add-apt-repository ppa:george-edison55/cmake-3.x -y
- sudo apt-get update -q
- sudo apt-get install libboost1.58-dev cmake -y
- sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 1 --slave /usr/bin/g++ g++ /usr/bin/g++-6
- sudo update-alternatives --set gcc /usr/bin/gcc-6

before_script:
- mkdir build && cd build && cmake ..

install:
script:
- make
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Regex Performance #
######################

cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.0)

project(RegexPeformance C CXX)

Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,27 @@
# Regex Performance
[![Build Status](https://travis-ci.org/rust-leipzig/regex-performance.svg?branch=master)](https://travis-ci.org/rust-leipzig/regex-performance)

## Introduction
Regular expressions are commonly used in pattern search algorithms.
This tool is based on the work of John Maddock (See his own regex comparison [here](http://www.boost.org/doc/libs/1_41_0/libs/regex/doc/gcc-performance.html))
and the sljit project (See their regex comparison [here](http://sljit.sourceforge.net/regex_perf.html)).

## Requirements
| dependency | version |
|------------|----------|
| Cmake | >=3.0 |
| Ragel | 6.9 |
| Python | >=3.0 |
| Boost | >=1.57 |
| Pcap | >=0.8 |
| Autoconf | 2.69 (*) |
| Automake | 1.15 (*) |
| Autopoint | 0.19.7 (*)|
| Gettext | 0.19.7 (*)|
| Libtool | 2.4.6 (*)|
| Git | 2.11.0 (*)|

(*) Tested with named version only. Older versions may work too.

## Supported engines
The following regex engines are supported and covered by the tool:
Expand Down Expand Up @@ -48,3 +65,9 @@ The overall time to process each regular expression is measured and accounted.
The scoring algorithhm distributes the fastest engine 5 points, the second fastest 4 points and so on.
The score points help to limit the impact of a slow regular expression eninge test in comparision to
the absolut time value.

You can specify a file to write the test results per expression and engine:
```bash
./src/regex_perf -f ./3200.txt -o ./results.csv
```
The test tool writes the results in a csv-compatible format.
10 changes: 5 additions & 5 deletions vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ include(ExternalProject)
ExternalProject_Add(libhs
GIT_REPOSITORY https://github.com/01org/hyperscan.git
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}
SOURCE_DIR hyperscan
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/hyperscan
TMP_DIR ${PROJECT_BINARY_DIR}/hyperscan-tmp
STAMP_DIR ${PROJECT_BINARY_DIR}/hyperscan-stamp
BINARY_DIR ${PROJECT_BINARY_DIR}/hyperscan-build
Expand All @@ -16,7 +16,7 @@ ExternalProject_Add(libhs
ExternalProject_Add(libonig
GIT_REPOSITORY https://github.com/kkos/oniguruma
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}
SOURCE_DIR oniguruma
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/oniguruma
TMP_DIR ${PROJECT_BINARY_DIR}/oniguruma-tmp
STAMP_DIR ${PROJECT_BINARY_DIR}/oniguruma-stamp
BINARY_DIR ${PROJECT_BINARY_DIR}/oniguruma-build
Expand All @@ -28,7 +28,7 @@ ExternalProject_Add(libonig
ExternalProject_Add(libre2
GIT_REPOSITORY https://github.com/google/re2.git
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}
SOURCE_DIR re2
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/re2
TMP_DIR ${PROJECT_BINARY_DIR}/re2-tmp
STAMP_DIR ${PROJECT_BINARY_DIR}/re2-stamp
BINARY_DIR ${PROJECT_BINARY_DIR}/re2-build
Expand All @@ -40,7 +40,7 @@ ExternalProject_Add(libre2
ExternalProject_Add(libtre
GIT_REPOSITORY https://github.com/laurikari/tre.git
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}
SOURCE_DIR tre
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/tre
TMP_DIR ${PROJECT_BINARY_DIR}/tre-tmp
STAMP_DIR ${PROJECT_BINARY_DIR}/tre-stamp
BINARY_DIR ${PROJECT_BINARY_DIR}/tre-build
Expand All @@ -52,7 +52,7 @@ ExternalProject_Add(libtre
ExternalProject_Add(libpcre2
URL https://ftp.pcre.org/pub/pcre/pcre2-10.23.tar.gz
PREFIX ${CMAKE_CURRENT_SOURCE_DIR}
SOURCE_DIR pcre2
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/pcre2
TMP_DIR ${PROJECT_BINARY_DIR}/pcre2-tmp
STAMP_DIR ${PROJECT_BINARY_DIR}/pcre2-stamp
BINARY_DIR ${PROJECT_BINARY_DIR}/pcre2-build
Expand Down