Merge branch 'TIF/Runtime' into TIF/Jenkins
This commit is contained in:
@@ -46,4 +46,4 @@ fi
|
||||
echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS}
|
||||
cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS}
|
||||
|
||||
popd
|
||||
popd
|
||||
|
||||
@@ -12,6 +12,16 @@
|
||||
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
# Jenkins defines environment variables for parameters and passes "false" to variables
|
||||
# that are not set. Here we clear them if they are false so we can also just define them
|
||||
# from command line
|
||||
if [[ "${CLEAN_ASSETS}" == "false" ]]; then
|
||||
CLEAN_ASSETS=
|
||||
fi
|
||||
if [[ "${CLEAN_OUTPUT_DIRECTORY}" == "false" ]]; then
|
||||
CLEAN_OUTPUT_DIRECTORY=
|
||||
fi
|
||||
|
||||
if [[ -n "$CLEAN_ASSETS" ]]; then
|
||||
echo "[ci_build] CLEAN_ASSETS option set"
|
||||
for project in $(echo $CMAKE_LY_PROJECTS | sed "s/;/ /g")
|
||||
@@ -23,10 +33,35 @@ if [[ -n "$CLEAN_ASSETS" ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# If the node label changes, we issue a clean output since node changes can change SDK/CMake/toolchains/etc
|
||||
LAST_CONFIGURE_NODE_LABEL_FILE=ci_last_node_label.txt
|
||||
if [[ -n "$NODE_LABEL" ]]; then
|
||||
if [[ -d $OUTPUT_DIRECTORY ]]; then
|
||||
pushd $OUTPUT_DIRECTORY
|
||||
if [[ -e ${LAST_CONFIGURE_NODE_LABEL_FILE} ]]; then
|
||||
LAST_NODE_LABEL=$(<${LAST_CONFIGURE_NODE_LABEL_FILE})
|
||||
else
|
||||
LAST_NODE_LABEL=
|
||||
fi
|
||||
# Detect if the node label has changed
|
||||
if [[ "${LAST_NODE_LABEL}" != "${NODE_LABEL}" ]]; then
|
||||
echo [ci_build] Last run was done with node label \"${LAST_NODE_LABEL}\", new node label is \"${NODE_LABEL}\", forcing CLEAN_OUTPUT_DIRECTORY
|
||||
CLEAN_OUTPUT_DIRECTORY=1
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$CLEAN_OUTPUT_DIRECTORY" ]]; then
|
||||
echo "[ci_build] CLEAN_OUTPUT_DIRECTORY option set"
|
||||
if [[ -d $OUTPUT_DIRECTORY ]]; then
|
||||
echo "[ci_build] Deleting \"${OUTPUT_DIRECTORY}\""
|
||||
rm -rf ${OUTPUT_DIRECTORY}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p ${OUTPUT_DIRECTORY}
|
||||
# Save the node label
|
||||
pushd $OUTPUT_DIRECTORY
|
||||
echo "${NODE_LABEL}" > ${LAST_CONFIGURE_NODE_LABEL_FILE}
|
||||
popd
|
||||
|
||||
@@ -12,6 +12,16 @@
|
||||
|
||||
set -o errexit # exit on the first failure encountered
|
||||
|
||||
# Jenkins defines environment variables for parameters and passes "false" to variables
|
||||
# that are not set. Here we clear them if they are false so we can also just define them
|
||||
# from command line
|
||||
if [[ "${CLEAN_ASSETS}" == "false" ]]; then
|
||||
CLEAN_ASSETS=
|
||||
fi
|
||||
if [[ "${CLEAN_OUTPUT_DIRECTORY}" == "false" ]]; then
|
||||
CLEAN_OUTPUT_DIRECTORY=
|
||||
fi
|
||||
|
||||
if [[ -n "$CLEAN_ASSETS" ]]; then
|
||||
echo "[ci_build] CLEAN_ASSETS option set"
|
||||
for project in $(echo $CMAKE_LY_PROJECTS | sed "s/;/ /g")
|
||||
@@ -23,10 +33,35 @@ if [[ -n "$CLEAN_ASSETS" ]]; then
|
||||
done
|
||||
fi
|
||||
|
||||
# If the node label changes, we issue a clean output since node changes can change SDK/CMake/toolchains/etc
|
||||
LAST_CONFIGURE_NODE_LABEL_FILE=ci_last_node_label.txt
|
||||
if [[ -n "$NODE_LABEL" ]]; then
|
||||
if [[ -d $OUTPUT_DIRECTORY ]]; then
|
||||
pushd $OUTPUT_DIRECTORY
|
||||
if [[ -e ${LAST_CONFIGURE_NODE_LABEL_FILE} ]]; then
|
||||
LAST_NODE_LABEL=$(<${LAST_CONFIGURE_NODE_LABEL_FILE})
|
||||
else
|
||||
LAST_NODE_LABEL=
|
||||
fi
|
||||
# Detect if the node label has changed
|
||||
if [[ "${LAST_NODE_LABEL}" != "${NODE_LABEL}" ]]; then
|
||||
echo [ci_build] Last run was done with node label \"${LAST_NODE_LABEL}\", new node label is \"${NODE_LABEL}\", forcing CLEAN_OUTPUT_DIRECTORY
|
||||
CLEAN_OUTPUT_DIRECTORY=1
|
||||
fi
|
||||
popd
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n "$CLEAN_OUTPUT_DIRECTORY" ]]; then
|
||||
echo "[ci_build] CLEAN_OUTPUT_DIRECTORY option set"
|
||||
if [[ -d $OUTPUT_DIRECTORY ]]; then
|
||||
echo "[ci_build] Deleting \"${OUTPUT_DIRECTORY}\""
|
||||
rm -rf ${OUTPUT_DIRECTORY}
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p ${OUTPUT_DIRECTORY}
|
||||
# Save the node label
|
||||
pushd $OUTPUT_DIRECTORY
|
||||
echo "${NODE_LABEL}" > ${LAST_CONFIGURE_NODE_LABEL_FILE}
|
||||
popd
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
"PARAMETERS": {
|
||||
"CONFIGURATION": "debug",
|
||||
"OUTPUT_DIRECTORY": "build\\windows_vs2019",
|
||||
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_BUILD_WITH_INCREMENTAL_LINKING_DEBUG=FALSE",
|
||||
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE",
|
||||
"CMAKE_LY_PROJECTS": "AutomatedTesting",
|
||||
"CMAKE_TARGET": "ALL_BUILD",
|
||||
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"
|
||||
@@ -113,7 +113,7 @@
|
||||
"PARAMETERS": {
|
||||
"CONFIGURATION": "debug",
|
||||
"OUTPUT_DIRECTORY": "build\\windows_vs2019",
|
||||
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_BUILD_WITH_INCREMENTAL_LINKING_DEBUG=FALSE",
|
||||
"CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE",
|
||||
"CMAKE_LY_PROJECTS": "AutomatedTesting",
|
||||
"CMAKE_TARGET": "TEST_SUITE_smoke TEST_SUITE_main",
|
||||
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo",
|
||||
@@ -318,6 +318,20 @@
|
||||
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"
|
||||
}
|
||||
},
|
||||
"windows_installer": {
|
||||
"TAGS": [
|
||||
"package"
|
||||
],
|
||||
"COMMAND": "build_installer_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 -DLY_DISABLE_TEST_MODULES=TRUE -DCPACK_WIX_ROOT=\"!WIX!\"",
|
||||
"CMAKE_LY_PROJECTS": "",
|
||||
"CMAKE_TARGET": "ALL_BUILD",
|
||||
"CMAKE_NATIVE_BUILD_ARGS": "/m /nologo"
|
||||
}
|
||||
},
|
||||
"project_enginesource_profile_vs2019": {
|
||||
"TAGS": [
|
||||
"project"
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
@ECHO OFF
|
||||
REM
|
||||
REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
REM its licensors.
|
||||
REM
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this
|
||||
REM distribution (the "License"). All use of this software is governed by the License,
|
||||
REM or, if provided, by the license below or the license accompanying this file. Do not
|
||||
REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM
|
||||
|
||||
CALL "%~dp0build_windows.cmd"
|
||||
IF NOT %ERRORLEVEL%==0 GOTO :error
|
||||
|
||||
CALL "%~dp0installer_windows.cmd"
|
||||
IF NOT %ERRORLEVEL%==0 GOTO :error
|
||||
|
||||
EXIT /b 0
|
||||
|
||||
:error
|
||||
EXIT /b 1
|
||||
@@ -70,4 +70,4 @@ EXIT /b 0
|
||||
|
||||
:error
|
||||
POPD
|
||||
EXIT /b 1
|
||||
EXIT /b 1
|
||||
|
||||
@@ -12,6 +12,16 @@ REM
|
||||
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
REM Jenkins defines environment variables for parameters and passes "false" to variables
|
||||
REM that are not set. Here we clear them if they are false so we can also just define them
|
||||
REM from command line
|
||||
IF "%CLEAN_ASSETS%"=="false" (
|
||||
set CLEAN_ASSETS=
|
||||
)
|
||||
IF "%CLEAN_OUTPUT_DIRECTORY%"=="false" (
|
||||
set CLEAN_OUTPUT_DIRECTORY=
|
||||
)
|
||||
|
||||
IF DEFINED CLEAN_ASSETS (
|
||||
ECHO [ci_build] CLEAN_ASSETS option set
|
||||
FOR %%P in (%CMAKE_LY_PROJECTS%) do (
|
||||
@@ -19,7 +29,26 @@ IF DEFINED CLEAN_ASSETS (
|
||||
ECHO [ci_build] Deleting "%%P\Cache"
|
||||
DEL /s /q /f %%P\Cache 1>nul
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
REM If the node label changes, we issue a clean output since node changes can change SDK/CMake/toolchains/etc
|
||||
SET LAST_CONFIGURE_NODE_LABEL_FILE=ci_last_node_label.txt
|
||||
IF DEFINED NODE_LABEL (
|
||||
IF EXIST %OUTPUT_DIRECTORY% (
|
||||
PUSHD %OUTPUT_DIRECTORY%
|
||||
IF EXIST !LAST_CONFIGURE_NODE_LABEL_FILE! (
|
||||
FOR /F "delims=" %%x in (%LAST_CONFIGURE_NODE_LABEL_FILE%) DO SET LAST_NODE_LABEL=%%x
|
||||
) ELSE (
|
||||
SET LAST_NODE_LABEL=
|
||||
)
|
||||
REM Detect if the node label has changed
|
||||
IF !LAST_NODE_LABEL! NEQ !NODE_LABEL! (
|
||||
ECHO [ci_build] Last run was done with node label "!LAST_NODE_LABEL!", new node label is "!NODE_LABEL!", forcing CLEAN_OUTPUT_DIRECTORY
|
||||
SET CLEAN_OUTPUT_DIRECTORY=1
|
||||
)
|
||||
POPD
|
||||
)
|
||||
)
|
||||
|
||||
IF DEFINED CLEAN_OUTPUT_DIRECTORY (
|
||||
@@ -28,4 +57,12 @@ IF DEFINED CLEAN_OUTPUT_DIRECTORY (
|
||||
ECHO [ci_build] Deleting "%OUTPUT_DIRECTORY%"
|
||||
DEL /s /q /f %OUTPUT_DIRECTORY% 1>nul
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
IF NOT EXIST "%OUTPUT_DIRECTORY%" (
|
||||
MKDIR %OUTPUT_DIRECTORY%.
|
||||
)
|
||||
REM Save the node label
|
||||
PUSHD %OUTPUT_DIRECTORY%
|
||||
ECHO !NODE_LABEL!> !LAST_CONFIGURE_NODE_LABEL_FILE!
|
||||
POPD
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
@ECHO OFF
|
||||
REM
|
||||
REM All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
|
||||
REM its licensors.
|
||||
REM
|
||||
REM For complete copyright and license terms please see the LICENSE at the root of this
|
||||
REM distribution (the "License"). All use of this software is governed by the License,
|
||||
REM or, if provided, by the license below or the license accompanying this file. Do not
|
||||
REM remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
|
||||
REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
REM
|
||||
|
||||
SETLOCAL EnableDelayedExpansion
|
||||
|
||||
CALL %~dp0env_windows.cmd
|
||||
|
||||
IF NOT EXIST %OUTPUT_DIRECTORY% (
|
||||
ECHO [ci_build] Error: $OUTPUT_DIRECTORY was not found
|
||||
GOTO :error
|
||||
)
|
||||
PUSHD %OUTPUT_DIRECTORY%
|
||||
|
||||
REM Override the temporary directory used by wix to the workspace
|
||||
SET "WIX_TEMP=!WORKSPACE!/temp/wix"
|
||||
IF NOT EXIST "%WIX_TEMP%" (
|
||||
MKDIR "%WIX_TEMP%"
|
||||
)
|
||||
|
||||
REM Make sure we are using the CMake version of CPack and not the one that comes with chocolatey
|
||||
SET CPACK_PATH=
|
||||
IF "%LY_CMAKE_PATH%"=="" (
|
||||
REM quote the paths from 'where' so we can properly tokenize ones in the list with spaces
|
||||
FOR /F delims^=^"^ tokens^=1 %%i in ('where /F cpack') DO (
|
||||
REM The cpack in chocolatey expects a number supplied with --version so it will error
|
||||
"%%i" --version > NUL
|
||||
IF !ERRORLEVEL!==0 (
|
||||
SET "CPACK_PATH=%%i"
|
||||
GOTO :run_cpack
|
||||
)
|
||||
)
|
||||
) ELSE (
|
||||
SET "CPACK_PATH=%LY_CMAKE_PATH%\cpack.exe"
|
||||
)
|
||||
|
||||
:run_cpack
|
||||
ECHO [ci_build] "!CPACK_PATH!" --version
|
||||
"!CPACK_PATH!" --version
|
||||
IF ERRORLEVEL 1 (
|
||||
ECHO [ci_build] CPack not found!
|
||||
GOTO :popd_error
|
||||
)
|
||||
|
||||
ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION%
|
||||
"!CPACK_PATH!" -C %CONFIGURATION%
|
||||
IF NOT %ERRORLEVEL%==0 GOTO :popd_error
|
||||
|
||||
POPD
|
||||
EXIT /b 0
|
||||
|
||||
:popd_error
|
||||
POPD
|
||||
|
||||
:error
|
||||
EXIT /b 1
|
||||
Reference in New Issue
Block a user