Made ci bit smaller

This commit is contained in:
coolGi
2023-07-19 23:37:21 +09:30
parent 2ee087f29d
commit eaa61098fa
+16 -27
View File
@@ -1,6 +1,6 @@
# use Eclipse's JDK
image: gradle:eclipse-temurin
# The ci should always use an unix/unix-like OS to work
# The ci should always use a unix(-like) OS to work
# all stages need to be defined here
@@ -14,18 +14,26 @@ stages:
- pages
variables:
# Pull core when building
GIT_SUBMODULE_STRATEGY: recursive
# Pull core when building
GIT_SUBMODULE_STRATEGY: recursive
# This can be extended so code is a bit less duplicated
# These can be extended so code is a bit less duplicated
.build_java:
image: eclipse-temurin:17
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: true
.build_mc:
script:
# this both runs the unit tests and assembles the code
- ./gradlew clean -PmcVer="${MC_VER}" --gradle-user-home cache/;
- ./gradlew build -PmcVer="${MC_VER}" --gradle-user-home cache/;
- ./gradlew mergeJars -PmcVer="${MC_VER}" --gradle-user-home cache/;
image: eclipse-temurin:17
artifacts:
name: "NightlyBuild_${MC_VER}-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths:
@@ -43,13 +51,7 @@ variables:
- quilt/build/libs/*-sources.jar
expire_in: 1 day
when: always
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: true
extends: .build_java
# 1.18.2 build
@@ -92,7 +94,6 @@ api:
# this also runs unit tests
- ./gradlew api:build --gradle-user-home cache/;
- ./gradlew api:addSourcesToCompiledJar --gradle-user-home cache/;
image: eclipse-temurin:17
artifacts:
name: "Api_NightlyBuild-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}"
paths:
@@ -104,13 +105,7 @@ api:
- coreSubProjects/api/build/libs/merged/*-sources.jar
expire_in: 1 day
when: always
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: true
extends: .build_java
# generate and publish API javadocs
@@ -124,17 +119,11 @@ pages:
- ./gradlew api:javadoc --gradle-user-home cache/;
- mkdir public
- cp -r $CI_PROJECT_DIR/coreSubProjects/api/build/docs/javadoc/. public
image: eclipse-temurin:17
artifacts:
paths:
- public
cache:
key: "gradleCache"
policy: pull-push
paths:
- .gradle
- cache/
allow_failure: false
extends: .build_java