-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
45 lines (38 loc) · 1.09 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
image: registry.gitlab.com/sosy-lab/teaching/sep-template-group-project:latest
variables:
OUTPUT_PATH: "out"
LIB_PATH: "lib"
stages:
- build
- test
- execute
build:
stage: build
script:
- find $LIB_PATH -iname "*.jar" | tr '\n' ':' > libraries.txt
- find -name "*.java" > sources.txt
- cat sources.txt
- mkdir $OUTPUT_PATH
- javac -d $OUTPUT_PATH -Xlint:all,-processing -Werror -g -cp "$CLASSPATH:$(cat libraries.txt)" @sources.txt
artifacts:
paths:
# Keep compiled java files and list of files
- out/
- sources.txt
- libraries.txt
spotbugs:
stage: test
script:
- spotbugs -auxclasspath "$CLASSPATH:$(cat libraries.txt)" -textui -longBugCodes -effort:max -exitcode $OUTPUT_PATH
checkstyle:
stage: test
script:
- java -jar /opt/checkstyle-10.3-all.jar -c /opt/google_checks.xml @sources.txt
unit-tests:
stage: test
script:
- java -jar $JUNIT5_PATH --class-path "$OUTPUT_PATH:$(cat libraries.txt)" --scan-class-path
execute:
stage: execute
script:
- java -cp "$OUTPUT_PATH:$(cat libraries.txt)" cyberzul.CyberzulMain