-
Notifications
You must be signed in to change notification settings - Fork 3
/
.gitlab-ci.yml
132 lines (121 loc) · 3.74 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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
image: maven:3-jdk-8
variables:
MAVEN_OPTS: "-Dmaven.repo.local=./.m2/repository"
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version"
cache:
paths:
- ./.m2/repository
# keep cache across branch
key: "$CI_BUILD_REF_NAME"
before_script:
- apt-get update
- apt-get install -y openjfx bc
stages:
- build
- test
- deploy
build-job:
stage: build
script:
- "mvn clean compile $MAVEN_CLI_OPTS"
artifacts:
paths:
- transport-benchmark/target/
- transport-core/target/
- transport-docs/target/
- transport-editor/target/
- transport-planners/target/
- transport-report/target/
- transport-thirdparty/target/
unittest-job:
stage: test
dependencies:
- build-job
script:
- "mvn package $MAVEN_CLI_OPTS -Dcheckstyle.skip=true"
- echo "TotalInstructionCoverage:" `bash calculate_coverage.sh`
artifacts:
paths:
- transport-benchmark/target/
- transport-core/target/
- transport-docs/target/
- transport-editor/target/
- transport-planners/target/
- transport-report/target/
- transport-thirdparty/target/
integrationtest-job:
stage: test
dependencies:
- build-job
script:
- "mvn verify $MAVEN_CLI_OPTS -Pit -Dcheckstyle.skip=true"
- echo "TotalInstructionCoverage:" `bash calculate_coverage.sh it`
artifacts:
paths:
- transport-benchmark/target/
- transport-core/target/
- transport-docs/target/
- transport-editor/target/
- transport-planners/target/
- transport-report/target/
- transport-thirdparty/target/
#uitest-headless-job:
# stage: test
# dependencies:
# - build-job
# script:
# - "mvn verify $MAVEN_CLI_OPTS -Pit,ut-only-headless -Dcheckstyle.skip=true"
# - echo "TotalInstructionCoverage:" `cat transport-editor/target/site/jacoco-it/jacoco.xml | grep -E '<counter type="INSTRUCTION"[^>]*/>' -o | tail -n 1 | sed -E 's@<counter type="INSTRUCTION"[ ]+missed="([0-9]+)"[ ]+covered="([0-9]+)"[ ]*/>@scale=2;100*(\2)/(\1+\2)@' | bc`
# artifacts:
# paths:
# - transport-editor/target/
#uitest-headful-job:
# stage: test
# dependencies:
# - build-job
# before_script:
# - apt-get update
# - apt-get install -y xvfb
# - "export DISPLAY=:99.0"
# - "Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &"
# - sleep 3 # give xvfb some time to start
# script:
# - "mvn verify $MAVEN_CLI_OPTS -Pit,ut-only -Dcheckstyle.skip=true"
# - echo "TotalInstructionCoverage:" `cat transport-editor/target/site/jacoco-it/jacoco.xml | grep -E '<counter type="INSTRUCTION"[^>]*/>' -o | tail -n 1 | sed -E 's@<counter type="INSTRUCTION"[ ]+missed="([0-9]+)"[ ]+covered="([0-9]+)"[ ]*/>@scale=2;100*(\2)/(\1+\2)@' | bc`
# artifacts:
# paths:
# - transport-benchmark/target/
# - transport-core/target/
# - transport-docs/target/
# - transport-editor/target/
# - transport-planners/target/
# - transport-report/target/
# - transport-thirdparty/target/
deploy-job:
stage: deploy
script:
- "true"
artifacts:
paths:
- "transport-benchmark/target/*.jar"
- "transport-core/target/*.jar"
- "transport-docs/target/*.jar"
- "transport-editor/target/*.jar"
- "transport-planners/target/*.jar"
- "transport-report/target/*.jar"
- "transport-thirdparty/target/*.jar"
#build-docs:
# stage: build
# before_script:
# - apt-get update
# - apt-get install -y asciidoctor texlive-latex-base texlive-fonts-recommended texlive-fonts-extra make texlive-latex-extra python-pip
# - pip install did
# - bash .lfs_install.sh
# script:
# - 'old="`pwd`"'
# - 'cd transport-docs'
# - 'bash build.sh'
# - 'cd "$old"'
# artifacts:
# paths:
# - "transport-docs/target/docs"