From 84b91698a88852a7287f7b7204c5307e1bac5438 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Sat, 8 Oct 2022 20:06:08 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D1=83=D1=82=D1=8C=20=D0=BA=20cmake=20?= =?UTF-8?q?=D0=B7=D0=B0=D0=B4=D0=B0=D1=91=D1=82=D1=81=D1=8F=20=D0=BF=D0=B5?= =?UTF-8?q?=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=BE=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scheduled.yml | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/scheduled.yml b/scheduled.yml index 2bc293b..1e76271 100644 --- a/scheduled.yml +++ b/scheduled.yml @@ -4,6 +4,7 @@ variables: CI_SOURCE_DIR: . CI_BUILD_DIR: _build CI_OUTPUT_DIR: _output + CI_CMAKE: /usr/bin/cmake .add-ssh-key: before_script: @@ -59,22 +60,22 @@ variables: if [ -n "${CONFIGURE_CMD}" ]; then ${CONFIGURE_CMD} else - cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CI_OUTPUT_DIR} -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/ecs5 -B${CI_BUILD_DIR} -H. + ${CI_CMAKE} -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${CI_OUTPUT_DIR} -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/ecs5 -B${CI_BUILD_DIR} -H. fi - > if [ -n "${BUILD_CMD}" ]; then ${BUILD_CMD} else - cmake --build ${CI_BUILD_DIR} + ${CI_CMAKE} --build ${CI_BUILD_DIR} fi - > if [ -z "${CI_SHARED_ENVIRONMENT+x}" ]; then if [ -n "${PACKAGE_CMD}" ]; then ${PACKAGE_CMD} else - cmake --install ${CI_BUILD_DIR} - cmake --build ${CI_BUILD_DIR} --target package - cmake --build ${CI_BUILD_DIR} --target package_source + ${CI_CMAKE} --install ${CI_BUILD_DIR} + ${CI_CMAKE} --build ${CI_BUILD_DIR} --target package + ${CI_CMAKE} --build ${CI_BUILD_DIR} --target package_source fi fi - echo "${CI_COMMIT_SHA}" > "${CI_JOB_NAME}.status" @@ -118,6 +119,9 @@ variables: expire_in: 10 days .scheduled-mxe-focal: + variables: + CI_CMAKE: /usr/lib/mxe/usr/bin/cmake-configure-file + CI_USE_MXE: 1 extends: .scheduled-test image: mxe-focal-dev tags: ['docker'] @@ -169,8 +173,8 @@ variables: before_script: - !reference [.add-ssh-key, before_script] script: - - cmake -B ${CI_BUILD_DIR} . - - cmake --build ${CI_BUILD_DIR} --target check-format-sources + - ${CI_CMAKE} -B ${CI_BUILD_DIR} . + - ${CI_CMAKE} --build ${CI_BUILD_DIR} --target check-format-sources .myx-cmake-uncrustify-check: extends: .use-ninja @@ -179,8 +183,8 @@ variables: before_script: - !reference [.add-ssh-key, before_script] script: - - cmake -B ${CI_BUILD_DIR} . - - cmake --build ${CI_BUILD_DIR} --target myx-uncrustify-check + - ${CI_CMAKE} -B ${CI_BUILD_DIR} . + - ${CI_CMAKE} --build ${CI_BUILD_DIR} --target myx-uncrustify-check .format-sources-check-custom: extends: .use-ninja @@ -240,7 +244,7 @@ variables: if [ -n "${CUSTOM_ANALYZE_PVS}" ]; then ${CUSTOM_ANALYZE_PVS} else - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ${CI_BUILD_DIR} . + ${CI_CMAKE} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ${CI_BUILD_DIR} . pvs-studio-analyzer analyze -a 29 -f ${CI_BUILD_DIR}/compile_commands.json -j -o ${CI_BUILD_DIR}/PVS-Studio.log plog-converter -a "GA:1,2,3;64:1;OP:1,2;CS:1,2" -t errorfile ${CI_BUILD_DIR}/PVS-Studio.log fi @@ -257,7 +261,7 @@ variables: if [ -n "${CUSTOM_ANALYZE_CLANG_TIDY}" ]; then ${CUSTOM_ANALYZE_CLANG_TIDY} else - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ${CI_BUILD_DIR} . + ${CI_CMAKE} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ${CI_BUILD_DIR} . run-clang-tidy-14 -checks=-*,bugprone-*,clang-analyzer-*,misc-*,modernize-*,performance-*,portability-* -p ${CI_BUILD_DIR} fi @@ -273,7 +277,7 @@ variables: if [ -n "${CUSTOM_ANALYZE_CLAZY}" ]; then ${CUSTOM_ANALYZE_CLAZY} else - cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ${CI_BUILD_DIR} . + ${CI_CMAKE} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ${CI_BUILD_DIR} . find . -name "*.cpp" -print0 | xargs -0 clazy-standalone --ignore-dirs=/usr -checks=level2 -p ${CI_BUILD_DIR}/compile_commands.json fi @@ -285,8 +289,8 @@ variables: before_script: - !reference [.add-ssh-key, before_script] script: - - cmake -B ${CI_BUILD_DIR} . - - cmake --build ${CI_BUILD_DIR} --target myx-cmake-analyze-pvs-studio --parallel + - ${CI_CMAKE} -B ${CI_BUILD_DIR} . + - ${CI_CMAKE} --build ${CI_BUILD_DIR} --target myx-cmake-analyze-pvs-studio --parallel .myx-cmake-analyze-clang-tidy: extends: .use-ninja @@ -296,8 +300,8 @@ variables: before_script: - !reference [.add-ssh-key, before_script] script: - - cmake -B ${CI_BUILD_DIR} . - - cmake --build build --target myx-cmake-analyze-clang-tidy --parallel + - ${CI_CMAKE} -B ${CI_BUILD_DIR} . + - ${CI_CMAKE} --build build --target myx-cmake-analyze-clang-tidy --parallel .myx-cmake-analyze-clazy: extends: .use-ninja @@ -306,6 +310,6 @@ variables: before_script: - !reference [.add-ssh-key, before_script] script: - - cmake -B ${CI_BUILD_DIR} . - - cmake --build ${CI_BUILD_DIR} --target myx-cmake-analyze-clazy --parallel + - ${CI_CMAKE} -B ${CI_BUILD_DIR} . + - ${CI_CMAKE} --build ${CI_BUILD_DIR} --target myx-cmake-analyze-clazy --parallel