blob: ec3bb7c39997335e497bab5100d4cfabfa394b08 [file] [log] [blame]
gfanc351bd02018-06-11 11:25:36 -07001# Configurations:
2# temp file name to hold build result
3BUILD_RESULT_FILE=build_result.txt
4
5# Repo root directory
6REPO_ROOT_DIR=.
7
8
9declare projects=(
10 samples
gfanabb29852019-08-20 15:22:50 -070011 apps/OboeTester
gfanc351bd02018-06-11 11:25:36 -070012)
13
14for d in "${projects[@]}"; do
15 pushd ${REPO_ROOT_DIR}/${d} >/dev/null
Don Turnercf400c92019-03-22 17:31:28 +000016 TERM=dumb ./gradlew -q clean bundleDebug
gfanc351bd02018-06-11 11:25:36 -070017 popd >/dev/null
18done
19
20
Don Turner0f980fd2019-03-19 15:22:17 +000021# Check the apks that all get built fine (RhythmGame uses split APKs so we have to specify each one)
gfan88289e22019-07-23 14:28:09 -070022declare bundles=(
Paul McLean4615e0e2020-01-21 16:22:21 -070023 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
gfanc351bd02018-06-11 11:25:36 -070029)
30
31rm -fr ${BUILD_RESULT_FILE}
Don Turnercf400c92019-03-22 17:31:28 +000032for bundle in "${bundles[@]}"; do
33 if [ ! -f ${REPO_ROOT_DIR}/${bundle} ]; then
gfanc351bd02018-06-11 11:25:36 -070034 export SAMPLE_CI_RESULT=1
Don Turnercf400c92019-03-22 17:31:28 +000035 echo ${bundle} does not build >> ${BUILD_RESULT_FILE}
gfanc351bd02018-06-11 11:25:36 -070036 fi
37done
38
39if [ -f ${BUILD_RESULT_FILE} ]; then
40 echo "******* Failed Builds ********:"
41 cat ${BUILD_RESULT_FILE}
42else
43 echo "======= BUILD SUCCESS ======="
44fi
45
46rm -fr ${BUILD_RESULT_FILE}