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=( |
Don Turner | cf400c9 | 2019-03-22 17:31:28 +0000 | [diff] [blame] | 23 | samples/hello-oboe/build/outputs/bundle/debug/hello-oboe.aab |
| 24 | samples/MegaDrone/build/outputs/bundle/debug/MegaDrone.aab |
| 25 | samples/RhythmGame/build/outputs/bundle/ndkExtractorDebug/RhythmGame.aab |
| 26 | samples/LiveEffect/build/outputs/bundle/debug/LiveEffect.aab |
gfan | abb2985 | 2019-08-20 15:22:50 -0700 | [diff] [blame^] | 27 | apps/OboeTester/app/build/outputs/bundle/debug/app.aab |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 28 | ) |
| 29 | |
| 30 | rm -fr ${BUILD_RESULT_FILE} |
Don Turner | cf400c9 | 2019-03-22 17:31:28 +0000 | [diff] [blame] | 31 | for bundle in "${bundles[@]}"; do |
| 32 | if [ ! -f ${REPO_ROOT_DIR}/${bundle} ]; then |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 33 | export SAMPLE_CI_RESULT=1 |
Don Turner | cf400c9 | 2019-03-22 17:31:28 +0000 | [diff] [blame] | 34 | echo ${bundle} does not build >> ${BUILD_RESULT_FILE} |
gfan | c351bd0 | 2018-06-11 11:25:36 -0700 | [diff] [blame] | 35 | fi |
| 36 | done |
| 37 | |
| 38 | if [ -f ${BUILD_RESULT_FILE} ]; then |
| 39 | echo "******* Failed Builds ********:" |
| 40 | cat ${BUILD_RESULT_FILE} |
| 41 | else |
| 42 | echo "======= BUILD SUCCESS =======" |
| 43 | fi |
| 44 | |
| 45 | rm -fr ${BUILD_RESULT_FILE} |