From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp57.i.mail.ru (smtp57.i.mail.ru [217.69.128.37]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D65524696C0 for ; Thu, 4 Jun 2020 11:41:06 +0300 (MSK) From: sergeyb@tarantool.org Date: Thu, 4 Jun 2020 11:39:07 +0300 Message-Id: <583d21ee6a9849ea4eaa8e5c133c1bc5fa36c577.1591259297.git.sergeyb@tarantool.org> In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH 3/6] gitlab-ci: enable static analysis with luacheck List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: tarantool-patches@dev.tarantool.org, imun@tarantool.org, v.shpilevoy@tarantool.org Cc: alexander.turenko@tarantool.org From: Sergey Bronnikov Part of #4681 --- .gitlab-ci.yml | 11 +++++++++++ .travis.mk | 23 ++++++++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7705631dd..041653dae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,5 @@ stages: + - static_analysis - test - perf - cleanup @@ -107,6 +108,16 @@ variables: script: - ${GITLAB_MAKE} perf_cleanup +# Static Analysis + +luacheck: + <<: *docker_test_definition + stage: static_analysis + tags: + - deploy_test + script: + - ${GITLAB_MAKE} test_debian_docker_luacheck + # Tests release: diff --git a/.travis.mk b/.travis.mk index 063537f25..aaceaab34 100644 --- a/.travis.mk +++ b/.travis.mk @@ -3,9 +3,11 @@ # DOCKER_IMAGE?=packpack/packpack:debian-stretch +DOCKER_IMAGE_TARANTOOL="registry.gitlab.com/tarantool/tarantool/testing/debian-stretch:latest" TEST_RUN_EXTRA_PARAMS?= MAX_FILES?=65534 MAX_PROC?=2500 +OOS_SRC_PATH="/source" all: package @@ -76,8 +78,10 @@ deps_buster_clang_8: deps_debian # Release -build_debian: +configure_debian: cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_WERROR=ON ${CMAKE_EXTRA_PARAMS} + +build_debian: configure_debian make -j test_debian_no_deps: build_debian @@ -146,6 +150,23 @@ test_static_build: deps_debian_static test_static_docker_build: docker build --no-cache --network=host --build-arg RUN_TESTS=ON -f Dockerfile.staticbuild . +# ################### +# Static Analysis +# ################### + +test_debian_docker_luacheck: + docker run -w ${OOS_SRC_PATH} -v ${PWD}:${OOS_SRC_PATH} --privileged \ + --cap-add=sys_nice --network=host -i ${DOCKER_IMAGE_TARANTOOL} \ + make -f .travis.mk test_debian_luacheck + +test_debian_install_luacheck: + apt update -y + apt install -y lua5.1 luarocks + luarocks install luacheck + +test_debian_luacheck: test_debian_install_luacheck configure_debian + make luacheck + ####### # OSX # ####### -- 2.23.0