-
Notifications
You must be signed in to change notification settings - Fork 7
/
.gitlab-ci.yml
107 lines (96 loc) · 2.38 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
variables:
DOCKER_TAG_DEV: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE_DEV: cimverter-dev
DOCKER_TAG_OMC: ${CI_COMMIT_REF_NAME}
DOCKER_IMAGE_OMC: omc-dev-rse
stages:
- prepare
- test
- checkmodel
# build the docker img in which we want to test. normally we want a dockerfile with all dependencies which we just include
docker-cimverter:
stage: prepare
script:
- docker build -t ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV} -f ./Docker/Dockerfile.cimverter .
- docker images
only:
- release
- master
- merge_requests
tags:
- shell
docker-omc:
stage: prepare
script:
- docker build -t ${DOCKER_IMAGE_OMC}:${DOCKER_TAG_OMC} -f ./Docker/Dockerfile.omc .
- docker images
tags:
- shell
only:
- release
- master
- merge_requests
# clone libcimpp in our projekt. compile and run the tests.
# Template
.test: &test
stage: test
image: ${DOCKER_IMAGE_DEV}:${DOCKER_TAG_DEV}
tags:
- docker
before_script:
- apt-get update -qq && apt-get install -y -qq git
- git --version
- rm -rf libcimpp/
- git clone --recursive https://${GITLAB_USERLIBCIMPP}:${GITLAB_TOKENLIBCIMPP}@git.rwth-aachen.de/acs/public/cim/cimpp/libcimpp.git/ libcimpp/
- cd libcimpp
- git rev-parse HEAD
- cd ..
- mkdir -p build && cd build
- cmake .. -DUSE_CIM_VERSION:STRING=${CIM_VERSION}
- make -j8
script:
- cd ../test/
- ./testFiles.py ${CIM_VERSION}
- ls -l
artifacts:
paths:
- test/outputs/${CIM_VERSION}
only:
- master
- release
- merge_requests
test-CGMES:
<<: *test
variables:
CIM_VERSION: CGMES_2.4.15_27JAN2020
test-17v23:
<<: *test
variables:
CIM_VERSION: IEC61970_17v23_IEC61968_13v11
.checkmodel: &checkmodel
stage: checkmodel
image: ${DOCKER_IMAGE_OMC}:${DOCKER_TAG_OMC}
dependencies:
- test-17v23
- test-CGMES
script:
- pwd
- cp test/outputs/${CIM_VERSION}/*.mo .
- ls -l
- git clone --recursive https://github.com/ModPowerSystems/ModPowerSystems
- test/scripts/test_script.bash test/scripts/test_cigre.mos
- test/scripts/test_script.bash test/scripts/test_slack.mos
tags:
- docker
only:
- master
- release
- merge_requests
checkmodel-CGMES:
<<: *checkmodel
variables:
CIM_VERSION: CGMES_2.4.15_27JAN2020
checkmodel-17v23:
<<: *checkmodel
variables:
CIM_VERSION: IEC61970_17v23_IEC61968_13v11