build_vulkan_validation_linux.sh 1023 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #!/bin/bash
  2. # Copyright (c) Contributors to the Open 3D Engine Project.
  3. # For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. #
  5. # SPDX-License-Identifier: Apache-2.0 OR MIT
  6. TEMP_FOLDER=/data/workspace
  7. SRC_DIR=$TEMP_FOLDER/src
  8. BUILD_DIR=$TEMP_FOLDER/build
  9. TMP_RELEASE_DIR=$BUILD_DIR/install/lib/release
  10. python3 $SRC_DIR/scripts/update_deps.py --dir $TEMP_FOLDER/external --arch x64 --config release
  11. if [ $? -ne 0 ]
  12. then
  13. echo "Error configuring build environment"
  14. exit 1
  15. fi
  16. cmake -G "Ninja Multi-Config" -C $TEMP_FOLDER/external/helper.cmake -S $SRC_DIR -B $BUILD_DIR
  17. if [ $? -ne 0 ]
  18. then
  19. echo "Error generating cmake project"
  20. exit 1
  21. fi
  22. cmake --build $BUILD_DIR --config Release --target clean
  23. if [ $? -ne 0 ]
  24. then
  25. echo "Error cleaning project"
  26. exit 1
  27. fi
  28. cmake --build $BUILD_DIR --config Release
  29. if [ $? -ne 0 ]
  30. then
  31. echo "Error building project"
  32. exit 1
  33. fi
  34. mkdir -p $TMP_RELEASE_DIR
  35. mv $BUILD_DIR/layers/Release/* $TMP_RELEASE_DIR
  36. exit 0