forked from ossec/ossec-hids
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
94 lines (79 loc) · 3.9 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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
language: c
dist: bionic
notifications:
irc:
- "chat.freenode.net#ossec"
slack:
secure: Cz1InEL5G+z2huuzilXe7BqfxlEjN4io5ylJa5jgPvGMlB5sIQZTQQ7PDrzcK0iwn+5xgDkXKwbNPV2k+NHNTtNFiuBrcnJbyeA8PjghtAw4hg/Vpl5+5ovySZT9pGSV7ySsA8nGD73hlcQFgWnYDhsugQ6UZyRXAN8vLLCLjPg=
env:
- DB=mysql OSSEC_TYPE=server GEOIP=yes PCRE2_SYSTEM=no
- DB=mysql OSSEC_TYPE=server GEOIP=no PCRE2_SYSTEM=no
- DB=pgsql OSSEC_TYPE=server GEOIP=yes PCRE2_SYSTEM=no
- DB=pgsql OSSEC_TYPE=server GEOIP=no PCRE2_SYSTEM=no
- DB=none OSSEC_TYPE=server GEOIP=yes PCRE2_SYSTEM=no
- DB=none OSSEC_TYPE=server GEOIP=no PCRE2_SYSTEM=no
- DB=none OSSEC_TYPE=server PRELUDE=yes ZEROMQ=yes PCRE2_SYSTEM=no
- DB=none OSSEC_TYPE=server ZLIB_SYSTEM=yes LUA_ENABLE=no PCRE2_SYSTEM=no
- DB=none OSSEC_TYPE=local GEOIP=no PCRE2_SYSTEM=no
- DB=none OSSEC_TYPE=hybrid GEOIP=no PCRE2_SYSTEM=no
- DB=none OSSEC_TYPE=agent GEOIP=no PCRE2_SYSTEM=no
- OSSEC_TYPE=test PCRE2_SYSTEM=no
- OSSEC_TYPE=server RULES=test PCRE2_SYSTEM=no
compiler:
- gcc
- clang
arch:
- amd64
- arm64
matrix:
fast_finish: true
exclude:
- arch: arm64
env: DB=none OSSEC_TYPE=winagent GEOIP=no PCRE2_SYSTEM=no
- compiler: clang
env: DB=none OSSEC_TYPE=winagent GEOIP=no PCRE2_SYSTEM=no
- compiler: clang
env: OSSEC_TYPE=server RULES=test PCRE2_SYSTEM=no
jobs:
include:
- arch: arm64
compiler: gcc
env: DB=none OSSEC_TYPE=agent GEOIP=no PCRE2_SYSTEM=yes ARCH=arm64
env: OSSEC_TYPE=server RULES=test
before_script:
- sudo apt-get update -qq
- sudo apt-get install -y libevent-dev libsystemd-dev
- ( wget https://ftp.pcre.org/pub/pcre/pcre2-10.32.tar.gz
&& tar xzf pcre2-10.32.tar.gz -C src/external )
- if [[ "${GEOIP}" == "yes" ]]; then ( sudo apt-get install geoip-bin geoip-database libgeoip-dev libgeoip1 ); fi
- if [[ "${PRELUDE}" == "yes" ]]; then ( sudo apt-get install libprelude-dev ); fi
- if [[ "${ZEROMQ}" == "yes" ]]; then ( sudo apt-get install libzmq3-dev libtool autoconf libczmq-dev ); fi
- if [[ "${OSSEC_TYPE}" == "winagent" ]]; then ( sudo apt-get install aptitude && sudo aptitude -y install mingw-w64 nsis ); fi
- if [[ "${OSSEC_TYPE}" == "server" ]]; then ( sudo apt-get install libsqlite3-dev sqlite3 ); fi
- if [[ "${OSSEC_TYPE}" == "test" ]]; then if [ `uname -m` = "aarch64" ]; then (sudo apt-get install check libc6-dbg && wget -q http://ports.ubuntu.com/pool/main/v/valgrind/valgrind_3.15.0-1ubuntu9.1_arm64.deb && sudo dpkg -i valgrind_3.15.0-1ubuntu9.1_arm64.deb ) ; else ( sudo apt-get install check valgrind ); fi; fi
script:
- COMMAND="V=1 TARGET=${OSSEC_TYPE}"
&& if ! [[ "${DB}" = "none" ]]; then COMMAND="${COMMAND} DATABASE=${DB}"; fi
&& if [[ "${GEOIP}" = "yes" ]]; then COMMAND="${COMMAND} USE_GEOIP=1"; fi
&& if [[ "${PRELUDE}" = "yes" ]]; then COMMAND="${COMMAND} USE_PRELUDE=1"; fi
&& if [[ "${ZEROMQ}" = "yes" ]]; then COMMAND="${COMMAND} USE_ZEROMQ=1"; fi
&& if [[ "${OSSEC_TYPE}" = "test" ]]; then COMMAND="${COMMAND} USE_PCRE2_JIT=0"; fi
&& if [[ "${ARCH}" = "arm64" ]]; then ./build.sh; fi
&& ( cd src/
&& make --warn-undefined-variables ${COMMAND} settings
&& make --warn-undefined-variables ${COMMAND} external -j
&& make --warn-undefined-variables ${COMMAND} -j )
&& if ! [[ "${OSSEC_TYPE}" = "test" || "${OSSEC_TYPE}" = "winagent" ]]; then ( cd src/ && sudo make --warn-undefined-variables ${COMMAND} install ) fi
- if [[ "${OSSEC_TYPE}" == "test" ]]; then ( cd src/ && make --warn-undefined-variables test_valgrind ) fi
- if [[ "${RULES}" == "test" ]]; then ( cd src/ && sudo make V=1 TARGET=server test-rules ) fi
deploy:
provider: releases
api_key:
secure: "DiVPTCt1C8XCmFlzcpmFkqfRmxz85/RCE2euvU/c1EiABjfO20aZARCC9zsepAwAGWWsq3uGRLp0aVuJuh4LvTdGxIJDOqYR8z1pByfY4epgE7zmRCIWjx+nAwBpLlfYalMWFpt7vmPp9mKycFkUR2NFoiEfOgoO9wGN0ZgmwSM="
file: src/win-pkg/ossec-win32-agent.exe
skip_cleanup: true
on:
tags: true
all_branches: true
repo: ossec/ossec-hids
condition: $OSSEC_TYPE = winagent