-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
69 lines (62 loc) · 1.56 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
variables:
# disable the Gradle daemon for Continuous Integration servers
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
stages:
- build
- test
.buildtemplate: &builddefinition
stage: build
script:
# create the executables for distribution
- gradle --build-cache assembleDist --info
- mkdir bin
- cp build/libs/*.jar bin/
- cp build/distributions/*.zip bin/
# create checksum file to make sure we're distributing the right thing
- cd bin
- md5sum *.{jar,zip} > checksums.txt
artifacts:
name: "$CI_COMMIT_REF_NAME-snapshot"
paths:
- bin
expire_in: 1 week
cache:
key: "$CI_COMMIT_REF_NAME-$JAVA_VERSION"
policy: push
paths:
- build
- .gradle
build:linux:jdk8:
image: registry.gitlab.com/islandoftex/images/javafx-gradle:jdk8-latest
variables:
JAVA_VERSION: "8"
<<: *builddefinition
build:linux:jdk11:
image: registry.gitlab.com/islandoftex/images/javafx-gradle:jdk11-latest
variables:
JAVA_VERSION: "11"
<<: *builddefinition
.testtemplate: &testdefinition
stage: test
script:
- gradle test
cache:
key: "$CI_COMMIT_REF_NAME-$JAVA_VERSION"
policy: pull
paths:
- build
- .gradle
test:linux:jdk8:
dependencies:
- build:linux:jdk8
image: registry.gitlab.com/islandoftex/images/javafx-gradle:jdk8-latest
variables:
JAVA_VERSION: "8"
<<: *testdefinition
test:linux:jdk11:
dependencies:
- build:linux:jdk11
image: registry.gitlab.com/islandoftex/images/javafx-gradle:jdk11-latest
variables:
JAVA_VERSION: "11"
<<: *testdefinition