Оптимизация шаблона
This commit is contained in:
parent
948fa3cf78
commit
a68e81fb74
167
scheduled.yml
167
scheduled.yml
@ -5,9 +5,72 @@ variables:
|
||||
CI_BUILD_DIR: _build
|
||||
CI_OUTPUT_DIR: _output
|
||||
|
||||
.scheduled-test:
|
||||
.use-clang:
|
||||
variables:
|
||||
CXX: clang++-14
|
||||
CC: clang-14
|
||||
|
||||
.use-ninja:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
|
||||
|
||||
.qmake-script:
|
||||
variables:
|
||||
QT_SELECT: qt5
|
||||
script:
|
||||
- >
|
||||
if [ -f "${CI_JOB_NAME}.status" ]; then
|
||||
if [ "$(cat ${CI_JOB_NAME}.status)" == "${CI_COMMIT_SHA}" ]; then
|
||||
echo "=== Commit ${CI_COMMIT_SHORT_SHA} already tested with job ${CI_JOB_NAME} ==="
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
- rm -f ${CI_JOB_NAME}.status
|
||||
- mkdir -p ${CI_BUILD_DIR}
|
||||
- qmake -o ${CI_BUILD_DIR} ${QMAKE_PRO_FILE}
|
||||
- make -j8 -C ${CI_BUILD_DIR}
|
||||
- echo "${CI_COMMIT_SHA}" > "${CI_JOB_NAME}.status"
|
||||
|
||||
|
||||
.cmake-script:
|
||||
extends: .use-ninja
|
||||
script:
|
||||
- >
|
||||
if [ -f "${CI_JOB_NAME}.status" ]; then
|
||||
if [ "$(cat ${CI_JOB_NAME}.status)" == "${CI_COMMIT_SHA}" ]; then
|
||||
echo "=== Commit ${CI_COMMIT_SHORT_SHA} already tested with job ${CI_JOB_NAME} ==="
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
- rm -f ${CI_JOB_NAME}.status
|
||||
- >
|
||||
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.
|
||||
fi
|
||||
- >
|
||||
if [ -n "${BUILD_CMD}" ]; then
|
||||
${BUILD_CMD}
|
||||
else
|
||||
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
|
||||
fi
|
||||
fi
|
||||
- echo "${CI_COMMIT_SHA}" > "${CI_JOB_NAME}.status"
|
||||
|
||||
|
||||
.scheduled-test:
|
||||
extends: .cmake-script
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
- if: $CI_PIPELINE_SOURCE == "web"
|
||||
@ -32,38 +95,6 @@ variables:
|
||||
if [ -n "${INSTALL_CMD}" ]; then
|
||||
${INSTALL_CMD}
|
||||
fi
|
||||
script:
|
||||
- >
|
||||
if [ -f "${CI_JOB_NAME}.status" ]; then
|
||||
if [ "$(cat ${CI_JOB_NAME}.status)" == "${CI_COMMIT_SHA}" ]; then
|
||||
echo "=== Commit ${CI_COMMIT_SHORT_SHA} already tested with job ${CI_JOB_NAME} ==="
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
- rm -f ${CI_JOB_NAME}.status
|
||||
- >
|
||||
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/rtis -B${CI_BUILD_DIR} -H.
|
||||
fi
|
||||
- >
|
||||
if [ -n "${BUILD_CMD}" ]; then
|
||||
${BUILD_CMD}
|
||||
else
|
||||
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
|
||||
fi
|
||||
fi
|
||||
- echo "${CI_COMMIT_SHA}" > "${CI_JOB_NAME}.status"
|
||||
artifacts:
|
||||
paths:
|
||||
- ${CI_BUILD_DIR}/*.gz
|
||||
@ -74,23 +105,6 @@ variables:
|
||||
when: on_success
|
||||
expire_in: 10 days
|
||||
|
||||
.qmake-script:
|
||||
variables:
|
||||
QT_SELECT: qt5
|
||||
script:
|
||||
- >
|
||||
if [ -f "${CI_JOB_NAME}.status" ]; then
|
||||
if [ "$(cat ${CI_JOB_NAME}.status)" == "${CI_COMMIT_SHA}" ]; then
|
||||
echo "=== Commit ${CI_COMMIT_SHORT_SHA} already tested with job ${CI_JOB_NAME} ==="
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
- rm -f ${CI_JOB_NAME}.status
|
||||
- mkdir -p ${CI_BUILD_DIR}
|
||||
- qmake -o ${CI_BUILD_DIR} ${QMAKE_PRO_FILE}
|
||||
- make -j8 -C ${CI_BUILD_DIR}
|
||||
- echo "${CI_COMMIT_SHA}" > "${CI_JOB_NAME}.status"
|
||||
|
||||
.scheduled-mxe:
|
||||
extends: .scheduled-test
|
||||
image: mxe-dev
|
||||
@ -130,9 +144,9 @@ variables:
|
||||
extends: .scheduled-test
|
||||
tags: ['elbrus']
|
||||
|
||||
|
||||
.check-format-sources:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
extends: .use-ninja
|
||||
image: focal-dev
|
||||
tags: ['format']
|
||||
script:
|
||||
@ -140,8 +154,7 @@ variables:
|
||||
- cmake --build ${CI_BUILD_DIR} --target check-format-sources
|
||||
|
||||
.myx-cmake-format-sources-check:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
extends: .use-ninja
|
||||
image: focal-dev
|
||||
tags: ['format']
|
||||
script:
|
||||
@ -149,8 +162,7 @@ variables:
|
||||
- cmake --build ${CI_BUILD_DIR} --target myx-cmake-format-sources-check
|
||||
|
||||
.format-sources-check-custom:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
extends: .use-ninja
|
||||
image: focal-dev
|
||||
tags: ['format']
|
||||
script:
|
||||
@ -164,37 +176,32 @@ variables:
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
- qmake
|
||||
- qmake ${QMAKE_PRO_FILE}
|
||||
- bear -- make -k -j$(nproc)
|
||||
- pvs-studio-analyzer analyze -a 29 -j$(nproc)
|
||||
- plog-converter -a "GA:1,2,3;64:1;OP:1,2;CS:1,2" -t errorfile PVS-Studio.log
|
||||
|
||||
.qmake-analyze-clang-tidy:
|
||||
variables:
|
||||
CXX: clang++-14
|
||||
CC: clang-14
|
||||
extends: .use-clang
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
- qmake
|
||||
- qmake ${QMAKE_PRO_FILE}
|
||||
- bear -- make -k -j$(nproc)
|
||||
- run-clang-tidy-14 -checks=-*,bugprone-*,clang-analyzer-*,misc-*,modernize-*,performance-*,portability-*
|
||||
|
||||
.qmake-analyze-clazy:
|
||||
variables:
|
||||
CXX: clang++-14
|
||||
CC: clang-14
|
||||
extends: .use-clang
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
- qmake
|
||||
- qmake ${QMAKE_PRO_FILE}
|
||||
- bear -- make -k -j$(nproc)
|
||||
- find . -name "*.cpp" -print0 | xargs -0 clazy-standalone --ignore-dirs=/usr -checks=level2 -p compile_commands.json
|
||||
|
||||
|
||||
.cmake-analyze-pvs-studio:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
extends: .use-ninja
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
@ -208,10 +215,8 @@ variables:
|
||||
fi
|
||||
|
||||
.cmake-analyze-clang-tidy:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
CXX: clang++-14
|
||||
CC: clang-14
|
||||
extends: .use-ninja
|
||||
extends: .use-clang
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
@ -224,10 +229,8 @@ variables:
|
||||
fi
|
||||
|
||||
.cmake-analyze-clazy:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
CXX: clang++-14
|
||||
CC: clang-14
|
||||
extends: .use-ninja
|
||||
extends: .use-clang
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
@ -241,8 +244,7 @@ variables:
|
||||
|
||||
|
||||
.myx-cmake-analyze-pvs-studio:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
extends: .use-ninja
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
@ -250,10 +252,8 @@ variables:
|
||||
- cmake --build ${CI_BUILD_DIR} --target myx-cmake-analyze-pvs-studio --parallel
|
||||
|
||||
.myx-cmake-analyze-clang-tidy:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
CXX: clang++-14
|
||||
CC: clang-14
|
||||
extends: .use-ninja
|
||||
extends: .use-clang
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
@ -261,10 +261,7 @@ variables:
|
||||
- cmake --build build --target myx-cmake-analyze-clang-tidy --parallel
|
||||
|
||||
.myx-cmake-analyze-clazy:
|
||||
variables:
|
||||
CMAKE_GENERATOR: Ninja
|
||||
CXX: clang++-14
|
||||
CC: clang-14
|
||||
extends: .use-ninja
|
||||
image: jammy-dev
|
||||
tags: ['analyze']
|
||||
script:
|
||||
|
Loading…
Reference in New Issue
Block a user