-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
116 lines (108 loc) · 2.12 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
stages:
- test
- publish
- release
cache:
paths:
- .gradle/wrapper
- .gradle/caches
- .kotlin
test-linux:
stage: test
before_script:
- export JAVA_HOME=/home/sdks/zulu-17
script:
- ./gradlew
clean
linuxX64Test
--no-daemon
--stacktrace
only:
- master
tags:
- linux
test-macos:
stage: test
before_script:
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
script:
- ./gradlew
clean
macosArm64Test
--no-daemon
--stacktrace
only:
- master
tags:
- macos
test-windows:
stage: test
script:
- ./gradlew
clean
mingwX64Test
--no-daemon
--stacktrace
only:
- master
tags:
- windows
publish-linux:
stage: publish
before_script:
- export JAVA_HOME=/home/sdks/zulu-17
script:
- ./gradlew
-DpublishDocs.root=/var/www/docs/multiplatform-dlfcn
clean
publish{KotlinMultiplatform,LinuxX64,LinuxArm64}PublicationToGitlabRepository
publishDocs
--no-daemon
--stacktrace
only:
- master
tags:
- linux
publish-windows:
stage: publish
script:
- ./gradlew
clean
publishMingwX64PublicationToGitlabRepository
--no-daemon
--stacktrace
only:
- master
tags:
- windows
publish-macos:
stage: publish
before_script:
- export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-17.jdk/Contents/Home
script:
- ./gradlew
clean
publishMacos{X64,Arm64}PublicationToGitlabRepository
--no-daemon
--stacktrace
only:
- master
tags:
- macos
create-release:
stage: release
rules:
- if: $CI_COMMIT_TAG
when: never
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
before_script:
- echo "Fetching project version from libs.versions.toml"
- export PROJECT_VERSION=$(./gradlew generateVersionInfo --quiet)
script:
- echo "Creating release for version $PROJECT_VERSION.$CI_PIPELINE_IID"
release:
tag_name: '$(cat .version).$CI_PIPELINE_IID'
description: '$(cat .version).$CI_PIPELINE_IID'
ref: '$CI_COMMIT_SHA'
tags:
- linux