From c6bea3faa3f95f03747bd7158340ca5c76c45a67 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Tue, 22 Mar 2022 03:02:44 +0000 Subject: [PATCH] Try sequential builds in CI --- .gitlab-ci.yml | 41 +++++++++-------------------------------- 1 file changed, 9 insertions(+), 32 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0561da04b..a15cfae1a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,8 +3,8 @@ image: gradle:eclipse-temurin # all stages need to be defined here stages: - - build -# - zip_artifacts + - build_18-1 + - build_18-2 variables: # If we have correctness issues when compiling this can be set to false @@ -19,23 +19,22 @@ before_script: - echo GE_JOB_ID=$CI_JOB_ID >> generate_jars.env -# 1.18.1 build -build compileAndMerge 1/2: - stage: build +# 1.18.1 build +build_18-1: # build compile_18_1 1/2: + stage: build_18-1 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_COMMIT_REF_NAME_18-1" policy: pull-push paths: - .gradle - cache/ - Merged - - # TEMPORARY, there should be a way of either generating artifacts per build or in a separate stage artifacts: - # This should only be done after the last build, otherwise there will be duplicate jars name: "Merged_NightlyBuild_1_18_1-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" paths: # relative to the root directory @@ -43,10 +42,9 @@ build compileAndMerge 1/2: expire_in: 1 day # 1.18.2 build -build compileAndMerge 2/2: - stage: build +build_18-2: #build compile_18_2 2/2: + stage: build_18-2 script: ./gradlew build -PmcVer=1.18.2 --gradle-user-home cache/; ./gradlew merge --gradle-user-home cache/ - # build using Java 17 image: eclipse-temurin:17 cache: key: "$CI_COMMIT_REF_NAME_18-2" @@ -55,34 +53,13 @@ build compileAndMerge 2/2: - .gradle - cache/ - Merged - - # TEMPORARY, there should be a way of either generating artifacts per build or in a separate stage artifacts: - # This should only be done after the last build, otherwise there will be duplicate jars name: "Merged_NightlyBuild_1_18_2-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" paths: - # relative to the root directory - Merged expire_in: 1 day -# # put artifacts in a zip -# # This should only be done after all the builds have been completed -# zip_artifacts: -# stage: zip_artifacts -# # The complier complains if we don't do something with the script line -# script: echo 'Building complete. Creating artifact Zip.' -# # build using Java 17 -# image: eclipse-temurin:17 -# artifacts: -# # This should only be done after the last build, otherwise there will be duplicate jars -# name: "Merged_NightlyBuild-${CI_COMMIT_SHORT_SHA}-${CI_COMMIT_TIMESTAMP}" -# paths: -# # relative to the root directory -# - Merged -# expire_in: 1 day - - # unused deployment stage #deploy: