2019-09-22 10:56:30 +00:00
|
|
|
variables:
|
|
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
2020-04-08 14:16:50 +00:00
|
|
|
GET_SOURCES_ATTEMPTS: 10
|
2022-04-12 11:30:46 +00:00
|
|
|
CI_SOURCE_DIR: .
|
|
|
|
CI_BUILD_DIR: _build
|
|
|
|
CI_OUTPUT_DIR: _output
|
2019-09-22 10:56:30 +00:00
|
|
|
|
|
|
|
.scheduled-test:
|
2021-06-30 13:36:43 +00:00
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
2020-05-14 07:13:49 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
2021-07-06 13:05:34 +00:00
|
|
|
- if: $CI_PIPELINE_SOURCE == "web"
|
2020-05-14 07:13:49 +00:00
|
|
|
- if: $CI_MERGE_REQUEST_ID
|
|
|
|
when: manual
|
|
|
|
allow_failure: true
|
2019-09-22 10:56:30 +00:00
|
|
|
cache:
|
|
|
|
paths: ['*.status']
|
|
|
|
before_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
|
2020-04-08 14:16:50 +00:00
|
|
|
- >
|
2020-04-09 12:30:25 +00:00
|
|
|
if [ -n "${UPDATE_CMD}" ]; then
|
|
|
|
${UPDATE_CMD}
|
2020-04-08 14:16:50 +00:00
|
|
|
fi
|
|
|
|
- >
|
2020-04-09 12:30:25 +00:00
|
|
|
if [ -n "${INSTALL_CMD}" ]; then
|
|
|
|
${INSTALL_CMD}
|
2020-04-08 14:16:50 +00:00
|
|
|
fi
|
2019-09-22 10:56:30 +00:00
|
|
|
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
|
2020-05-20 15:24:40 +00:00
|
|
|
- >
|
|
|
|
if [ -n "${CONFIGURE_CMD}" ]; then
|
|
|
|
${CONFIGURE_CMD}
|
|
|
|
else
|
2022-04-12 11:30:46 +00:00
|
|
|
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.
|
2020-05-20 15:24:40 +00:00
|
|
|
fi
|
|
|
|
- >
|
|
|
|
if [ -n "${BUILD_CMD}" ]; then
|
|
|
|
${BUILD_CMD}
|
|
|
|
else
|
2022-04-12 11:30:46 +00:00
|
|
|
cmake --build ${CI_BUILD_DIR}
|
2020-05-20 15:24:40 +00:00
|
|
|
fi
|
2020-04-08 14:16:50 +00:00
|
|
|
- >
|
|
|
|
if [ -z "${CI_SHARED_ENVIRONMENT+x}" ]; then
|
2020-05-20 15:24:40 +00:00
|
|
|
if [ -n "${PACKAGE_CMD}" ]; then
|
|
|
|
${PACKAGE_CMD}
|
|
|
|
else
|
2022-04-12 11:30:46 +00:00
|
|
|
cmake --install ${CI_BUILD_DIR}
|
|
|
|
cmake --build ${CI_BUILD_DIR} --target package
|
|
|
|
cmake --build ${CI_BUILD_DIR} --target package_source
|
2020-05-20 15:24:40 +00:00
|
|
|
fi
|
2020-04-08 14:16:50 +00:00
|
|
|
fi
|
2019-09-22 10:56:30 +00:00
|
|
|
- echo "${CI_COMMIT_SHA}" > "../${CI_JOB_NAME}.status"
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2022-04-12 11:30:46 +00:00
|
|
|
- ${CI_BUILD_DIR}/*.gz
|
|
|
|
- ${CI_BUILD_DIR}/*.xz
|
|
|
|
- ${CI_BUILD_DIR}/*.deb
|
|
|
|
- ${CI_BUILD_DIR}/*.changes
|
|
|
|
- ${CI_BUILD_DIR}/*.dsc
|
2019-09-22 10:56:30 +00:00
|
|
|
when: on_success
|
|
|
|
expire_in: 10 days
|
|
|
|
|
|
|
|
|
2022-01-28 15:19:39 +00:00
|
|
|
.scheduled-mxe:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: mxe-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
2019-09-22 10:56:30 +00:00
|
|
|
.scheduled-smolensk15:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: smolensk15-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
2022-04-06 14:23:50 +00:00
|
|
|
.scheduled-smolensk17:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: smolensk17-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
2019-09-22 10:56:30 +00:00
|
|
|
.scheduled-orel212:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: orel212-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
|
|
|
.scheduled-bionic:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: bionic-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
2020-04-08 14:16:50 +00:00
|
|
|
.scheduled-focal:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: focal-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
2022-01-28 13:42:09 +00:00
|
|
|
.scheduled-jammy:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: jammy-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
2019-09-22 10:56:30 +00:00
|
|
|
.scheduled-elbrus:
|
|
|
|
extends: .scheduled-test
|
|
|
|
tags: ['elbrus']
|
|
|
|
|
2021-02-19 08:12:46 +00:00
|
|
|
.check-format-sources:
|
2022-01-28 07:36:37 +00:00
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
image: focal-dev
|
|
|
|
tags: ['format']
|
|
|
|
script:
|
2022-04-12 11:30:46 +00:00
|
|
|
- cmake -B ${CI_BUILD_DIR} .
|
|
|
|
- cmake --build ${CI_BUILD_DIR} --target check-format-sources
|
2022-01-28 07:36:37 +00:00
|
|
|
|
|
|
|
.myx-cmake-format-sources-check:
|
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
image: focal-dev
|
|
|
|
tags: ['format']
|
|
|
|
script:
|
2022-04-12 11:30:46 +00:00
|
|
|
- cmake -B ${CI_BUILD_DIR} .
|
|
|
|
- cmake --build ${CI_BUILD_DIR} --target myx-cmake-format-sources-check
|
2022-01-28 07:36:37 +00:00
|
|
|
|
|
|
|
.format-sources-check-custom:
|
2021-06-30 13:36:43 +00:00
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
2021-02-19 08:12:46 +00:00
|
|
|
image: focal-dev
|
2022-01-28 06:53:37 +00:00
|
|
|
tags: ['format']
|
2021-02-19 08:12:46 +00:00
|
|
|
script:
|
|
|
|
- >
|
|
|
|
if [ -n "${CHECK_FORMAT_SOURCES_CMD}" ]; then
|
|
|
|
${CHECK_FORMAT_SOURCES_CMD}
|
|
|
|
fi
|
|
|
|
|
2022-04-07 14:09:17 +00:00
|
|
|
|
2022-04-12 11:51:12 +00:00
|
|
|
.qmake-analyze-pvs-studio:
|
2022-04-07 14:09:17 +00:00
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
2022-04-07 14:25:44 +00:00
|
|
|
- qmake
|
2022-04-07 14:32:49 +00:00
|
|
|
- bear -- make -k -j$(nproc)
|
2022-04-07 14:25:44 +00:00
|
|
|
- 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
|
2022-04-07 14:09:17 +00:00
|
|
|
|
|
|
|
.qmake-analyze-clang-tidy:
|
2022-04-07 16:14:38 +00:00
|
|
|
variables:
|
|
|
|
CXX: clang++-14
|
|
|
|
CC: clang-14
|
2022-04-07 14:09:17 +00:00
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
2022-04-07 14:25:44 +00:00
|
|
|
- qmake
|
2022-04-07 14:32:49 +00:00
|
|
|
- bear -- make -k -j$(nproc)
|
2022-04-07 14:25:44 +00:00
|
|
|
- run-clang-tidy-14 -checks=-*,bugprone-*,clang-analyzer-*,misc-*,modernize-*,performance-*,portability-*
|
2022-04-07 14:09:17 +00:00
|
|
|
|
|
|
|
.qmake-analyze-clazy:
|
2022-04-07 16:14:38 +00:00
|
|
|
variables:
|
|
|
|
CXX: clang++-14
|
|
|
|
CC: clang-14
|
2022-04-07 14:09:17 +00:00
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
2022-04-07 14:25:44 +00:00
|
|
|
- qmake
|
2022-04-07 14:32:49 +00:00
|
|
|
- bear -- make -k -j$(nproc)
|
2022-04-07 14:25:44 +00:00
|
|
|
- find . -name "*.cpp" -print0 | xargs -0 clazy-standalone --ignore-dirs=/usr -checks=level2 -p compile_commands.json
|
2022-04-07 14:09:17 +00:00
|
|
|
|
|
|
|
|
2022-04-12 11:51:12 +00:00
|
|
|
.cmake-analyze-pvs-studio:
|
2022-04-07 07:18:59 +00:00
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
|
|
|
- >
|
|
|
|
if [ -n "${CUSTOM_ANALYZE_PVS}" ]; then
|
|
|
|
${CUSTOM_ANALYZE_PVS}
|
|
|
|
else
|
2022-04-12 11:30:46 +00:00
|
|
|
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B ${CI_BUILD_DIR} .
|
|
|
|
cmake --build ${CI_BUILD_DIR} --parallel
|
2022-04-12 12:10:15 +00:00
|
|
|
pvs-studio-analyzer analyze -a 29 -f ${CI_BUILD_DIR}/compile_commands.json -j -o ${CI_BUILD_DIR}/PVS-Studio.log
|
2022-04-12 11:56:27 +00:00
|
|
|
ls -la
|
2022-04-12 12:10:15 +00:00
|
|
|
ls -la ${CI_BUILD_DIR}
|
2022-04-12 11:56:27 +00:00
|
|
|
plog-converter -a "GA:1,2,3;64:1;OP:1,2;CS:1,2" -t errorfile ${CI_BUILD_DIR}/PVS-Studio.log
|
2022-04-07 07:18:59 +00:00
|
|
|
fi
|
|
|
|
|
2022-04-07 14:09:17 +00:00
|
|
|
.cmake-analyze-clang-tidy:
|
2022-04-07 08:09:36 +00:00
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
2022-04-07 10:00:56 +00:00
|
|
|
CXX: clang++-14
|
|
|
|
CC: clang-14
|
2022-04-07 08:09:36 +00:00
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
|
|
|
- >
|
|
|
|
if [ -n "${CUSTOM_ANALYZE_CLANG_TIDY}" ]; then
|
|
|
|
${CUSTOM_ANALYZE_CLANG_TIDY}
|
|
|
|
else
|
2022-04-12 12:02:08 +00:00
|
|
|
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}
|
2022-04-07 08:09:36 +00:00
|
|
|
fi
|
|
|
|
|
2022-04-07 14:09:17 +00:00
|
|
|
.cmake-analyze-clazy:
|
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
CXX: clang++-14
|
|
|
|
CC: clang-14
|
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
|
|
|
- >
|
|
|
|
if [ -n "${CUSTOM_ANALYZE_CLAZY}" ]; then
|
|
|
|
${CUSTOM_ANALYZE_CLAZY}
|
|
|
|
else
|
2022-04-12 11:30:46 +00:00
|
|
|
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
|
2022-04-07 14:09:17 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
.myx-cmake-analyze-pvs-studio:
|
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
2022-04-12 11:30:46 +00:00
|
|
|
- cmake -B ${CI_BUILD_DIR} .
|
|
|
|
- cmake --build ${CI_BUILD_DIR} --target myx-cmake-analyze-pvs-studio --parallel
|
2022-04-07 14:09:17 +00:00
|
|
|
|
|
|
|
.myx-cmake-analyze-clang-tidy:
|
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
CXX: clang++-14
|
|
|
|
CC: clang-14
|
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
2022-04-12 11:30:46 +00:00
|
|
|
- cmake -B ${CI_BUILD_DIR} .
|
|
|
|
- cmake --build build --target myx-cmake-analyze-clang-tidy --parallel
|
2022-04-07 14:09:17 +00:00
|
|
|
|
|
|
|
.myx-cmake-analyze-clazy:
|
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
CXX: clang++-14
|
|
|
|
CC: clang-14
|
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
2022-04-12 11:30:46 +00:00
|
|
|
- cmake -B ${CI_BUILD_DIR} .
|
|
|
|
- cmake --build ${CI_BUILD_DIR} --target myx-cmake-analyze-clazy --parallel
|
2022-04-07 14:09:17 +00:00
|
|
|
|