-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
82 lines (74 loc) · 2.39 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
image: openjdk:11
stages:
- build
- test
- wrap
- deploy
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
cache:
paths:
- .gradle/wrapper
- .gradle/caches
build-client:
stage: build
script:
- ./gradlew shadowJar
- mv ./build/libs/sheepit-client-all.jar ./
artifacts:
name: "$CI_COMMIT_REF_NAME-sheepit-artifact-jar"
paths:
- ./sheepit-client-all.jar
expire_in: 1 week
test:
stage: test
script:
- ./gradlew check
exe-wrap:
stage: wrap
image: debian:stable-slim
variables:
JVM_NAME: "jdk-11.0.13+8-jre" # Taken from https://adoptium.net/releases.html?variant=openjdk11&jvmVariant=hotspot
script:
- apt-get update
- apt-get install -y --no-install-recommends unzip p7zip # Add dependencies
- mkdir jre # Make folder hierarchy
- cp ./sheepit-client-all.jar jre/sheepit-client.jar # Copy client artifact to be packaged
- unzip exe-wrapper/$JVM_NAME.zip # Unzip the Java Runtime Environment archive
- cp -rf $JVM_NAME/* jre/ # Copy JRE to be packaged
- cd jre
- 7zr a -mx=9 ../application.7z ./ # Compress and archive app package
- cd ..
- cat exe-wrapper/starter.sfx exe-wrapper/config.cfg application.7z > sheepit-wrapper.exe
# Write wrapper-executable, wrapper-config and app package into final exe artifact
artifacts:
name: "$CI_COMMIT_REF_NAME-sheepit-artifact-exe"
paths:
- ./sheepit-wrapper.exe
expire_in: 1 week
dmg-x64-wrap:
stage: wrap
image: debian:stable-slim
variables:
ARCH: "Intel-x64"
JRETAR: "OpenJDK11U-jre_x64_mac_hotspot_11.0.15_10.tar.gz" # Taken from https://adoptium.net/releases.html?variant=openjdk11&jvmVariant=hotspot
script:
- dmg-wrapper/ci-build-dmg.sh $ARCH $JRETAR
artifacts:
name: "$CI_COMMIT_REF_NAME-sheepit-artifact-$ARCH-dmg"
paths:
- ./dmg-wrapper/SheepIt-$ARCH.dmg
expire_in: 1 week
dmg-arm-wrap:
stage: wrap
image: debian:stable-slim
variables:
ARCH: "Apple-ARM"
JRETAR: "OpenJDK17U-jre_aarch64_mac_hotspot_17.0.2_8.tar.gz" # Taken from https://adoptium.net/de/temurin/releases/?variant=openjdk17&jvmVariant=hotspot
script:
- dmg-wrapper/ci-build-dmg.sh $ARCH $JRETAR
artifacts:
name: "$CI_COMMIT_REF_NAME-sheepit-artifact-$ARCH-dmg"
paths:
- ./dmg-wrapper/SheepIt-$ARCH.dmg
expire_in: 1 week