This repository has been archived by the owner on Feb 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 108
/
Copy path.gitlab-ci.yml
58 lines (54 loc) · 1.9 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
variables:
RV: 'crownet/scripts'
OPPCONTTAG: '6.0pre10' # tag of OMNeT++ container to be used
#OPPCONTTAG: 'latest'
#INETBRANCH: 'master'
INETBRANCH: 'v4.3.0'
stages:
- build
- test
# this job
# - prepares the environment
# (pulls required docker containers, clones and builds inet)
# - builds the simulte project itself
Build:
stage: build
before_script:
# docker login asks for the password to be passed through stdin for security
# we use $CI_JOB_TOKEN here which is a special token provided by GitLab
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
- docker pull $CI_REGISTRY/rover/crownet/omnetpp:${OPPCONTTAG}
script:
- "mkdir .tmp"
- "mv * .tmp"
- "git clone https://gitlab-ci-token:${CI_JOB_TOKEN}@sam-dev.cs.hm.edu/rover/crownet.git"
- "mv .tmp simulte"
- "git clone --branch ${INETBRANCH} https://gitlab-ci-token:${CI_JOB_TOKEN}@sam-dev.cs.hm.edu/rover/inet.git inet4"
- "cd inet4"
- "../$RV/omnetpp ${OPPCONTTAG} exec make makefiles"
- "../$RV/omnetpp ${OPPCONTTAG} exec make -j16; TEST_STATUS=${PIPESTATUS[0]}"
# we do not need the inet sources anymore - delete them to have less artifacts
- "find . -name \"*.cc\" -type f -delete"
# build simulte itself
- "cd ../simulte"
- "../$RV/omnetpp ${OPPCONTTAG} exec make makefiles"
- "../$RV/omnetpp ${OPPCONTTAG} exec make -j16"
artifacts:
paths:
# we keep the scripts
- crownet/scripts
# we need to keep the ned files and the simulte lib
- simulte
# we need to keep the ned files and the inet lib (all stored in the src subfolder)
- inet4/src
expire_in: 2 weeks
# This job runs the fingerprint tests
Fingerprints:
stage: test
script:
- "cd simulte/tests/fingerprint"
- "../../../$RV/omnetpp ${OPPCONTTAG} exec ./fingerprints"
artifacts:
paths:
- simulte/tests/fingerprint
expire_in: 2 weeks