Files
distant-horizons-sharded/.gitlab-ci.yml
T
2022-03-22 03:14:55 +00:00

84 lines
2.6 KiB
YAML

# use Eclipse's JDK
image: gradle:eclipse-temurin
# all stages need to be defined here
stages:
- build
variables:
# If we have correctness issues when compiling this can be set to false
GRADLE_OPTS: "-Dorg.gradle.daemon=true"
# Pull core when building
GIT_SUBMODULE_STRATEGY: recursive
before_script:
- echo $CI_JOB_ID
# 1.18.1 build
build compile_18_1 1/2:
stage: build
script: ./gradlew build -PmcVer=1.18.1 --gradle-user-home cache/; ./gradlew merge --gradle-user-home cache/
# build using Java 17
image: eclipse-temurin:17
cache:
# The cached folders should only be used for this job.
# This prevents jobs from using the same folder(s) and overwriting each other
key: "$CI_JOB_ID_18-1"
policy: pull-push
paths:
- .gradle
- cache/
- Merged
artifacts:
name: "Merged_NightlyBuild_1_18_1-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths:
# relative to the root directory
- Merged
expire_in: 1 day
# 1.18.2 build
build compile_18_2 2/2:
stage: build
script: ./gradlew build -PmcVer=1.18.2 --gradle-user-home cache/; ./gradlew merge --gradle-user-home cache/
image: eclipse-temurin:17
cache:
key: "$CI_JOB_ID_18-2"
policy: pull-push
paths:
- .gradle
- cache/
- Merged
artifacts:
name: "Merged_NightlyBuild_1_18_2-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths:
- Merged
expire_in: 1 day
# unused deployment stage
#deploy:
# stage: deploy
# image: registry.gitlab.com/gitlab-org/release-cli:latest
# script:
# - echo 'running release_job'
# - echo 'Previous Job ID is printed below'
# - echo $GE_JOB_ID
# # Specifying that this job requires artifacts from the previous job to succeed
# needs:
# - job: build
# artifacts: true
# release:
# name: 'Unstable Jars for Latest Commit' #: $CI_COMMIT_SHORT_SHA'
# description: 'Created automatically using the release-cli.'
# # tag_name is a mendatory field and can not be an empty string
# tag_name: 'Unstable-$CI_COMMIT_SHORT_SHA'
# assets:
# links:
# - name: 'Fabric Jars'
# url: 'https://gitlab.com/jeseibel/minecraft-lod-mod/cw/-/jobs/${GE_JOB_ID}/artifacts/file/fabric/build/libs'
# - name: 'Forge Jars'
# url: 'https://gitlab.com/jeseibel/minecraft-lod-mod/cw/-/jobs/${GE_JOB_ID}/artifacts/file/forge/build/libs'