From ff8adf56bc5553f8e4747c2e461f3d6da057d3dd Mon Sep 17 00:00:00 2001 From: radius Date: Wed, 21 Oct 2015 16:57:27 -0500 Subject: [PATCH] add ios recipe for retroarch --- libretro-buildbot-recipe.sh | 141 +++++++++++++++++++++++++++++++ recipes/apple/retroarch-ios.conf | 3 + recipes/apple/retroarch-ios.ra | 5 ++ 3 files changed, 149 insertions(+) create mode 100644 recipes/apple/retroarch-ios.conf create mode 100644 recipes/apple/retroarch-ios.ra diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index a65b3a50..ccc54379 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -2103,5 +2103,146 @@ if [ "${PLATFORM}" == "osx" ] && [ "${RA}" == "YES" ]; then fi +if [ "${PLATFORM}" == "ios" ] && [ "${RA}" == "YES" ]; then + while read line; do + NAME=`echo $line | cut -f 1 -d " "` + DIR=`echo $line | cut -f 2 -d " "` + URL=`echo $line | cut -f 3 -d " "` + TYPE=`echo $line | cut -f 4 -d " "` + ENABLED=`echo $line | cut -f 5 -d " "` + PARENTDIR=`echo $line | cut -f 6 -d " "` + + if [ "${ENABLED}" == "YES" ]; then + echo "BUILDBOT JOB: $jobid Processing $NAME" + echo + echo NAME: $NAME + echo DIR: $DIR + echo PARENT: $PARENTDIR + echo URL: $URL + echo REPO TYPE: $TYPE + echo ENABLED: $ENABLED + + ARGS="" + + TEMP=`echo $line | cut -f 9 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 10 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 11 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 12 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 13 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + TEMP="" + TEMP=`echo $line | cut -f 14 -d " "` + if [ -n ${TEMP} ]; then + ARGS="${ARGS} ${TEMP}" + fi + + ARGS="${ARGS%"${ARGS##*[![:space:]]}"}" + + echo ARGS: $ARGS + + if [ -d "${PARENTDIR}/${DIR}/.git" ]; then + cd $PARENTDIR + cd $DIR + echo "pulling from repo... " + + OUT=`git pull` + + echo $OUT + if [ "${TYPE}" == "PROJECT" ]; then + RADIR=$DIR + if [[ $OUT == *"Already up-to-date"* ]]; then + BUILD="NO" + else + BUILD="YES" + fi + fi + echo $OUT $BUILD $FORCE $FORCE_RETROARCH_BUILD + + cd $WORK + else + echo "cloning repo..." + cd $PARENTDIR + git clone "$URL" "$DIR" --depth=1 + cd $DIR + + if [ "${TYPE}" == "PROJECT" ]; then + BUILD="YES" + RADIR=$DIR + + fi + cd $WORK + fi + fi + + echo + echo + done < $1.ra + + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then + touch $TMPDIR/built-frontend + cd $RADIR + echo "BUILDBOT JOB: $jobid Building" + echo + + cd pkg/apple + xcodebuild clean build CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -project RetroArch_iOS.xcodeproj -configuration Release -scheme RetroArch &> $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log + + if [ $? -eq 0 ]; then + MESSAGE="retroarch build succeeded [$jobid]" + echo $MESSAGE + else + ERROR=`cat $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log | tail -n 100` + HASTE=`curl -XPOST http://hastebin.com/documents -d"$ERROR"` + HASTE=`echo $HASTE | cut -d"\"" -f4` + MESSAGE="retroarch build failed [$jobid] LOG: http://hastebin.com/$HASTE" + echo $MESSAGE + fi + + buildbot_log "$MESSAGE" + echo BUILDBOT JOB: $MESSAGE | tee -a $TMPDIR/log/${BOT}/${LOGDATE}.log + + cd pkg/apple + xcodebuild -project RetroArch.xcodeproj -target "RetroArch Cg" -configuration Release &> $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_CG_${PLATFORM}.log + + if [ $? -eq 0 ]; then + MESSAGE="retroarch build succeeded [$jobid]" + echo $MESSAGE + else + ERROR=`cat $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_CG_${PLATFORM}.log | tail -n 100` + HASTE=`curl -XPOST http://hastebin.com/documents -d"$ERROR"` + HASTE=`echo $HASTE | cut -d"\"" -f4` + MESSAGE="retroarch build failed [$jobid] LOG: http://hastebin.com/$HASTE" + echo $MESSAGE + fi + + buildbot_log "$MESSAGE" + echo BUILDBOT JOB: $MESSAGE | tee -a $TMPDIR/log/${BOT}/${LOGDATE}.log + cd $WORK/$RADIR + + + echo "Packaging" + echo ============================================ + + fi +fi + PATH=$ORIGPATH diff --git a/recipes/apple/retroarch-ios.conf b/recipes/apple/retroarch-ios.conf new file mode 100644 index 00000000..c08ba181 --- /dev/null +++ b/recipes/apple/retroarch-ios.conf @@ -0,0 +1,3 @@ +platform ios +PLATFORM ios +RA YES diff --git a/recipes/apple/retroarch-ios.ra b/recipes/apple/retroarch-ios.ra new file mode 100644 index 00000000..18c7a90e --- /dev/null +++ b/recipes/apple/retroarch-ios.ra @@ -0,0 +1,5 @@ +retroarch retroarch https://github.com/libretro/Retroarch.git PROJECT YES . +overlays overlays https://github.com/libretro/common-overlays.git ASSETS YES retroarch/media +autoconfig autoconfig https://github.com/libretro/retroarch-joypad-autoconfig.git ASSETS YES retroarch/media +assets assets https://github.com/libretro/retroarch-assets.git ASSETS YES retroarch/media +libretrodb libretrodb https://github.com/libretro/libretro-database.git ASSETS YES retroarch/media