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
|
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-07 14:09:17 +00:00
|
|
|
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=_output -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rtis -B build .
|
2020-05-20 15:24:40 +00:00
|
|
|
fi
|
|
|
|
- >
|
|
|
|
if [ -n "${BUILD_CMD}" ]; then
|
|
|
|
${BUILD_CMD}
|
|
|
|
else
|
2022-04-07 14:09:17 +00:00
|
|
|
cmake --build build -- -j
|
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-07 14:09:17 +00:00
|
|
|
cmake --install build
|
|
|
|
cmake --build build --target package
|
|
|
|
cmake --build build --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:
|
2020-06-17 05:21:09 +00:00
|
|
|
- build/*.gz
|
2019-09-22 10:56:30 +00:00
|
|
|
- build/*.xz
|
|
|
|
- build/*.deb
|
|
|
|
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-07 14:09:17 +00:00
|
|
|
- cmake -B build .
|
|
|
|
- cmake --build build --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-07 14:09:17 +00:00
|
|
|
- cmake -B build .
|
|
|
|
- cmake --build build --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
|
|
|
|
|
|
|
.qmake-analyze-pvs:
|
|
|
|
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:
|
|
|
|
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:
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
|
.cmake-analyze-pvs:
|
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
|
|
|
|
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build .
|
|
|
|
cmake --build build -j
|
2022-04-07 07:46:07 +00:00
|
|
|
pvs-studio-analyzer analyze -a 29 -f build/compile_commands.json -j
|
2022-04-07 07:18:59 +00:00
|
|
|
plog-converter -a "GA:1,2,3;64:1;OP:1,2;CS:1,2" -t errorfile PVS-Studio.log
|
|
|
|
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-07 10:03:20 +00:00
|
|
|
cmake -DCMAKE_CXX_CLANG_TIDY="clang-tidy-14" -B build .
|
2022-04-07 08:09:36 +00:00
|
|
|
cmake --build build -j
|
|
|
|
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
|
|
|
|
cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -B build .
|
|
|
|
find . -name "*.cpp" -print0 | xargs -0 clazy-standalone --ignore-dirs=/usr -checks=level2 -p build/compile_commands.json
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
.myx-cmake-analyze-pvs-studio:
|
|
|
|
variables:
|
|
|
|
CMAKE_GENERATOR: Ninja
|
|
|
|
CXX: clang++-14
|
|
|
|
CC: clang-14
|
|
|
|
image: jammy-dev
|
|
|
|
tags: ['analyze']
|
|
|
|
script:
|
2022-04-07 14:25:44 +00:00
|
|
|
- cmake -B build .
|
|
|
|
- cmake --build build --target myx-cmake-analyze-pvs-studio -- -j
|
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-07 14:25:44 +00:00
|
|
|
- cmake -B build .
|
|
|
|
- cmake --build build --target myx-cmake-analyze-clang-tidy -- -j
|
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-07 14:25:44 +00:00
|
|
|
- cmake -B build .
|
|
|
|
- cmake --build build --target myx-cmake-analyze-clazy -- -j
|
2022-04-07 14:09:17 +00:00
|
|
|
|