-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
155 lines (139 loc) · 3.35 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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
image: eclipse-temurin:17
variables:
NAME: "${CI_PROJECT_NAME}-${CI_PIPELINE_ID}-${CI_COMMIT_REF_NAME}"
PROJECTNAME: "CPQ-native Index"
before_script:
- java -version
- cd CPQ-native\ Index
- ls -l
stages:
- check
- compile
- test
- status
- javadoc
- publishing
endings:
allow_failure: true
script: curl ${SERVER}ci/lf.sh | bash
stage: check
pending:
allow_failure: true
script: curl ${SERVER}ci/pending.sh | bash -s cpq-native-index
stage: compile
success:
allow_failure: true
script: curl ${SERVER}ci/success.sh | bash -s cpq-native-index
when: on_success
stage: status
failure:
allow_failure: true
script: curl ${SERVER}ci/failure.sh | bash -s cpq-native-index
when: on_failure
stage: status
spotbugs:
allow_failure: true
script:
- ./gradlew -PnexusPublic=${NEXUS_PUBLIC} :spotbugsMain
- mv ./build/reports/spotbugs/main/spotbugs.html ../spotbugs.html
stage: check
artifacts:
name: "SpotBugs Report"
expire_in: 1 week
when: always
paths:
- CPQ-native\ Index/build/reports/spotbugs/main/spotbugs.html
verify:
allow_failure: true
script: curl ${SERVER}ci/javadoc.sh | bash
stage: javadoc
coverage: '/\([0-9]{2,3}\.[0-9]{2}%\)/'
javadoc:
script:
- mkdir ../javadoc
- ./gradlew -PnexusPublic=${NEXUS_PUBLIC} :javadoc
- mv ./build/docs/javadoc/* ../javadoc/
stage: javadoc
artifacts:
name: "${NAME} [Javadoc]"
expire_in: 1 week
paths:
- javadoc/
natives:
script:
- apt-get update && apt-get -y install gcc cmake
- ./gradlew -PnexusPublic=${NEXUS_PUBLIC} compileNatives
stage: compile
artifacts:
name: "Nauty Native Library"
expire_in: 1 week
paths:
- ${PROJECTNAME}/lib/*nauty.*
compile:
script:
- ./gradlew -PnexusPublic=${NEXUS_PUBLIC} shadowJar
- ./gradlew -PnexusPublic=${NEXUS_PUBLIC} createExe
- mv ./build/libs/* ../
- mv ./build/launch4j/*.exe ../
stage: compile
needs: ["natives"]
artifacts:
name: "${NAME}"
expire_in: 1 week
paths:
- Index-*.jar
- Index-*.exe
docker:
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
tags:
- docker
services:
- docker:dind
before_script: []
script:
- docker info
- docker build -t cpq-native-index .
stage: compile
test:
script:
- ./gradlew -PnexusPublic=${NEXUS_PUBLIC} :test :jacocoTestReport
- cat ./build/reports/jacoco/test/html/index.html
stage: test
coverage: '/Total.*?([0-9]{1,3})%/'
artifacts:
reports:
junit: ./${PROJECTNAME}/build/test-results/test/TEST-*.xml
maven:
script:
- ./gradlew publishAllPublicationsToMavenRepository
only:
- tags
when: manual
allow_failure: false
stage: publishing
hub:
image: docker:latest
variables:
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
tags:
- docker
services:
- docker:dind
before_script: []
needs: ["maven"]
script:
- docker info
- docker build -t cpq-native-index .
- docker tag cpq-native-index roanh/cpq-native-index:${CI_COMMIT_REF_NAME:1}
- docker tag cpq-native-index roanh/cpq-native-index:latest
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- docker push roanh/cpq-native-index:${CI_COMMIT_REF_NAME:1}
- docker push roanh/cpq-native-index:latest
stage: publishing
allow_failure: false
only:
- tags