-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitlab-ci.yml
90 lines (78 loc) · 2.25 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
image: eclipse-temurin:8
stages:
- test
- deploy
- trigger
variables:
GRADLE_ARGS: --no-daemon --stacktrace --warning-mode=all
DEBIAN_FRONTEND: noninteractive
cache:
paths:
- .gradle/caches
- .gradle/notifications
- .gradle/wrapper
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
- apt-get update
- apt-get install -y git
.tests:
stage: test
script: ./gradlew ${GRADLE_ARGS} --parallel check jacocoTestReport
artifacts:
paths:
- "*/build/jacoco"
- "*/build/jacocoHtml"
- "*/build/reports"
- "*/build/test-results"
reports:
junit:
- "*/build/test-results/**/TEST-*.xml"
when: always
tests:jdk-8:
extends: .tests
tests:jdk-11:
extends: .tests
image: eclipse-temurin:11
tests:jdk-17:
extends: .tests
image: eclipse-temurin:17
tests:jdk-21:
extends: .tests
image: eclipse-temurin:21
tests:macos:
extends: .tests
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
tags:
- macos
tests:windows64:
extends: .tests
before_script: []
script: cmd /c ".\gradlew.bat %GRADLE_ARGS% --parallel check jacocoTestReport"
tags:
- windows
publish:
stage: deploy
script:
- openssl aes-256-cbc -d -base64 -pbkdf2 -pass "env:ENCRYPTION_PASSWORD" -in gradle.properties.enc -out gradle.properties
- openssl aes-256-cbc -d -base64 -pbkdf2 -pass "env:ENCRYPTION_PASSWORD" -in pubring.gpg.enc -out pubring.gpg
- openssl aes-256-cbc -d -base64 -pbkdf2 -pass "env:ENCRYPTION_PASSWORD" -in secring.gpg.enc -out secring.gpg
# Run all of the publishing process except for the actual upload.
# This part is safe to run with --parallel enabled (see below).
- ./gradlew ${GRADLE_ARGS} --parallel signMavenJavaPublication
# Uploading to Maven Central seems to be unreliable with parallel builds
# (multiple staging repositories are created even though Gradle was only run once,
# and none of these staging repositories contain the complete set of files),
# so run the publish task in non-parallel mode.
- ./gradlew ${GRADLE_ARGS} publish
only:
- master
- develop
prob_snapshot_parser_tests:
stage: trigger
variables:
BUILD_TYPE: snapshot-parser-build
trigger:
project: stups/prob/prob_prolog
only:
- develop