Начало
This commit is contained in:
commit
d9b1e51870
29
README.md
Normal file
29
README.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
# Шаблон для автосборки проекта
|
||||||
|
|
||||||
|
## Использование
|
||||||
|
|
||||||
|
Подключение в виде подмодуля:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git submodule add http://git.246060.ru/f1x1t/gitlab-ci .gitlab-ci
|
||||||
|
```
|
||||||
|
|
||||||
|
Пример файла `.gitlab-ci.yml`:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
include:
|
||||||
|
- local: /.gitlab-ci/scheduled.yml
|
||||||
|
|
||||||
|
smolensk15-nightly:
|
||||||
|
extends: .scheduled-smolensk15
|
||||||
|
|
||||||
|
orel212-nightly:
|
||||||
|
extends: .scheduled-orel212
|
||||||
|
|
||||||
|
bionic-nightly:
|
||||||
|
extends: .scheduled-bionic
|
||||||
|
|
||||||
|
elbrus-nightly:
|
||||||
|
extends: .scheduled-elbrus
|
||||||
|
```
|
||||||
|
|
72
scheduled.yml
Normal file
72
scheduled.yml
Normal file
@ -0,0 +1,72 @@
|
|||||||
|
variables:
|
||||||
|
GIT_SUBMODULE_STRATEGY: recursive
|
||||||
|
|
||||||
|
.scheduled-test:
|
||||||
|
only:
|
||||||
|
refs:
|
||||||
|
- schedules
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- src/**/*
|
||||||
|
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
|
||||||
|
- apt-get update
|
||||||
|
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
|
||||||
|
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=_output -DCPACK_PACKAGING_INSTALL_PREFIX=/opt/rtis ..
|
||||||
|
- ninja
|
||||||
|
- ninja install
|
||||||
|
- ninja package
|
||||||
|
- ninja package_source
|
||||||
|
- echo "${CI_COMMIT_SHA}" > "../${CI_JOB_NAME}.status"
|
||||||
|
artifacts:
|
||||||
|
paths:
|
||||||
|
- 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-elbrus:
|
||||||
|
extends: .scheduled-test
|
||||||
|
tags: ['elbrus']
|
||||||
|
variables:
|
||||||
|
CI_QTDIR: "/opt/qt59"
|
||||||
|
before_script:
|
||||||
|
- export QTDIR=$CI_QTDIR
|
||||||
|
- export PATH="$CI_QTDIR/bin:$PATH"
|
||||||
|
- export LD_LIBRARY_PATH="$CI_QTDIR/lib:$LD_LIBRARY_PATH"
|
||||||
|
- export PKG_CONFIG_PATH="$CI_QTDIR/lib/pkgconfig:$PKG_CONFIG_PATH"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user