-
Notifications
You must be signed in to change notification settings - Fork 95
/
Copy path.gitlab-ci.yml
60 lines (55 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
# Default image for linux builds
image: objectboxio/buildenv-android:2023-08-29
variables:
# Disable the Gradle daemon. Gradle may run in a Docker container with a shared
# Docker volume containing GRADLE_USER_HOME. If the container is stopped after a job
# Gradle daemons may get killed, preventing proper clean-up of lock files in GRADLE_USER_HOME.
# Use low priority processes to avoid Gradle builds consuming all build machine resources.
GRADLE_OPTS: "-Dorg.gradle.daemon=false -Dorg.gradle.priority=low"
# Apache Maven related side notes:
# --batch-mode: recommended in CI, run in non-interactive mode (disables output color)
# --show-version: strongly recommended in CI, will display the JDK and Maven versions in use.
# Very useful to be quickly sure the selected versions were the ones you think.
# --errors: Produce execution error messages, useful for plugin developers (like us).
MVN_ARGS: "--batch-mode --show-version --errors"
stages:
- test
build-gradle:
stage: test
tags: [ docker, x64 ]
before_script:
# Print Gradle and JVM version info
- ./gradlew -version
script:
- ./gradlew clean build
artifacts:
when: always
paths:
- "**/build/reports/lint-results-debug.html"
reports:
junit: "**/build/test-results/**/TEST-*.xml"
run-console-gradle:
stage: test
tags: [ docker, x64 ]
needs: ["build-gradle"]
before_script:
# "|| true" for an OK exit code if path not found
- rm -r java-main/objectbox-notes-db || true
- rm -r kotlin-main/objectbox-notes-db || true
script:
- ./gradlew java-main:run
- ./gradlew java-main:run # Run again with existing database.
- ./gradlew kotlin-main:run
- ./gradlew kotlin-main:run # Run again with existing database
build-and-run-console-maven:
stage: test
tags: [ docker, x64 ]
before_script:
# "|| true" for an OK exit code if path not found
- rm -r java-main-maven/objectbox-notes-db || true
script:
- cd java-main-maven
- ./mvnw $MVN_ARGS compile exec:java
- ./mvnw $MVN_ARGS exec:java # Run again with existing database
- cd ../java-main-sync
- ./mvnw $MVN_ARGS compile