gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 1 | # Configurations: |
| 2 | # temp file name to hold build result |
| 3 | BUILD_RESULT_FILE=build_result.txt |
| 4 | |
| 5 | # Repo root directory |
| 6 | REPO_ROOT_DIR=. |
| 7 | |
| 8 | |
| 9 | declare projects=( |
| 10 | samples |
gfan | abb2985 | 2019-08-20 15:22:50 -0700 | [diff] [blame] | 11 | apps/OboeTester |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 12 | ) |
| 13 | |
| 14 | for d in "${projects[@]}"; do |
| 15 | pushd ${REPO_ROOT_DIR}/${d} >/dev/null |
Don Turner | cf400c9 | 2019-03-22 17:31:28 +0000 | [diff] [blame] | 16 | TERM=dumb ./gradlew -q clean bundleDebug |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 17 | popd >/dev/null |
| 18 | done |
| 19 | |
| 20 | |
Don Turner | 0f980fd | 2019-03-19 15:22:17 +0000 | [diff] [blame] | 21 | # Check the apks that all get built fine (RhythmGame uses split APKs so we have to specify each one) |
gfan | 88289e2 | 2019-07-23 14:28:09 -0700 | [diff] [blame] | 22 | declare bundles=( |
Paul McLean | 4615e0e | 2020-01-21 16:22:21 -0700 | [diff] [blame] | 23 | samples/hello-oboe/build/outputs/bundle/debug/hello-oboe-debug.aab |
| 24 | samples/MegaDrone/build/outputs/bundle/debug/MegaDrone-debug.aab |
| 25 | samples/RhythmGame/build/outputs/bundle/ndkExtractorDebug/RhythmGame-ndkExtractor-debug.aab |
| 26 | samples/LiveEffect/build/outputs/bundle/debug/LiveEffect-debug.aab |
| 27 | apps/OboeTester/app/build/outputs/bundle/debug/app-debug.aab |
| 28 | samples/drumthumper/build/outputs/bundle/debug/drumthumper-debug.aab |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 29 | ) |
| 30 | |
| 31 | rm -fr ${BUILD_RESULT_FILE} |
Don Turner | cf400c9 | 2019-03-22 17:31:28 +0000 | [diff] [blame] | 32 | for bundle in "${bundles[@]}"; do |
| 33 | if [ ! -f ${REPO_ROOT_DIR}/${bundle} ]; then |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 34 | export SAMPLE_CI_RESULT=1 |
Don Turner | cf400c9 | 2019-03-22 17:31:28 +0000 | [diff] [blame] | 35 | echo ${bundle} does not build >> ${BUILD_RESULT_FILE} |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 36 | fi |
| 37 | done |
| 38 | |
| 39 | if [ -f ${BUILD_RESULT_FILE} ]; then |
| 40 | echo "******* Failed Builds ********:" |
| 41 | cat ${BUILD_RESULT_FILE} |
| 42 | else |
| 43 | echo "======= BUILD SUCCESS =======" |
| 44 | fi |
| 45 | |
| 46 | rm -fr ${BUILD_RESULT_FILE} |