LYN-3112 Add CMakeTestbed to github and setup the Jenkins job to use an installed version (#461)
This commit is contained in:
@@ -45,6 +45,8 @@ if(EXISTS ${manifest_path})
|
||||
if(${json_error})
|
||||
message(FATAL_ERROR "Unable to read engines[${engine_path_index}] '${manifest_path}', error: ${json_error}")
|
||||
endif()
|
||||
list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake")
|
||||
if(engine_path)
|
||||
list(APPEND CMAKE_MODULE_PATH "${engine_path}/cmake")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
@@ -110,7 +110,6 @@
|
||||
},
|
||||
"profile_vs2019": {
|
||||
"TAGS": [
|
||||
"project",
|
||||
"daily-pipeline-metrics",
|
||||
"weekly-build-metrics"
|
||||
],
|
||||
@@ -301,5 +300,46 @@
|
||||
"CMAKE_TARGET": "INSTALL",
|
||||
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"
|
||||
}
|
||||
},
|
||||
"project_enginesource_profile_vs2019": {
|
||||
"TAGS": [
|
||||
"project"
|
||||
],
|
||||
"PIPELINE_ENV": {
|
||||
"EXECUTE_FROM_PROJECT": "1"
|
||||
},
|
||||
"COMMAND": "build_windows.cmd",
|
||||
"PARAMETERS": {
|
||||
"CONFIGURATION": "profile",
|
||||
"OUTPUT_DIRECTORY": "build\\windows_vs2019",
|
||||
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DCMAKE_MODULE_PATH=!WORKSPACE!/o3de/cmake",
|
||||
"CMAKE_LY_PROJECTS": "",
|
||||
"CMAKE_TARGET": "ALL_BUILD",
|
||||
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"
|
||||
}
|
||||
},
|
||||
"project_engineinstall_profile_vs2019": {
|
||||
"TAGS": [],
|
||||
"PIPELINE_ENV": {
|
||||
"EXECUTE_FROM_PROJECT": "1"
|
||||
},
|
||||
"COMMAND": "build_windows.cmd",
|
||||
"PARAMETERS": {
|
||||
"CONFIGURATION": "profile",
|
||||
"OUTPUT_DIRECTORY": "build\\windows_vs2019",
|
||||
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DCMAKE_MODULE_PATH=!WORKSPACE!/o3de/build/windows_vs2019/install/cmake",
|
||||
"CMAKE_LY_PROJECTS": "",
|
||||
"CMAKE_TARGET": "ALL_BUILD",
|
||||
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"
|
||||
}
|
||||
},
|
||||
"project_engineinstall_profile_vs2019_pipe": {
|
||||
"TAGS": [
|
||||
"project"
|
||||
],
|
||||
"steps": [
|
||||
"install_profile_vs2019",
|
||||
"project_engineinstall_profile_vs2019"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,12 +38,13 @@ def parse_args():
|
||||
|
||||
def build(build_config_filename, build_platform, build_type):
|
||||
# Read build_config and locate build_type
|
||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
cwd_dir = os.path.abspath(os.path.join(current_dir, '../..')) # engine's root
|
||||
config_dir = os.path.abspath(os.path.join(current_dir, 'Platform', build_platform))
|
||||
cwd_dir = os.getcwd()
|
||||
script_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
engine_dir = os.path.abspath(os.path.join(script_dir, '../..'))
|
||||
config_dir = os.path.abspath(os.path.join(script_dir, 'Platform', build_platform))
|
||||
build_config_abspath = os.path.join(config_dir, build_config_filename)
|
||||
if not os.path.exists(build_config_abspath):
|
||||
config_dir = os.path.abspath(os.path.join(cwd_dir, 'restricted', build_platform, os.path.relpath(current_dir, cwd_dir)))
|
||||
config_dir = os.path.abspath(os.path.join(engine_dir, 'restricted', build_platform, os.path.relpath(script_dir, engine_dir)))
|
||||
build_config_abspath = os.path.join(config_dir, build_config_filename)
|
||||
if not os.path.exists(build_config_abspath):
|
||||
print('[ci_build] File: {} not found'.format(build_config_abspath))
|
||||
@@ -66,9 +67,9 @@ def build(build_config_filename, build_platform, build_type):
|
||||
# Parameters are optional, so we could have none
|
||||
|
||||
# build_cmd is relative to the folder where this file is
|
||||
build_cmd_path = os.path.join(current_dir, 'Platform/{}/{}'.format(build_platform, build_cmd))
|
||||
build_cmd_path = os.path.join(script_dir, 'Platform/{}/{}'.format(build_platform, build_cmd))
|
||||
if not os.path.exists(build_cmd_path):
|
||||
config_dir = os.path.abspath(os.path.join(cwd_dir, 'restricted', build_platform, os.path.relpath(current_dir, cwd_dir)))
|
||||
config_dir = os.path.abspath(os.path.join(engine_dir, 'restricted', build_platform, os.path.relpath(script_dir, engine_dir)))
|
||||
build_cmd_path = os.path.join(config_dir, build_cmd)
|
||||
if not os.path.exists(build_cmd_path):
|
||||
print('[ci_build] File: {} not found'.format(build_cmd_path))
|
||||
@@ -76,8 +77,10 @@ def build(build_config_filename, build_platform, build_type):
|
||||
|
||||
print('[ci_build] Executing \"{}\"'.format(build_cmd_path))
|
||||
print(' cwd = {}'.format(cwd_dir))
|
||||
print(' engine_dir = {}'.format(engine_dir))
|
||||
print(' paramaters:')
|
||||
env_params = os.environ.copy()
|
||||
env_params['ENGINE_DIR'] = engine_dir
|
||||
for v in build_params:
|
||||
if v[:6] == "FORCE:":
|
||||
env_params[v[6:]] = build_params[v]
|
||||
|
||||
Reference in New Issue
Block a user