blob: 84f2c4fedec22ad026dc7951b2523025427e817e [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=(
Don Turnercf400c92019-03-22 17:31:28 +000023 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
gfanabb29852019-08-20 15:22:50 -070027 apps/OboeTester/app/build/outputs/bundle/debug/app.aab
gfanc351bd02018-06-11 11:25:36 -070028)
29
30rm -fr ${BUILD_RESULT_FILE}
Don Turnercf400c92019-03-22 17:31:28 +000031for bundle in "${bundles[@]}"; do
32 if [ ! -f ${REPO_ROOT_DIR}/${bundle} ]; then
gfanc351bd02018-06-11 11:25:36 -070033 export SAMPLE_CI_RESULT=1
Don Turnercf400c92019-03-22 17:31:28 +000034 echo ${bundle} does not build >> ${BUILD_RESULT_FILE}
gfanc351bd02018-06-11 11:25:36 -070035 fi
36done
37
38if [ -f ${BUILD_RESULT_FILE} ]; then
39 echo "******* Failed Builds ********:"
40 cat ${BUILD_RESULT_FILE}
41else
42 echo "======= BUILD SUCCESS ======="
43fi
44
45rm -fr ${BUILD_RESULT_FILE}