diff --git a/plugins.gitlab-ci.yml b/plugins.gitlab-ci.yml index e4c07f9f863b1eb068914ed94b04b2e56e37afbc..8286d918aa1561be8feb719fa485b8eb3699a2ba 100644 --- a/plugins.gitlab-ci.yml +++ b/plugins.gitlab-ci.yml @@ -7,7 +7,7 @@ include: - project: '${UNREAL_CI_PROJECT}' - ref: master + ref: master file: '/shared_scripts.yml' # In this file you are able to configure your plugins pipeline. @@ -37,6 +37,9 @@ include: # You can uncomment the deploy lines to deploy your project to the CAVE/VRDev. This only makes sense, if your plugin works # with a generated project. +variables: + UNREAL_VERSION: "5.3" + stages: - generate - build @@ -51,7 +54,7 @@ Build_Windows: extends: .Build_Windows_ tags: - windows - - unreal-4.26 + - unreal variables: GIT_STRATEGY: none GIT_CHECKOUT: "false" @@ -66,7 +69,7 @@ Build_Linux: extends: .Build_Linux_ tags: - linux - - unreal-4.26 + - unreal variables: GIT_STRATEGY: none GIT_CHECKOUT: "false" diff --git a/project.gitlab-ci.yml b/project.gitlab-ci.yml index f1365b07b325ebbb60a21d2055f597e0b5138e9e..ac8447df7ac81bfeec90f5ecdb81d78c10b596cd 100644 --- a/project.gitlab-ci.yml +++ b/project.gitlab-ci.yml @@ -3,15 +3,18 @@ # Virtual Reality & Immersive Visualisation Group. #------------------------------------------------------------------------------- -#The include file can be change to either be removed or reference a specific commit. -#Reference the Gitlab CI website for this +#The include file can either be removed or changed to reference a specific commit. include: - project: '${UNREAL_CI_PROJECT}' - ref: master + ref: master file: '/shared_scripts.yml' #In this file you are able to configure your pipeline. +# +#For Linux builds, use the UNREAL_VERSION variable to adjust your pipeline to the Unreal Version you want your project to be built and executed with. +#For Windows builds, you additionally need to set the correct version in the tag for now. +# #If you want to use the standard pipeline with all steps and deployment mechanisms, you are set-up correctly now. #If you want to customize something, either overwrite things that are defined in the shared_scripts repository, #or remove the "extends" and write your own scripts @@ -22,6 +25,9 @@ include: #If you want to alter the unreal-building process two variables are defined for either changing the CLIENT_CONFIG or #for adding EXTRA_ARGS to the building process +variables: + UNREAL_VERSION: "5.3" + stages: - build - deploy @@ -31,7 +37,7 @@ Build_Windows: extends: .Build_Windows_ tags: - windows - - unreal-4.26 + - unreal variables: CLIENT_CONFIG: "DebugGame" # CLIENT_CONFIG: "Shipping" @@ -41,7 +47,7 @@ Build_Linux: extends: .Build_Linux_ tags: - linux - - unreal-4.26 + - unreal variables: CLIENT_CONFIG: "DebugGame" # CLIENT_CONFIG: "Shipping" diff --git a/shared.meta b/shared.meta index f8ca6e1cfbd7f6f579b8c191b2e8c32a325f5724..c02c77d9f6d8a1fa954a0368342749521b969db1 100644 --- a/shared.meta +++ b/shared.meta @@ -13,5 +13,6 @@ "RUNNER_DESCRIPTION": "${BUILD_CI_RUNNER_DESCRIPTION}", "RUNNER_TAGS": "${CLEANED_BUILD_CI_RUNNER_TAGS}", "RUNNER_VERSION": "${BUILD_CI_RUNNER_VERSION}", - "USER_OR_GROUPNAME": "${CI_PROJECT_NAMESPACE}" + "USER_OR_GROUPNAME": "${CI_PROJECT_NAMESPACE}", + "UNREAL_VERSION" : "${UNREAL_VERSION}" } diff --git a/shared_scripts.yml b/shared_scripts.yml index 6962f228e727338929a9bc5707fefac7f632ef05..8cc27b90a5be571747656e9f55bd88cde9b057e8 100644 --- a/shared_scripts.yml +++ b/shared_scripts.yml @@ -12,6 +12,7 @@ variables: NUMBER_OF_OLD_VERSIONS: 3 # number of old revisions to keep after the deploy CLUSTER_ADDRESS: "copy18-1.hpc.itc.rwth-aachen.de" SHARED_META_URL: "https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/unreal-ci/-/raw/master/shared.meta" + UNREAL_VERSION: "5.3" ##################################Generate Project################################## @@ -27,7 +28,7 @@ variables: name: registry.git-ce.rwth-aachen.de/vr-vis/vr-group/alpine-ci-container/alpine-ci:latest variables: GEN_TEMPLATE_REPO: "https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/unrealprojecttemplate.git" - GEN_TEMPLATE_BRANCH: "4.26" + GEN_TEMPLATE_BRANCH: "${UNREAL_VERSION}" GEN_DEPENDENCIES: "()" RUN_SETUP: "true" script: @@ -61,17 +62,17 @@ variables: EXTRA_ARGS: "" tags: - windows - - unreal-4.26 + - unreal script: # Clean folder before building - git clean -qxfdf; git submodule foreach --quiet --recursive git clean -qxfdf # Preparation and building stage - $env:Path="$env:PREPEND_PATH;$env:Path;$env:APPEND_PATH" - $env:PROJECT_NAME=(Get-ChildItem *.uproject).BaseName - - . "$env:UE_ENGINE_FOLDER\Build\BatchFiles\RunUAT.bat" BuildCookRun -Project="$env:CI_PROJECT_DIR/$env:PROJECT_NAME.uproject" -WaitMutex -NoP4 -TargetPlatform=Win64 -ClientConfig="$env:CLIENT_CONFIG" -Cook -allmaps -Build -Stage -Pak -Iterate -utf8output -Archive -ArchiveDirectory="$env:CI_PROJECT_DIR/Release/$env:CI_PROJECT_NAME" -Rocket -Package ($env:EXTRA_ARGS); $env:EXIT_CODE=$LASTEXITCODE + - . "$env:UE_ENGINES_FOLDER\UE_$env:UNREAL_VERSION\Engine\Build\BatchFiles\RunUAT.bat" BuildCookRun -Project="$env:CI_PROJECT_DIR/$env:PROJECT_NAME.uproject" -WaitMutex -NoP4 -TargetPlatform=Win64 -ClientConfig="$env:CLIENT_CONFIG" -Cook -allmaps -Build -Stage -Pak -Iterate -utf8output -Archive -ArchiveDirectory="$env:CI_PROJECT_DIR/Release/$env:CI_PROJECT_NAME" -Rocket -Package ($env:EXTRA_ARGS); $env:EXIT_CODE=$LASTEXITCODE # Copy build logs - mkdir -f "$env:CI_PROJECT_DIR/Release/$env:CI_PROJECT_NAME/BuildLogs/" | out-null - - cp -ErrorAction Ignore -R "$env:ADDITIONAL_LOGS/*" "$env:CI_PROJECT_DIR/Release/$env:CI_PROJECT_NAME/BuildLogs/" ; $true | out-null + - cp -ErrorAction Ignore -R "$env:UE_ENGINES_FOLDER\UE_$env:UNREAL_VERSION\Engine\Programs\AutomationTool\Saved\Logs\*" "$env:CI_PROJECT_DIR/Release/$env:CI_PROJECT_NAME/BuildLogs/" ; $true | out-null # Rename thumbnail if it exists - mv -ErrorAction Ignore ${PROJECT_NAME}.png thumbnail.png ; $true | out-null # Build variables @@ -97,6 +98,7 @@ variables: ##################################Linux################################## .Build_Linux_: + image: ghcr.io/epicgames/unreal-engine:dev-${UNREAL_VERSION} stage: build variables: GIT_STRATEGY: clone @@ -105,8 +107,13 @@ variables: EXTRA_ARGS: "" tags: - linux - - unreal-4.26 script: + # Check for legacy tags and explicitly fail if they are still being used. + - if [[ $CI_RUNNER_TAGS = *unreal-* ]] ; then + - echo -e "\e[31mERROR You are still using Unreal-Version specific runner tags (unreal-XX). These are deprecated, please use the general <unreal> tag!" + - echo -e "\e[31mERROR To specify the Unreal Version, change the UNREAL_VERSION variable in your .gitlab-ci.yml!" + - exit 1 + - fi # Clean folder before building - git clean -qxfdf && git submodule foreach --quiet --recursive git clean -qxfdf # Preparation and building stage