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:
|
2020-05-14 07:13:49 +00:00
|
|
|
rules:
|
|
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
|
|
- 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
|
|
|
|
- mkdir build
|
|
|
|
- cd build
|
2020-05-20 15:24:40 +00:00
|
|
|
- >
|
|
|
|
if [ -n "${CONFIGURE_CMD}" ]; then
|
|
|
|
${CONFIGURE_CMD}
|
|
|
|
else
|
2020-06-26 01:37:48 +00:00
|
|
|
cmake -G Ninja -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_output -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rtis ..
|
2020-05-20 15:24:40 +00:00
|
|
|
fi
|
|
|
|
- >
|
|
|
|
if [ -n "${BUILD_CMD}" ]; then
|
|
|
|
${BUILD_CMD}
|
|
|
|
else
|
2020-06-26 01:32:24 +00:00
|
|
|
cmake --parallel --verbose --build .
|
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
|
2020-06-26 01:32:24 +00:00
|
|
|
cmake --verbose --install
|
|
|
|
cpack -G DEB
|
|
|
|
cpack -G TGZ
|
|
|
|
cpack --config CPackSourceConfig.cmake
|
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
|
|
|
|
|
|
|
|
|
|
|
|
.scheduled-smolensk15:
|
|
|
|
extends: .scheduled-test
|
|
|
|
image: smolensk15-dev
|
|
|
|
tags: ['docker']
|
|
|
|
|
|
|
|
.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']
|
|
|
|
|
2019-09-22 10:56:30 +00:00
|
|
|
.scheduled-elbrus:
|
|
|
|
extends: .scheduled-test
|
|
|
|
tags: ['elbrus']
|
|
|
|
|