加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
.travis.yml 3.90 KB
一键复制 编辑 原始数据 按行查看 历史
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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化