-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
89 lines (80 loc) · 2.69 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
stages:
- test
- deploy
.test-common:
stage: test
variables:
GRADLE_USER_HOME: "$CI_PROJECT_DIR/.gradle"
GRADLE_OPTIONS: --no-daemon --info --stacktrace --warning-mode=all
cache:
paths:
- .gradle/caches
- .gradle/native
- .gradle/wrapper
artifacts:
expire_in: 1 week
paths:
- build/distributions
- build/libs
.test-linux:
extends: .test-common
before_script: &default_before_script_linux
- export DEBIAN_FRONTEND="noninteractive"
- apt-get update
# git is needed to read the current commit hash.
# pandoc is needed to build the ProB 2 UI docs.
# LaTeX is needed by the documentation generator tests.
# texlive-latex-extra is needed for the makecell and seqsplit packages,
# otherwise texlive-latex-recommended would be enough.
- apt-get install --assume-yes git pandoc texlive-latex-extra texlive-lang-german
test:jdk-17-linux:
extends: .test-linux
image: eclipse-temurin:17-jammy
before_script:
- *default_before_script_linux
- apt-get install --assume-yes build-essential fakeroot
script:
- ./gradlew ${GRADLE_OPTIONS} check multiPlatformShadowJar jpackage
test:jdk-21-linux:
extends: .test-linux
image: eclipse-temurin:21-jammy
script:
- ./gradlew ${GRADLE_OPTIONS} check
test:jdk-17-macos-x86_64:
extends: .test-common
script:
- ./gradlew ${GRADLE_OPTIONS} check jpackage
tags:
- macos
- x86_64
test:jdk-17-macos-arm64:
extends: .test-common
script:
- ./gradlew ${GRADLE_OPTIONS} check jpackage
tags:
- macos
- arm64
test:jdk-17-windows64:
extends: .test-common
script:
- cmd /c ".\gradlew.bat %GRADLE_OPTIONS% check jpackage"
tags:
- windows
deploy:snapshot:
stage: deploy
only:
- develop@stups/prob/prob2_ui
image: alpine:3
before_script:
- apk update
- apk add lftp openssh-client
script: LFTP_PASSWORD="${DEPLOY_PASSWORD}" lftp -c "set cmd:fail-exit true; set sftp:auto-confirm true; open --user ${DEPLOY_USERNAME} --env-password sftp://${DEPLOY_HOST}/${DEPLOY_REMOTE_BASEDIR}/downloads/prob2/snapshot/; mput -e build/distributions/*.deb build/distributions/*.dmg build/distributions/*.exe build/libs/*-multi.jar"
deploy:release:
stage: deploy
only:
- master@stups/prob/prob2_ui
image: alpine:3
before_script:
- apk update
- apk add lftp openssh-client
script: LFTP_PASSWORD="${DEPLOY_PASSWORD}" lftp -c "set cmd:fail-exit true; set sftp:auto-confirm true; open --user ${DEPLOY_USERNAME} --env-password sftp://${DEPLOY_HOST}/${DEPLOY_REMOTE_BASEDIR}/downloads/prob2/; mkdir release-next; cd release-next; mput build/distributions/*.deb build/distributions/*.dmg build/distributions/*.exe build/libs/*-multi.jar"