mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-16 01:22:18 +03:00
Enable RE2 testing with Travis
Ubuntu 14.04 doesn't have RE2 package altogether, and Ubuntu 16.04 RE2 package is too old. Ubuntu 18.04 RE2 package might work, but this Ubuntu verison it's not supported by Travis yet. So build RE2 from source.
This commit is contained in:
@@ -30,6 +30,7 @@ env:
|
||||
- OPTS="--without-ssdeep $OPTS"
|
||||
- OPTS="--without-lua $OPTS"
|
||||
- OPTS="--without-maxmind $OPTS"
|
||||
- OPTS="--without-re2 $OPTS"
|
||||
|
||||
before_script:
|
||||
- echo $TRAVIS_OS_NAME
|
||||
@@ -41,6 +42,7 @@ before_script:
|
||||
- '[ "$TRAVIS_OS_NAME" != linux ] || sudo apt-get update'
|
||||
- '[ "$TRAVIS_OS_NAME" != linux ] || sudo apt-cache search maxmind'
|
||||
- '[ "$TRAVIS_OS_NAME" != linux ] || sudo apt-get install -y libmaxminddb-dev'
|
||||
- '[ "$OPTS" == "*--without-re2*" ] || ./.travis/install_re2.sh'
|
||||
|
||||
script:
|
||||
- ./build.sh
|
||||
|
||||
16
.travis/install_re2.sh
Executable file
16
.travis/install_re2.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Ubuntu 14.04 doesn't have RE2 package altogether,
|
||||
# and Ubuntu 16.04 RE2 package is too old.
|
||||
#
|
||||
# Ubuntu 18.04 RE2 package might work, but this Ubuntu verison it's not
|
||||
# supported by Travis yet.
|
||||
|
||||
RELEASE=2019-01-01
|
||||
|
||||
set -ex
|
||||
|
||||
cd /tmp
|
||||
wget https://github.com/google/re2/archive/$RELEASE.tar.gz -O re2.tar.gz
|
||||
tar -xf re2.tar.gz
|
||||
(cd re2-$RELEASE && make && sudo make install)
|
||||
Reference in New Issue
Block a user