-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitlab-ci.yml
More file actions
184 lines (167 loc) · 6.58 KB
/
.gitlab-ci.yml
File metadata and controls
184 lines (167 loc) · 6.58 KB
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
#-------------------------------------------------------------------------------
# Copyright (c) 2022 RWTH Aachen University, Germany,
# Virtual Reality & Immersive Visualisation Group.
#-------------------------------------------------------------------------------
spec:
inputs:
unreal_version:
description: The Unreal Engine version in the form of "major.minor"
type: string
regex: \d+\.\d+
default: "5.4"
build_type:
description: The game build type.
type: string
options: ["DebugGame", "Shipping"]
default: "DebugGame"
number_of_old_versions:
description: How many successful pipeline builds of this branch should be stored on the cluster.
type: number
default: 3
custom_ndisplay_config:
description: Custom nDisplay config stored on the cluster filesystem.
type: string
default: ""
---
# The include file can be change to either be removed or reference a specific commit.
include:
- project: '${UNREAL_CI_PROJECT}'
ref: master
file: '/shared_scripts.yml'
# In this file you are able to configure your plugins pipeline.
# 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
#
# If you want your pipeline to run on every commit, just remove the "only" blocks. Keep in mind, that a build
# can take some time.
#
# 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
#
# For the generate stage, you can specify needed dependencies in GEN_DEPENDENCIES with [Branch@PluginFolder] as key
# Example:
#
# Generate_Project:
# only: ['web', 'schedules']
# extends: .Generate_Project_
# variables:
# GEN_TEMPLATE_REPO: "https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/unrealprojecttemplate.git"
# GEN_TEMPLATE_BRANCH: "4.26"
# GEN_DEPENDENCIES: "(
# [4.26@RWTHVRToolkit]='https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/Plugins/rwth-vr-toolkit.git'
# [4.26@UniversalLogging]='https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/Plugins/universallogging.git'
# )"
#
# 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.
#
# Use the UNREAL_VERSION variable to adjust to your preferred Unreal version.
# Use the CUSTOM_NDISPLAY_CONFIG variable in case you need a custom ndisplay config. These are always located in /home/vrdemo/configs/ndisplay.
variables:
UNREAL_VERSION: $[[ inputs.unreal_version ]]
NUMBER_OF_OLD_VERSIONS: $[[ inputs.number_of_old_versions ]]
CUSTOM_NDISPLAY_CONFIG: $[[ inputs.custom_ndisplay_config ]]
stages:
- analyze
- generate
- build
- deploy
clang-format:
image: registry.git-ce.rwth-aachen.de/vr-vis/vr-group/alpine-analyze:latest
tags:
- docker-executor
- linux
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
variables:
GIT_STRATEGY: fetch
GIT_CHECKOUT: "true"
GIT_DEPTH: "2"
stage: analyze
allow_failure: false
script:
- clang-format --version
- git fetch --depth 1 origin $CI_MERGE_REQUEST_DIFF_BASE_SHA
- echo $CI_MERGE_REQUEST_DIFF_BASE_SHA
- linter_errors=$(unbuffer git-clang-format --commit "$CI_MERGE_REQUEST_DIFF_BASE_SHA" *.h *.cpp -q --diff | grep -v --color=always "no modified files to format" || true)
- echo "$linter_errors"
- if [ ! -z "$linter_errors" ]; then echo "Detected formatting issues; please fix. Make sure you are using the same clang-format version! You can download it from the development section in this repo's wiki."; exit 1; else echo "Formatting is correct"; exit 0; fi
Generate_Project:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
extends: .Generate_Project_
variables:
RUN_SETUP: "false"
GEN_DEPENDENCIES: "(
[master@UnrealDTrackPlugin]='https://github.com/VRGroupRWTH/UnrealDTrackPlugin.git'
[dev/5.4@RWTHVRCluster]='https://git-ce.rwth-aachen.de/vr-vis/VR-Group/unreal-development/plugins/rwth-vr-cluster-plugin.git'
)"
Generate_Project_Without_Cluster:
extends: Generate_Project
variables:
GEN_DEPENDENCIES: "(
[master@UnrealDTrackPlugin]='https://github.com/VRGroupRWTH/UnrealDTrackPlugin.git'
)"
script: # if we don't do this, cooking will for some reason fail even though it should use the correct fallback
- !reference [Generate_Project, script]
- echo "Generating without cluster mode, removing nDisplay configs..."
- cd ${CI_PROJECT_DIR}
- sed -i '/DisplayCluster/d' Config/Linux/LinuxEngine.ini
Build_Windows:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
extends: .Build_Windows_
tags:
- windows
- unreal
variables:
GIT_STRATEGY: none
GIT_CHECKOUT: "false"
# CLIENT_CONFIG: "Shipping"
CLIENT_CONFIG: $[[ inputs.build_type ]]
needs:
- job: "Generate_Project"
artifacts: true
Build_Linux:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
- if: $CI_PIPELINE_SOURCE == 'merge_request_event'
- if: $CI_COMMIT_TAG
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
extends: .Build_Linux_
tags:
- linux
- unreal
- docker-executor
variables:
GIT_STRATEGY: none
GIT_CHECKOUT: "false"
# CLIENT_CONFIG: "Shipping"
CLIENT_CONFIG: $[[ inputs.build_type ]]
needs:
- job: "Generate_Project"
artifacts: true
# Builds for linux without the cluster plugin
Build_Linux_Without_Cluster:
extends: Build_Linux
needs:
- job: "Generate_Project_Without_Cluster"
artifacts: true
# Deploys to vrdemo instead of av006de. Use extends: .Deploy_CAVE_ to deploy to legacy av006de
Deploy_CAVE:
rules:
- if: $CI_PIPELINE_SOURCE == "web"
- if: $CI_PIPELINE_SOURCE == "schedule"
extends: .Deploy_vrdemo_
needs:
- job: "Build_Linux"
artifacts: true