From 525531f2fc6057528d1ab2315c1d9bae49c4efab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beat=20K=C3=BCng?= Date: Sat, 22 Sep 2018 09:03:59 +0200 Subject: [PATCH] Jenkins: add module config validation to CI --- Jenkinsfile | 13 +++++++++++++ Makefile | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 133278bc06..f0293fd64e 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -175,6 +175,19 @@ pipeline { } } + stage('Module Config Validation') { + agent { + docker { + image 'px4io/px4-dev-base:2018-09-11' + args '-e CCACHE_BASEDIR=$WORKSPACE -v ${CCACHE_DIR}:${CCACHE_DIR}:rw' + } + } + steps { + sh 'export' + sh 'make validate_module_configs' + } + } + } // parallel } // stage Analysis diff --git a/Makefile b/Makefile index 202492bad1..fa9a779169 100644 --- a/Makefile +++ b/Makefile @@ -347,7 +347,8 @@ python_coverage: # static analyzers (scan-build, clang-tidy, cppcheck) # -------------------------------------------------------------------- -.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet cppcheck shellcheck_all +.PHONY: scan-build posix_sitl_default-clang clang-tidy clang-tidy-fix clang-tidy-quiet +.PHONY: cppcheck shellcheck_all validate_module_configs scan-build: @export CCC_CC=clang @@ -386,6 +387,9 @@ shellcheck_all: @$(SRC_DIR)/Tools/run-shellcheck.sh $(SRC_DIR)/ROMFS/px4fmu_common/ @make px4fmu-v2_default shellcheck +validate_module_configs: + @find $(SRC_DIR)/src/modules $(SRC_DIR)/src/drivers $(SRC_DIR)/src/lib -name *.yaml -type f -print0 | xargs -0 $(SRC_DIR)/Tools/validate_yaml.py --schema-file $(SRC_DIR)/validation/module_schema.yaml + # Cleanup # -------------------------------------------------------------------- .PHONY: clean submodulesclean submodulesupdate gazeboclean distclean