提交 92c6810f 编写于 作者: L liuxu 提交者: Liu Jiaming

ci: apollo_ci.sh improvement

上级 b353ea2d
......@@ -176,6 +176,9 @@ function main() {
citest)
env ${APOLLO_ENV} bash "${ci_sh}" "test"
;;
cilint)
env ${APOLLO_ENV} bash "${ci_sh}" "lint"
;;
check)
build_test_and_lint
;;
......
......@@ -10,27 +10,34 @@ ARCH="$(uname -m)"
APOLLO_BUILD_SH="${APOLLO_ROOT_DIR}/scripts/apollo_build.sh"
APOLLO_TEST_SH="${APOLLO_ROOT_DIR}/scripts/apollo_test.sh"
APOLLO_LINT_SH="${APOLLO_ROOT_DIR}/scripts/apollo_lint.sh"
function run_ci_build() {
info "Running CI Build ..."
env USE_ESD_CAN=${USE_ESD_CAN} bash "${APOLLO_BUILD_SH}"
}
function run_ci_test() {
info "Running CI Test ..."
env USE_ESD_CAN=${USE_ESD_CAN} bash "${APOLLO_TEST_SH}" --config=unit_test
}
function run_ci_lint() {
env USE_ESD_CAN=${USE_ESD_CAN} bash "${APOLLO_LINT_SH}" cpp
}
function main() {
local cmd="$1"
if [ -z "${cmd}" ]; then
cmd="build"
fi
if [ "$1" == "test" ]; then
if [ "${cmd}" == "test" ]; then
info "Running CI Test ..."
run_ci_test
else
elif [ "${cmd}" == "build" ]; then
info "Running CI Build ..."
run_ci_build
elif [ "${cmd}" == "lint" ]; then
info "Running CI Lint ..."
run_ci_lint
fi
success "ci${cmd} finished."
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册