GCC Support for Linux
Updates and fixes to support GCC for Linux Signed-off-by: Steve Pham <82231385+spham-amzn@users.noreply.github.com> Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com>
This commit is contained in:
@@ -58,6 +58,21 @@
|
||||
"CMAKE_TARGET": "all"
|
||||
}
|
||||
},
|
||||
"profile_gcc_nounity": {
|
||||
"TAGS": [
|
||||
"nightly-incremental",
|
||||
"nightly-clean"
|
||||
],
|
||||
"COMMAND": "build_linux.sh",
|
||||
"PARAMETERS": {
|
||||
"CONFIGURATION": "profile",
|
||||
"OUTPUT_DIRECTORY": "build/linux_gcc",
|
||||
"CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLY_PARALLEL_LINK_JOBS=4 -DLY_GCC_BUILD_FOR_GCOV=OFF",
|
||||
"CMAKE_LY_PROJECTS": "AutomatedTesting",
|
||||
"CMAKE_TARGET": "all",
|
||||
"LY_MIN_MEMORY_PER_CORE": "2097152"
|
||||
}
|
||||
},
|
||||
"profile_nounity": {
|
||||
"TAGS": [
|
||||
"weekly-build-metrics"
|
||||
@@ -87,6 +102,23 @@
|
||||
"TEST_RESULTS": "False"
|
||||
}
|
||||
},
|
||||
"test_profile_gcc_nounity": {
|
||||
"TAGS": [
|
||||
"nightly-incremental",
|
||||
"nightly-clean"
|
||||
],
|
||||
"COMMAND": "build_test_linux.sh",
|
||||
"PARAMETERS": {
|
||||
"CONFIGURATION": "profile",
|
||||
"OUTPUT_DIRECTORY": "build/linux_gcc",
|
||||
"CMAKE_OPTIONS": "-G 'Ninja Multi-Config' -DLY_UNITY_BUILD=FALSE -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DLY_PARALLEL_LINK_JOBS=4 -DLY_GCC_BUILD_FOR_GCOV=ON",
|
||||
"CMAKE_LY_PROJECTS": "AutomatedTesting",
|
||||
"CMAKE_TARGET": "all",
|
||||
"CTEST_OPTIONS": "-E (AutomatedTesting::Atom_TestSuite_Main|AutomatedTesting::TerrainTests_Main|Gem::EMotionFX.Editor.Tests) -L (SUITE_smoke|SUITE_main) -LE (REQUIRES_gpu) --no-tests=error",
|
||||
"TEST_RESULTS": "False",
|
||||
"LY_MIN_MEMORY_PER_CORE": "2097152"
|
||||
}
|
||||
},
|
||||
"test_profile_nounity": {
|
||||
"TAGS": [],
|
||||
"COMMAND": "build_test_linux.sh",
|
||||
|
||||
@@ -43,7 +43,30 @@ if [[ ! -z "$RUN_CONFIGURE" ]]; then
|
||||
echo "${CONFIGURE_CMD}" > ${LAST_CONFIGURE_CMD_FILE}
|
||||
fi
|
||||
|
||||
eval echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS}
|
||||
eval cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $(grep -c processor /proc/cpuinfo) -- ${CMAKE_NATIVE_BUILD_ARGS}
|
||||
TOTAL_MEMORY=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}')
|
||||
TOTAL_CORE_COUNT=$(grep -c processor /proc/cpuinfo)
|
||||
echo "Total Memory : $TOTAL_MEMORY kB"
|
||||
echo "Total Cores : $TOTAL_CORE_COUNT"
|
||||
|
||||
# For machines that has a core to memory ratio that could cause running out of resources,
|
||||
# we will check for an environment variable LY_MIN_MEMORY_PER_CORE to restrict the number
|
||||
# of cores that we will allow. If set, it will use this as the minimum anticipated memory
|
||||
# that all cores will need in order to no fall below that number.
|
||||
#
|
||||
# This is based on the value the total memory (in kB) divided by the LY_MIN_MEMORY_PER_CORE
|
||||
# (in kB, e.g. 2 GB = 2097152 kB)
|
||||
|
||||
if [[ "${LY_MIN_MEMORY_PER_CORE:-0}" -gt 0 ]]; then
|
||||
MIN_MEMORY_PER_CORE=${LY_MIN_MEMORY_PER_CORE}
|
||||
CALCULATED_MAX_CORE_USAGE=$(expr $TOTAL_MEMORY / $MIN_MEMORY_PER_CORE - 1)
|
||||
CORE_COUNT=$((CALCULATED_MAX_CORE_USAGE > TOTAL_CORE_COUNT ? TOTAL_CORE_COUNT : CALCULATED_MAX_CORE_USAGE))
|
||||
echo "Max Usable Cores : $CORE_COUNT"
|
||||
else
|
||||
CORE_COUNT=$TOTAL_CORE_COUNT
|
||||
fi
|
||||
|
||||
|
||||
eval echo [ci_build] cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $CORE_COUNT -- ${CMAKE_NATIVE_BUILD_ARGS}
|
||||
eval cmake --build . --target ${CMAKE_TARGET} --config ${CONFIGURATION} -j $CORE_COUNT -- ${CMAKE_NATIVE_BUILD_ARGS}
|
||||
|
||||
popd
|
||||
|
||||
Reference in New Issue
Block a user