132 lines
2.9 KiB
YAML
132 lines
2.9 KiB
YAML
variables:
|
|
GIT_SUBMODULE_STRATEGY: recursive
|
|
GET_SOURCES_ATTEMPTS: 10
|
|
|
|
.scheduled-test:
|
|
variables:
|
|
CMAKE_GENERATOR: Ninja
|
|
rules:
|
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
|
- if: $CI_PIPELINE_SOURCE == "web"
|
|
- if: $CI_MERGE_REQUEST_ID
|
|
when: manual
|
|
allow_failure: true
|
|
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
|
|
- >
|
|
if [ -n "${UPDATE_CMD}" ]; then
|
|
${UPDATE_CMD}
|
|
fi
|
|
- >
|
|
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
|
|
- mkdir build
|
|
- cd build
|
|
- >
|
|
if [ -n "${CONFIGURE_CMD}" ]; then
|
|
${CONFIGURE_CMD}
|
|
else
|
|
cmake -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=_output -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rtis ..
|
|
fi
|
|
- >
|
|
if [ -n "${BUILD_CMD}" ]; then
|
|
${BUILD_CMD}
|
|
else
|
|
cmake --build . -- -j $(nproc)
|
|
fi
|
|
- >
|
|
if [ -z "${CI_SHARED_ENVIRONMENT+x}" ]; then
|
|
if [ -n "${PACKAGE_CMD}" ]; then
|
|
${PACKAGE_CMD}
|
|
else
|
|
cmake --install .
|
|
cmake --build . --target package
|
|
cmake --build . --target package_source
|
|
fi
|
|
fi
|
|
- echo "${CI_COMMIT_SHA}" > "../${CI_JOB_NAME}.status"
|
|
artifacts:
|
|
paths:
|
|
- build/*.gz
|
|
- 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']
|
|
|
|
.scheduled-focal:
|
|
extends: .scheduled-test
|
|
image: focal-dev
|
|
tags: ['docker']
|
|
|
|
.scheduled-elbrus:
|
|
extends: .scheduled-test
|
|
tags: ['elbrus']
|
|
|
|
.check-format-sources:
|
|
variables:
|
|
CMAKE_GENERATOR: Ninja
|
|
image: focal-dev
|
|
tags: ['format']
|
|
script:
|
|
- mkdir build
|
|
- cd build
|
|
- cmake ..
|
|
- cmake --build . --target check-format-sources
|
|
|
|
.myx-cmake-format-sources-check:
|
|
variables:
|
|
CMAKE_GENERATOR: Ninja
|
|
image: focal-dev
|
|
tags: ['format']
|
|
script:
|
|
- mkdir build
|
|
- cd build
|
|
- cmake ..
|
|
- cmake --build . --target myx-cmake-format-sources-check
|
|
|
|
.format-sources-check-custom:
|
|
variables:
|
|
CMAKE_GENERATOR: Ninja
|
|
image: focal-dev
|
|
tags: ['format']
|
|
script:
|
|
- >
|
|
if [ -n "${CHECK_FORMAT_SOURCES_CMD}" ]; then
|
|
${CHECK_FORMAT_SOURCES_CMD}
|
|
fi
|
|
|