1 Star 0 Fork 0

假如大叔有时光机/rabbitmq-c

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
travis.sh 2.27 KB
一键复制 编辑 原始数据 按行查看 历史
#!/usr/bin/env bash
build_cmake() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Wno-implicit-fallthrough -Werror"
cmake --build . --target install
ctest -V .
}
build_macos() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_INSTALL_PREFIX=$PWD/../_install -DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror" \
-DOPENSSL_ROOT_DIR="/usr/local/opt/openssl@1.1"
cmake --build . --target install
ctest -V .
}
build_format() {
sudo apt-get install -y clang-format
./travis/run-clang-format/run-clang-format.py \
--clang-format-executable="${PWD}/travis/clang-format.sh" \
--recursive examples librabbitmq tests tools
}
build_coverage() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_BUILD_TYPE=Coverage -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror -fprofile-arcs -ftest-coverage"
cmake --build . --target install
ctest -V .
pip install --user cpp-coveralls
coveralls --exclude tests --build-root . --root .. --gcov-options '\-lp'
}
build_asan() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror -fsanitize=address,undefined -O1"
cmake --build . --target install
ctest -V .
}
build_tsan() {
mkdir $PWD/_build && cd $PWD/_build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror -fsanitize=thread,undefined -O1"
cmake --build . --target install
ctest -V .
}
build_scan-build() {
sudo apt-get install -y clang-tools
mkdir $PWD/_build && cd $PWD/_build
scan-build cmake .. -DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_INSTALL_PREFIX=$PWD/../_install \
-DCMAKE_C_FLAGS="-Wall -Wextra -Wstrict-prototypes -Wno-unused-function -Werror"
scan-build make install
}
if [ "$#" -ne 1 ]; then
echo "Usage: $0 {cmake|macos|format|coverage|asan|tsan|scan-build}"
exit 1
fi
set -e # exit on error.
set -x # echo commands.
eval "build_$1"
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/evelive3/rabbitmq-c.git
git@gitee.com:evelive3/rabbitmq-c.git
evelive3
rabbitmq-c
rabbitmq-c
master

搜索帮助