-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
61 lines (57 loc) · 2.05 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
.test_build_template: &test_build
image: europeanxfel/karabo-ci:$ARCH_TAG
script:
- . /etc/os-release
- export REL_OS_NAME=${NAME%% *}
- export REL_OS_VERS_LONG=${VERSION_ID%%.*}
- export BUILD_TYPE=Debug
- >
if test "$REL_OS_NAME" == "Red"; then
REL_OS_NAME=RedHat
fi;
- >
if [ "$ID" = "rhel" ] || [ "$ID" = "almalinux" ]; then
yum install gsl-devel --assumeyes
fi;
- export KARABO_BROKER_TOPIC="gitlab_ci_$CI_JOB_ID"
- echo http://exflctrl01.desy.de/karabo/karaboFramework/tags/$KARABO_TAG/karabo-$KARABO_TAG-Release-$REL_OS_NAME-$REL_OS_VERS_LONG-x86_64.sh
- curl http://exflctrl01.desy.de/karabo/karaboFramework/tags/$KARABO_TAG/karabo-$KARABO_TAG-Release-$REL_OS_NAME-$REL_OS_VERS_LONG-x86_64.sh > karabo.sh
- bash karabo.sh --prefix=/root
- source /root/karabo/activate
- export KARABO_BROKER="amqp://xfel:karabo@exfl-broker-1:5672"
- pushd $CI_PROJECT_DIR
- >
echo "Installing Dependencies";
while read line; do
[[ $line =~ ^#.* ]] && continue
norm=${line/,/ }
norm=`echo $norm | sed -e "s/[[:space:]]\+/ /g"`
device=$(echo $norm | cut -f1 -d' ')
tag=$(echo $norm | cut -f2 -d' ')
echo Installing $device version $tag
karabo -g https://[email protected] install $device $tag
done < DEPENDS
- echo "Testing C++ Project"
- export GTEST_OUTPUT=xml:$CI_PROJECT_DIR/cpp.xml
- make test
- echo "Testing Python Project"
- pip install -e ".[test]"
- pytest -vv --junitxml=python.xml --disable-warnings --pyargs --cov=DsscSIB --cov=DsscControl --cov-report term src/
artifacts:
when: always
reports:
junit:
- cpp.xml
- python.xml
paths:
- cpp.xml
- python.xml
expire_in: 1 week
interruptible: true
##### Test build #####
installation:
<<: *test_build
parallel:
matrix:
- ARCH_TAG: ["ubuntu-22-003", "almalinux-9-009"]
KARABO_TAG: ["2.20.4", "latest_prerelease_build"]