Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 18 additions & 4 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ mkdir -p "${BUILD_DIR}"
[ -z "${PLUGIN_DIR}" ] && export PLUGIN_DIR=$HOME/plugin
mkdir -p "${PLUGIN_DIR}"

IWYU=""
MAKE_COMMAND="make -k -j \$(nproc)"
if [[ "${CXX}" == *clang* ]]; then
MAKE_COMMAND="make -k CXX=include-what-you-use CXXFLAGS=\"-Xiwyu --error_always\" -j \$(nproc)"
IWYU="-DCMAKE_CXX_INCLUDE_WHAT_YOU_USE=iwyu"
fi

echo "make command: ${MAKE_COMMAND}"
echo "IWYU option: ${IWYU}"

BAZEL_OPTIONS_DEFAULT="--copt=-DENABLE_LOGS_PREVIEW --copt=-DENABLE_TEST --copt=-DENABLE_METRICS_EXEMPLAR_PREVIEW"
BAZEL_OPTIONS="--cxxopt=-std=c++14 $BAZEL_OPTIONS_DEFAULT"

Expand Down Expand Up @@ -107,8 +117,9 @@ elif [[ "$1" == "cmake.maintainer.sync.test" ]]; then
-DWITH_ASYNC_EXPORT_PREVIEW=OFF \
-DOTELCPP_MAINTAINER_MODE=ON \
-DWITH_NO_DEPRECATED_CODE=ON \
${IWYU} \
"${SRC_DIR}"
make -k
eval "$MAKE_COMMAND"
make test
exit 0
elif [[ "$1" == "cmake.maintainer.async.test" ]]; then
Expand All @@ -129,8 +140,9 @@ elif [[ "$1" == "cmake.maintainer.async.test" ]]; then
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DOTELCPP_MAINTAINER_MODE=ON \
-DWITH_NO_DEPRECATED_CODE=ON \
${IWYU} \
"${SRC_DIR}"
make -k -j $(nproc)
eval "$MAKE_COMMAND"
make test
exit 0
elif [[ "$1" == "cmake.maintainer.cpp11.async.test" ]]; then
Expand Down Expand Up @@ -201,8 +213,9 @@ elif [[ "$1" == "cmake.c++20.test" ]]; then
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DCMAKE_CXX_STANDARD=20 \
${IWYU} \
"${SRC_DIR}"
make -j $(nproc)
eval "$MAKE_COMMAND"
make test
exit 0
elif [[ "$1" == "cmake.c++20.stl.test" ]]; then
Expand All @@ -214,8 +227,9 @@ elif [[ "$1" == "cmake.c++20.stl.test" ]]; then
-DCMAKE_CXX_FLAGS="-Werror $CXXFLAGS" \
-DWITH_ASYNC_EXPORT_PREVIEW=ON \
-DWITH_STL=ON \
${IWYU} \
"${SRC_DIR}"
make -j $(nproc)
eval "$MAKE_COMMAND"
make test
exit 0
elif [[ "$1" == "cmake.legacy.test" ]]; then
Expand Down
3 changes: 2 additions & 1 deletion ci/setup_ci_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@ apt-get install --no-install-recommends --no-install-suggests -y \
wget \
git \
valgrind \
lcov
lcov \
iwyu