2015-02-17 03:19:30 +00:00
# vim: set ts=3 sw=3 noet ft=sh : bash
2014-11-06 00:25:06 +00:00
2016-01-19 04:09:29 +00:00
# ----- setups -----
2014-11-08 20:28:26 +00:00
2015-07-26 01:25:59 +00:00
LOGDATE = ` date +%Y-%m-%d`
2014-11-08 20:28:26 +00:00
ORIGPATH = $PATH
2014-12-17 23:59:08 +00:00
WORK = $PWD
2014-11-08 20:28:26 +00:00
2016-01-14 23:16:40 +00:00
# ----- read variables from recipe config -----
2014-11-08 20:28:26 +00:00
while read line; do
2015-03-10 19:25:22 +00:00
KEY = ` echo $line | cut -f 1 -d " " `
VALUE = ` echo $line | cut -f 2 -d " " `
2015-02-17 03:19:30 +00:00
2015-03-09 12:28:13 +00:00
if [ " ${ KEY } " = "PATH" ] ; then
2015-02-17 03:19:30 +00:00
export PATH = ${ VALUE } :${ ORIGPATH }
else
export ${ KEY } = ${ VALUE }
fi
2015-03-09 12:23:17 +00:00
done < $1 .conf
2014-11-08 20:28:26 +00:00
2015-10-23 05:55:25 +00:00
read_link( )
{
TARGET_FILE = " $1 "
cd $( dirname " $TARGET_FILE " )
TARGET_FILE = $( basename " $TARGET_FILE " )
while [ -L " $TARGET_FILE " ] ; do
TARGET_FILE = $( readlink " $TARGET_FILE " )
cd $( dirname " $TARGET_FILE " )
TARGET_FILE = $( basename " $TARGET_FILE " )
done
PHYS_DIR = $( pwd -P)
RESULT = " $PHYS_DIR / $TARGET_FILE "
echo $RESULT
}
2015-10-21 22:51:31 +00:00
2016-01-14 23:16:40 +00:00
if [ " ${ CORE_JOB } " = = "YES" ] ; then
2016-01-18 17:59:40 +00:00
# ----- set target -----
2015-10-21 22:51:31 +00:00
[ [ " ${ ARM_NEON } " ] ] && echo 'ARM NEON opts enabled...' && export FORMAT_COMPILER_TARGET = " ${ FORMAT_COMPILER_TARGET } -neon "
[ [ " ${ CORTEX_A8 } " ] ] && echo 'Cortex A8 opts enabled...' && export FORMAT_COMPILER_TARGET = " ${ FORMAT_COMPILER_TARGET } -cortexa8 "
[ [ " ${ CORTEX_A9 } " ] ] && echo 'Cortex A9 opts enabled...' && export FORMAT_COMPILER_TARGET = " ${ FORMAT_COMPILER_TARGET } -cortexa9 "
[ [ " ${ ARM_HARDFLOAT } " ] ] && echo 'ARM hardfloat ABI enabled...' && export FORMAT_COMPILER_TARGET = " ${ FORMAT_COMPILER_TARGET } -hardfloat "
[ [ " ${ ARM_SOFTFLOAT } " ] ] && echo 'ARM softfloat ABI enabled...' && export FORMAT_COMPILER_TARGET = " ${ FORMAT_COMPILER_TARGET } -softfloat "
[ [ " ${ IOS } " ] ] && echo 'iOS detected...'
2015-10-21 22:59:19 +00:00
. $WORK /libretro-config.sh
2016-01-14 23:16:40 +00:00
# ----- create dirs -----
2015-10-23 06:36:13 +00:00
SCRIPT = $( read_link " $0 " )
echo " SCRIPT: $SCRIPT "
BASE_DIR = $( dirname " $SCRIPT " )
if [ -z " $RARCH_DIST_DIR " ] ; then
RARCH_DIR = " $BASE_DIR /dist "
RARCH_DIST_DIR = " $RARCH_DIR / $DIST_DIR "
fi
2015-10-21 22:51:31 +00:00
mkdir -v -p " $RARCH_DIST_DIR "
if [ " ${ PLATFORM } " = "android" ] ; then
IFS = ' ' read -ra ABIS <<< " $TARGET_ABIS "
for a in " ${ ABIS [@] } " ; do
echo $a
if [ -d $RARCH_DIST_DIR /${ a } ] ; then
echo " Directory $RARCH_DIST_DIR / ${ a } already exists, skipping creation... "
else
mkdir $RARCH_DIST_DIR /${ a }
fi
done
fi
2016-01-18 17:59:40 +00:00
# ----- set compilers -----
2015-10-21 22:51:31 +00:00
if [ " $HOST_CC " ] ; then
CC = " ${ HOST_CC } -gcc "
CXX = " ${ HOST_CC } -g++ "
CXX11 = " ${ HOST_CC } -g++ "
STRIP = " ${ HOST_CC } -strip "
fi
if [ -z " $MAKE " ] ; then
if uname -s | grep -i MINGW32 > /dev/null 2>& 1; then
MAKE = mingw32-make
else
if type gmake > /dev/null 2>& 1; then
MAKE = gmake
else
MAKE = make
fi
fi
fi
if [ -z " $CC " ] ; then
if [ $FORMAT_COMPILER_TARGET = "osx" ] ; then
CC = cc
elif uname -s | grep -i MINGW32 > /dev/null 2>& 1; then
CC = mingw32-gcc
else
CC = gcc
fi
fi
if [ -z " $CXX " ] ; then
if [ $FORMAT_COMPILER_TARGET = "osx" ] ; then
CXX = c++
CXX11 = "clang++ -std=c++11 -stdlib=libc++"
elif uname -s | grep -i MINGW32 > /dev/null 2>& 1; then
CXX = mingw32-g++
CXX11 = mingw32-g++
else
CXX = g++
CXX11 = g++
fi
fi
if [ " ${ CC } " ] && [ " ${ CXX } " ] ; then
2015-10-31 18:31:18 +00:00
COMPILER = "CC=" \" " ${ CC } " \" " CXX=" \" " ${ CXX } " \" ""
2015-10-21 22:51:31 +00:00
else
COMPILER = ""
fi
RESET_FORMAT_COMPILER_TARGET = $FORMAT_COMPILER_TARGET
RESET_FORMAT_COMPILER_TARGET_ALT = $FORMAT_COMPILER_TARGET_ALT
check_opengl( ) {
if [ " ${ BUILD_LIBRETRO_GL } " ] ; then
if [ " ${ ENABLE_GLES } " ] ; then
export FORMAT_COMPILER_TARGET = " ${ FORMAT_COMPILER_TARGET } -gles "
export FORMAT_COMPILER_TARGET_ALT = " ${ FORMAT_COMPILER_TARGET } "
else
export FORMAT_COMPILER_TARGET = " ${ FORMAT_COMPILER_TARGET } -opengl "
export FORMAT_COMPILER_TARGET_ALT = " ${ FORMAT_COMPILER_TARGET } "
fi
fi
}
reset_compiler_targets( ) {
export FORMAT_COMPILER_TARGET = $RESET_FORMAT_COMPILER_TARGET
export FORMAT_COMPILER_TARGET_ALT = $RESET_FORMAT_COMPILER_TARGET_ALT
}
2015-10-23 06:36:13 +00:00
else
2016-01-14 23:16:40 +00:00
SCRIPT = $( read_link " $0 " )
2015-10-23 06:36:13 +00:00
echo " SCRIPT: $SCRIPT "
BASE_DIR = $( dirname " $SCRIPT " )
if [ -z " $RARCH_DIST_DIR " ] ; then
RARCH_DIR = " $BASE_DIR /dist "
RARCH_DIST_DIR = " $RARCH_DIR / $PLATFORM "
fi
2015-10-21 22:51:31 +00:00
fi
2016-01-18 17:59:40 +00:00
# ----- set jobs -----
2015-08-29 03:24:40 +00:00
if [ -z " $JOBS " ] ; then
2016-02-08 17:15:25 +00:00
JOBS = 6
2015-08-29 03:24:40 +00:00
fi
2015-09-10 23:14:34 +00:00
2016-01-18 17:59:40 +00:00
# ----- set forceful rebuild on/off -----
2015-09-10 05:39:29 +00:00
if [ -z " $FORCE " ] ; then
2015-09-13 16:52:57 +00:00
FORCE = NO
2015-09-10 05:39:29 +00:00
fi
2016-01-14 23:16:40 +00:00
if [ -z " $FORCE_RETROARCH_BUILD " ] ; then
FORCE_RETROARCH_BUILD = NO
fi
2015-09-10 23:14:34 +00:00
2016-01-22 17:05:34 +00:00
# ----- set release on/off -----
if [ -z " $RELEASE " ] ; then
RELEASE = NO
fi
2016-01-18 17:59:40 +00:00
# ----- set cleanup rules -----
2015-11-01 18:21:25 +00:00
CLEANUP = NO
2015-10-31 20:13:01 +00:00
DAY = ` date '+%d' `
2015-11-01 21:24:27 +00:00
HOUR = ` date '+%H' `
if [ $DAY = = 01 -a $HOUR = = 06 ] ; then
2015-10-31 20:11:26 +00:00
FORCE = YES
2015-11-01 18:21:25 +00:00
CLEANUP = NO
2015-10-31 20:11:26 +00:00
fi
2016-01-18 17:59:40 +00:00
# ----- use to keep track of built cores -----
2015-09-13 17:02:40 +00:00
CORES_BUILT = NO
2015-09-10 23:14:34 +00:00
2016-01-14 23:16:40 +00:00
FORCE_ORIG = $FORCE
JOBS_ORIG = $JOBS
2015-08-29 03:24:40 +00:00
2014-11-06 03:40:39 +00:00
cd " ${ BASE_DIR } "
2015-02-01 19:48:09 +00:00
buildbot_log( ) {
2016-01-14 23:32:14 +00:00
echo buildbot message: $MESSAGE
2015-10-18 19:30:45 +00:00
MESSAGE = ` echo -e $1 `
2015-03-06 00:50:45 +00:00
2015-10-13 23:52:34 +00:00
HASH = ` echo -n " $MESSAGE " | openssl sha1 -hmac $SIG | cut -f 2 -d " " `
2015-08-16 06:10:25 +00:00
curl --max-time 30 --data " message= $MESSAGE &sign= $HASH " $LOGURL
2015-02-01 19:48:09 +00:00
}
2014-11-06 00:25:06 +00:00
build_libretro_generic_makefile( ) {
2015-02-17 03:19:30 +00:00
NAME = $1
DIR = $2
SUBDIR = $3
MAKEFILE = $4
PLATFORM = $5
ARGS = $6
2015-08-03 03:36:17 +00:00
JOBS = $JOBS
2015-10-17 01:33:06 +00:00
buildbot_log " $1 build starting [ $jobid ] "
2015-10-13 21:30:56 +00:00
2015-02-17 03:19:30 +00:00
cd $DIR
cd $SUBDIR
2016-01-14 23:16:40 +00:00
JOBS_ORIG = $JOBS
2015-10-16 05:34:24 +00:00
2015-11-03 15:08:00 +00:00
if [ " ${ NAME } " = = "mame2003" ] ; then
2015-02-17 03:19:30 +00:00
JOBS = 1
fi
2015-10-06 05:29:39 +00:00
if [ " ${ NAME } " = = "mame2010" ] ; then
JOBS = 1
fi
2015-02-17 03:19:30 +00:00
2015-03-09 12:23:17 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
2015-10-06 05:29:39 +00:00
echo " cleanup command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } -j ${ JOBS } clean "
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } clean
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-02-17 03:19:30 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-02-17 03:19:30 +00:00
fi
fi
echo "compiling..."
2016-02-09 02:22:13 +00:00
echo --------------------------------------------------
2015-10-18 19:30:45 +00:00
if [ " ${ NAME } " = = "mame2010" ] ; then
echo " build command: ${ MAKE } -f ${ MAKEFILE } " VRENDER = soft" " NATIVE = 1" buildtools -j ${ JOBS } "
PLATFORM = "" platform = "" ${ MAKE } -f ${ MAKEFILE } "VRENDER=soft" "NATIVE=1" buildtools -j${ JOBS } | tee $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2016-01-14 23:16:40 +00:00
JOBS = $JOBS_ORIG
2015-10-18 19:30:45 +00:00
fi
2015-10-16 05:24:41 +00:00
if [ -z " ${ ARGS } " ] ; then
2015-10-18 19:30:45 +00:00
echo " build command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } -j ${ JOBS } "
2015-10-16 05:33:52 +00:00
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-02-17 03:19:30 +00:00
else
2015-10-18 19:30:45 +00:00
echo " build command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } -j ${ JOBS } ${ ARGS } "
2015-10-16 05:28:56 +00:00
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } ${ ARGS } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-02-17 03:19:30 +00:00
fi
2015-10-16 05:24:41 +00:00
2015-10-16 05:20:40 +00:00
if [ " ${ MAKEPORTABLE } " = = "YES" ] ; then
2015-10-18 19:30:45 +00:00
echo " $1 running retrolink [ $jobid ] "
$WORK /retrolink.sh ${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT }
fi
2015-10-16 05:20:40 +00:00
2016-02-09 02:22:13 +00:00
cp -v ${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT } $RARCH_DIST_DIR /${ DIST } /${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-11-25 04:40:17 +00:00
cp -v ${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT } $RARCH_DIST_DIR /${ DIST } /${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT }
2015-10-18 19:30:45 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " $1 build succeeded [ $jobid ] "
2015-08-04 21:08:15 +00:00
if [ " ${ PLATFORM } " = = "windows" -o " ${ PLATFORM } " = = "unix" ] ; then
2015-10-06 05:32:57 +00:00
strip -s ${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT }
2015-07-21 05:31:15 +00:00
fi
2015-02-17 03:19:30 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-07-03 14:40:27 +00:00
MESSAGE = " $1 build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-02-17 03:19:30 +00:00
fi
2015-10-13 21:34:31 +00:00
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2016-01-14 23:16:40 +00:00
JOBS = $JOBS_ORIG
2015-10-18 19:22:02 +00:00
2015-10-17 01:21:16 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
echo " cleanup command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } -j ${ JOBS } clean "
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } clean
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-10-17 01:21:16 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-10-17 01:21:16 +00:00
fi
fi
2014-11-06 00:25:06 +00:00
}
2015-06-17 23:49:20 +00:00
build_libretro_leiradel_makefile( ) {
NAME = $1
DIR = $2
SUBDIR = $3
MAKEFILE = $4
PLATFORM = $5
ARGS = $6
2015-10-17 01:35:52 +00:00
buildbot_log " $1 build starting [ $jobid ] "
2015-06-17 23:49:20 +00:00
2015-09-13 16:52:57 +00:00
ARG1 = ` echo ${ ARGS } | cut -f 1 -d " " `
mkdir -p $RARCH_DIST_DIR /${ DIST } /${ ARG1 }
2015-08-13 22:11:51 +00:00
2015-06-17 23:49:20 +00:00
cd $DIR
cd $SUBDIR
2016-01-14 23:16:40 +00:00
JOBS_ORIG = $JOBS
2015-06-17 23:49:20 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
2015-08-16 19:48:14 +00:00
echo " cleanup command: ${ MAKE } -f ${ MAKEFILE } . ${ PLATFORM } _ ${ ARGS } platform= ${ PLATFORM } _ ${ ARGS } -j ${ JOBS } clean "
${ MAKE } -f ${ MAKEFILE } .${ PLATFORM } _${ ARGS } platform = ${ PLATFORM } _${ ARGS } -j${ JOBS } clean
2015-06-17 23:49:20 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-06-17 23:49:20 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-06-17 23:49:20 +00:00
fi
fi
echo "compiling..."
2016-01-14 23:35:16 +00:00
echo --------------------------------------------------
2015-08-16 19:48:14 +00:00
echo " build command: ${ MAKE } -f ${ MAKEFILE } . ${ PLATFORM } _ ${ ARGS } platform= ${ PLATFORM } _ ${ ARGS } -j ${ JOBS } "
2016-01-03 19:09:46 +00:00
${ MAKE } -f ${ MAKEFILE } .${ PLATFORM } _${ ARGS } platform = ${ PLATFORM } _${ ARGS } -j${ JOBS } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-06-17 23:49:20 +00:00
2015-10-18 19:30:45 +00:00
cp -v ${ NAME } _libretro.${ PLATFORM } _${ ARG1 } .${ FORMAT_EXT } $RARCH_DIST_DIR /${ DIST } /${ ARG1 } /${ NAME } _libretro${ LIBSUFFIX } .${ FORMAT_EXT }
2015-07-21 05:31:15 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " $1 build succeeded [ $jobid ] "
2015-07-21 05:31:15 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log | tail -n 100`
2015-10-18 19:30:45 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-09-13 16:52:57 +00:00
MESSAGE = " $1 build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-02-17 03:19:30 +00:00
fi
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2016-01-14 23:16:40 +00:00
JOBS = $JOBS_ORIG
2015-11-01 17:28:14 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
echo " cleanup command: ${ MAKE } -f ${ MAKEFILE } . ${ PLATFORM } _ ${ ARGS } platform= ${ PLATFORM } _ ${ ARGS } -j ${ JOBS } clean "
${ MAKE } -f ${ MAKEFILE } .${ PLATFORM } _${ ARGS } platform = ${ PLATFORM } _${ ARGS } -j${ JOBS } clean
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-11-01 17:28:14 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-11-01 17:28:14 +00:00
fi
fi
2014-12-23 23:11:56 +00:00
}
build_libretro_generic_jni( ) {
2015-02-17 03:19:30 +00:00
NAME = $1
DIR = $2
SUBDIR = $3
MAKEFILE = $4
PLATFORM = $5
ARGS = $6
2015-10-17 01:35:52 +00:00
buildbot_log " $1 build starting [ $jobid ] "
2015-02-17 03:19:30 +00:00
cd ${ DIR } /${ SUBDIR }
for a in " ${ ABIS [@] } " ; do
2015-03-09 12:23:17 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
2015-02-17 03:19:30 +00:00
echo "cleaning up..."
echo " cleanup command: ${ NDK } -j ${ JOBS } ${ ARGS } APP_ABI= ${ a } clean "
${ NDK } -j${ JOBS } ${ ARGS } APP_ABI = ${ a } clean
2015-10-06 05:32:57 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $a $1 cleanup success!
2015-02-17 03:19:30 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $a $1 cleanup failed!
2015-02-17 03:19:30 +00:00
fi
fi
2015-03-10 19:25:22 +00:00
echo " compiling for ${ a } ... "
2016-01-14 23:35:16 +00:00
echo --------------------------------------------------
2015-03-09 12:23:17 +00:00
if [ -z " ${ ARGS } " ] ; then
2015-02-17 03:19:30 +00:00
echo " build command: ${ NDK } -j ${ JOBS } APP_ABI= ${ a } "
2015-10-16 05:40:30 +00:00
${ NDK } -j${ JOBS } APP_ABI = ${ a } 2>& 1 | tee $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } _${ a } .log
2015-02-17 03:19:30 +00:00
else
echo " build command: ${ NDK } -j ${ JOBS } APP_ABI= ${ a } ${ ARGS } "
2015-10-16 05:40:30 +00:00
${ NDK } -j${ JOBS } APP_ABI = ${ a } ${ ARGS } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } _${ a } .log
2015-02-17 03:19:30 +00:00
fi
2015-10-16 05:40:30 +00:00
2015-10-18 19:30:45 +00:00
cp -v ../libs/${ a } /libretro.${ FORMAT_EXT } $RARCH_DIST_DIR /${ a } /${ 1 } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT }
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " $1 - $a build succeeded [ $jobid ] "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2015-02-17 03:19:30 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } _${ a } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-10-13 23:52:34 +00:00
MESSAGE = " $1 - $a build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2015-02-17 03:19:30 +00:00
fi
2016-02-10 01:06:20 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-18 19:22:02 +00:00
2015-10-17 22:36:05 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
echo " cleanup command: ${ NDK } -j ${ JOBS } ${ ARGS } APP_ABI= ${ a } clean "
${ NDK } -j${ JOBS } ${ ARGS } APP_ABI = ${ a } clean
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $a $1 cleanup success!
2015-10-17 22:36:05 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $a $1 cleanup failed!
2015-10-17 22:36:05 +00:00
fi
fi
2015-02-17 03:19:30 +00:00
done
2015-11-01 17:28:14 +00:00
for a in " ${ ABIS [@] } " ; do
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
echo " cleanup command: ${ NDK } -j ${ JOBS } ${ ARGS } APP_ABI= ${ a } clean "
${ NDK } -j${ JOBS } ${ ARGS } APP_ABI = ${ a } clean
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $a $1 cleanup success!
2015-11-01 17:28:14 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $a $1 cleanup failed!
2015-11-01 17:28:14 +00:00
fi
fi
2015-11-01 18:04:03 +00:00
done
2014-12-18 03:39:09 +00:00
}
2014-12-26 00:49:47 +00:00
build_libretro_bsnes_jni( ) {
2015-02-17 03:19:30 +00:00
NAME = $1
DIR = $2
SUBDIR = $3
MAKEFILE = $4
PLATFORM = $5
PROFILE = $6
2015-10-17 01:35:52 +00:00
buildbot_log " $1 build starting [ $jobid ] "
2015-02-17 03:19:30 +00:00
CORENAME = bsnes
cd ${ DIR } /${ SUBDIR }
for a in " ${ ABIS [@] } " ; do
2015-03-09 12:23:17 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
echo " cleanup command: ${ NDK } -j ${ JOBS } APP_ABI= ${ a } clean "
2015-02-17 03:19:30 +00:00
${ NDK } -j${ JOBS } APP_ABI = ${ a } clean
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-03-09 12:23:17 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-03-09 12:23:17 +00:00
fi
2015-02-17 03:19:30 +00:00
fi
2015-03-09 12:23:17 +00:00
echo " compiling for ${ a } ... "
2016-01-14 23:35:16 +00:00
echo --------------------------------------------------
2015-03-09 12:23:17 +00:00
if [ -z " ${ ARGS } " ] ; then
2015-02-17 03:19:30 +00:00
echo " build command: ${ NDK } -j ${ JOBS } APP_ABI= ${ a } "
${ NDK } -j${ JOBS } APP_ABI = ${ a }
else
echo " build command: ${ NDK } -j ${ JOBS } APP_ABI= ${ a } "
${ NDK } -j${ JOBS } APP_ABI = ${ a }
fi
2015-10-16 05:40:30 +00:00
2015-10-18 19:30:45 +00:00
cp -v ../libs/${ a } /libretro_${ CORENAME } _${ PROFILE } .${ FORMAT_EXT } $RARCH_DIST_DIR /${ a } /${ NAME } _${ PROFILE } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT }
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " $1 build succeeded [ $jobid ] "
2015-02-17 03:19:30 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-10-13 23:52:34 +00:00
MESSAGE = " $1 build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-02-17 03:19:30 +00:00
fi
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2015-02-17 03:19:30 +00:00
done
2015-11-01 17:28:14 +00:00
for a in " ${ ABIS [@] } " ; do
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
echo " cleanup command: ${ NDK } -j ${ JOBS } APP_ABI= ${ a } clean "
${ NDK } -j${ JOBS } APP_ABI = ${ a } clean
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-11-01 17:28:14 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-11-01 17:28:14 +00:00
fi
fi
2015-11-01 18:25:26 +00:00
done
2014-12-26 00:49:47 +00:00
}
2014-11-06 06:21:26 +00:00
build_libretro_generic_gl_makefile( ) {
2015-02-17 03:19:30 +00:00
NAME = $1
DIR = $2
SUBDIR = $3
MAKEFILE = $4
PLATFORM = $5
ARGS = $6
2015-10-17 01:35:52 +00:00
buildbot_log " $1 build starting [ $jobid ] "
2015-02-17 03:19:30 +00:00
check_opengl
cd $DIR
cd $SUBDIR
2015-03-09 12:23:17 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
2015-02-17 03:19:30 +00:00
echo " cleanup command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } -j ${ JOBS } clean "
2015-03-09 12:23:17 +00:00
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } clean
2015-10-06 05:32:57 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-02-17 03:19:30 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-02-17 03:19:30 +00:00
fi
fi
echo "compiling..."
2016-01-14 23:35:16 +00:00
echo --------------------------------------------------
2015-03-09 12:23:17 +00:00
if [ -z " ${ ARGS } " ] ; then
2015-02-17 03:19:30 +00:00
echo " build command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } -j ${ JOBS } "
2015-10-16 05:40:30 +00:00
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } 2>& 1 | tee $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-02-17 03:19:30 +00:00
else
echo " build command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } ${ COMPILER } -j ${ JOBS } ${ ARGS } "
2015-10-16 05:40:30 +00:00
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } ${ ARGS } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-02-17 03:19:30 +00:00
fi
2015-10-18 19:30:45 +00:00
cp -v ${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT } $RARCH_DIST_DIR /${ NAME } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT }
2015-10-06 05:32:57 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " $1 build succeeded [ $jobid ] "
2015-02-17 03:19:30 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-07-21 05:31:15 +00:00
MESSAGE = " $1 build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-02-17 03:19:30 +00:00
fi
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2015-02-17 03:19:30 +00:00
reset_compiler_targets
2015-11-01 17:28:14 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
echo " cleanup command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } -j ${ JOBS } clean "
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } -j${ JOBS } clean
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-11-01 17:28:14 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-11-01 17:28:14 +00:00
fi
fi
2014-11-08 20:02:21 +00:00
}
build_libretro_bsnes( ) {
2015-02-17 03:19:30 +00:00
NAME = $1
DIR = $2
PROFILE = $3
MAKEFILE = $4
PLATFORM = $5
BSNESCOMPILER = $6
2015-10-17 01:35:52 +00:00
buildbot_log " $1 build starting [ $jobid ] "
2015-02-17 03:19:30 +00:00
2015-11-04 04:31:42 +00:00
cd $DIR
2015-02-17 03:19:30 +00:00
2015-03-09 12:23:17 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
2015-02-17 03:19:30 +00:00
rm -f obj/*.{ o," ${ FORMAT_EXT } " }
2015-10-06 05:32:57 +00:00
rm -f out/*.{ o," ${ FORMAT_EXT } " }
2015-02-17 03:19:30 +00:00
2015-03-09 12:28:13 +00:00
if [ " ${ PROFILE } " = "cpp98" -o " ${ PROFILE } " = "bnes" ] ; then
2015-03-09 12:23:17 +00:00
${ MAKE } clean
fi
2015-02-17 03:19:30 +00:00
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-02-17 03:19:30 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-02-17 03:19:30 +00:00
fi
fi
2016-01-18 17:59:40 +00:00
2015-02-17 03:19:30 +00:00
echo "compiling..."
2016-01-14 23:35:16 +00:00
echo --------------------------------------------------
2015-02-17 03:19:30 +00:00
2015-03-09 12:28:13 +00:00
if [ " ${ PROFILE } " = "cpp98" ] ; then
2015-10-31 18:35:26 +00:00
${ MAKE } platform = " ${ PLATFORM } " " ${ COMPILER } " " -j ${ JOBS } " 2>& 1 | tee $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-03-09 12:28:13 +00:00
elif [ " ${ PROFILE } " = "bnes" ] ; then
2015-02-17 03:19:30 +00:00
echo " build command: ${ MAKE } -f Makefile ${ COMPILER } " -j${ JOBS } " compiler= ${ BSNESCOMPILER } " platform = ${ FORMAT_COMPILER_TARGET }
2015-10-16 05:40:30 +00:00
${ MAKE } -f Makefile ${ COMPILER } " -j ${ JOBS } " compiler = " ${ BSNESCOMPILER } " platform = ${ FORMAT_COMPILER_TARGET } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-02-17 03:19:30 +00:00
else
echo " build command: ${ MAKE } -f ${ MAKEFILE } platform= ${ PLATFORM } compiler= ${ BSNESCOMPILER } ui='target-libretro' profile= ${ PROFILE } -j ${ JOBS } "
2015-10-16 05:40:30 +00:00
${ MAKE } -f ${ MAKEFILE } platform = ${ PLATFORM } compiler = ${ BSNESCOMPILER } ui = 'target-libretro' profile = ${ PROFILE } -j${ JOBS } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log
2015-02-17 03:19:30 +00:00
fi
2015-10-18 19:30:45 +00:00
if [ " ${ PROFILE } " = "cpp98" ] ; then
cp -fv " out/ ${ NAME } _libretro ${ FORMAT } ${ LIBSUFFIX } . ${ FORMAT_EXT } " " ${ RARCH_DIST_DIR } / ${ NAME } _libretro ${ FORMAT } ${ LIBSUFFIX } . ${ FORMAT_EXT } "
elif [ " ${ PROFILE } " = "bnes" ] ; then
cp -fv " ${ NAME } _libretro ${ FORMAT } ${ LIBSUFFIX } . ${ FORMAT_EXT } " " ${ RARCH_DIST_DIR } / ${ NAME } _libretro ${ FORMAT } ${ LIBSUFFIX } . ${ FORMAT_EXT } "
else
cp -fv " out/ ${ NAME } _ ${ PROFILE } _libretro ${ FORMAT } . ${ FORMAT_EXT } " $RARCH_DIST_DIR /${ NAME } _${ PROFILE } _libretro${ FORMAT } ${ LIBSUFFIX } .${ FORMAT_EXT }
fi
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " $1 build succeeded [ $jobid ] "
2015-02-17 03:19:30 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _${ NAME } _${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-09-13 16:52:57 +00:00
MESSAGE = " $1 build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-02-17 03:19:30 +00:00
fi
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2015-11-01 17:28:14 +00:00
if [ -z " ${ NOCLEAN } " ] ; then
echo "cleaning up..."
rm -f obj/*.{ o," ${ FORMAT_EXT } " }
rm -f out/*.{ o," ${ FORMAT_EXT } " }
if [ " ${ PROFILE } " = "cpp98" -o " ${ PROFILE } " = "bnes" ] ; then
${ MAKE } clean
fi
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup success!
2015-11-01 17:28:14 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid $1 cleanup failed!
2015-11-01 17:28:14 +00:00
fi
fi
2014-11-06 06:21:26 +00:00
}
2016-01-14 23:16:40 +00:00
# ----- buildbot -----
2014-11-06 00:25:06 +00:00
2016-01-14 23:16:40 +00:00
echo buildbot starting
echo --------------------------------------------------
echo Variables:
echo CC $CC
echo CXX $CXX
echo STRIP $STRIP
echo DISTDIR $RARCH_DIST_DIR
2016-02-08 17:19:24 +00:00
echo JOBS $JOBS
2016-01-14 23:16:40 +00:00
echo
echo
2015-10-13 23:18:23 +00:00
2015-01-17 17:52:59 +00:00
export jobid = $1
2015-01-17 05:56:23 +00:00
2016-01-14 23:16:40 +00:00
# ----- fetch a project -----
2014-11-06 05:34:54 +00:00
echo
echo
2014-11-06 00:25:06 +00:00
while read line; do
2015-03-10 19:25:22 +00:00
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 " " `
COMMAND = ` echo $line | cut -f 6 -d " " `
MAKEFILE = ` echo $line | cut -f 7 -d " " `
SUBDIR = ` echo $line | cut -f 8 -d " " `
2015-02-17 03:19:30 +00:00
2015-03-09 12:28:13 +00:00
if [ " ${ ENABLED } " = "YES" ] ; then
2016-01-14 23:16:40 +00:00
echo " buildbot job: $jobid processing $NAME "
echo --------------------------------------------------
echo Variables:
echo URL $URL
echo REPO TYPE $TYPE
echo ENABLED $ENABLED
echo COMMAND $COMMAND
echo MAKEFILE $MAKEFILE
echo DIR $DIR
echo SUBDIR $SUBDIR
echo
echo
2015-02-17 03:19:30 +00:00
ARGS = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 9 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 10 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 11 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 12 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 13 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 14 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
2015-09-13 16:52:57 +00:00
TEMP = ""
TEMP = ` echo $line | cut -f 15 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 16 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 17 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 18 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 19 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 20 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 21 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 22 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 23 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 24 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 25 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 26 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 27 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 28 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 29 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
2015-02-17 03:19:30 +00:00
2015-03-09 12:23:17 +00:00
ARGS = " ${ ARGS % " ${ ARGS ##*[![ : space : ]] } " } "
2015-02-17 03:19:30 +00:00
2015-03-09 12:28:13 +00:00
if [ " ${ TYPE } " = "PROJECT" ] ; then
2015-03-09 12:23:17 +00:00
if [ -d " ${ DIR } /.git " ] ; then
2015-11-01 17:34:23 +00:00
if [ " ${ CLEANUP } " = = "YES" ] ; then
rm -rfv $DIR
echo "cloning repo..."
git clone --depth= 1 " $URL " " $DIR "
BUILD = "YES"
else
cd $DIR
2016-01-14 23:16:40 +00:00
echo "pulling changes from repo... "
2015-11-01 17:34:23 +00:00
OUT = ` git pull`
2015-02-17 03:19:30 +00:00
2015-11-01 17:34:23 +00:00
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
BUILD = "NO"
else
BUILD = "YES"
fi
2015-09-15 03:53:02 +00:00
2015-02-17 03:19:30 +00:00
fi
2016-01-14 23:16:40 +00:00
FORCE_ORIG = $FORCE
2015-07-21 05:31:15 +00:00
OLDBUILD = $BUILD
2015-03-18 03:46:52 +00:00
2015-03-09 12:28:13 +00:00
if [ " ${ PREVCORE } " = "bsnes" -a " ${ PREVBUILD } " = "YES" -a " ${ COMMAND } " = "BSNES" ] ; then
2015-02-17 03:19:30 +00:00
FORCE = "YES"
2015-03-29 19:34:25 +00:00
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "gw" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "gw" ] ; then
2015-06-17 23:49:20 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "fuse" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "fuse" ] ; then
2015-06-17 23:56:58 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "81" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "81" ] ; then
2015-08-05 05:08:56 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "snes9x-next" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "snes9x-next" ] ; then
2015-08-05 05:08:56 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "vba_next" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "vba_next" ] ; then
2015-08-05 05:08:56 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "emux_nes" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "emux_nes" ] ; then
2015-08-13 22:19:20 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "emux_sms" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "emux_sms" ] ; then
2015-08-05 05:08:56 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "mgba" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "mgba" ] ; then
2015-08-05 05:08:56 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-13 23:18:23 +00:00
if [ " ${ PREVCORE } " = "snes9x_next" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "snes9x_next" ] ; then
2015-08-17 01:25:22 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-03-29 19:44:31 +00:00
if [ " ${ PREVCORE } " = "bsnes_mercury" -a " ${ PREVBUILD } " = "YES" -a " ${ COMMAND } " = "BSNES" ] ; then
2015-03-29 19:34:25 +00:00
FORCE = "YES"
2015-02-17 03:19:30 +00:00
BUILD = "YES"
fi
2015-08-03 04:34:38 +00:00
if [ " ${ PREVCORE } " = "mame2014" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "mess2014" ] ; then
2015-02-17 03:19:30 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-08-03 04:34:38 +00:00
if [ " ${ PREVCORE } " = "mess2014" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "ume2014" ] ; then
2015-02-17 03:19:30 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-03-18 03:46:52 +00:00
if [ [ " ${ PREVCORE } " = = *fb* ] ] && [ [ " ${ PREVBUILD } " = "YES" ] ] && [ [ " ${ NAME } " = = *fb* ] ] ; then
2015-03-18 03:27:33 +00:00
FORCE = "YES"
BUILD = "YES"
fi
2015-10-06 05:29:39 +00:00
if [ " ${ PREVCORE } " = "mame2010" -a " ${ PREVBUILD } " = "YES" -a " ${ NAME } " = "mame2010" ] ; then
FORCE = "YES"
BUILD = "YES"
fi
2015-03-21 00:58:39 +00:00
cd $WORK
2015-02-17 03:19:30 +00:00
else
echo "cloning repo..."
git clone --depth= 1 " $URL " " $DIR "
BUILD = "YES"
fi
2015-03-09 12:28:13 +00:00
elif [ " ${ TYPE } " = "psp_hw_render" ] ; then
2015-03-09 12:23:17 +00:00
if [ -d " ${ DIR } /.git " ] ; then
2015-02-17 03:19:30 +00:00
cd $DIR
2016-01-14 23:16:40 +00:00
echo "pulling changes from repo... "
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-03-09 12:23:17 +00:00
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
2015-02-17 03:19:30 +00:00
BUILD = "NO"
else
BUILD = "YES"
fi
2015-03-21 00:58:39 +00:00
cd $WORK
2015-02-17 03:19:30 +00:00
else
2016-01-14 23:16:40 +00:00
echo "pulling changes from repo... "
2015-03-07 21:07:38 +00:00
git clone " $URL " " $DIR "
2015-02-17 03:19:30 +00:00
cd $DIR
git checkout $TYPE
2015-03-21 00:58:39 +00:00
cd $WORK
2015-02-17 03:19:30 +00:00
BUILD = "YES"
fi
2015-03-09 12:23:17 +00:00
elif [ " ${ TYPE } " = = "SUBMODULE" ] ; then
if [ -d " ${ DIR } /.git " ] ; then
2015-02-17 03:19:30 +00:00
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-03-09 12:23:17 +00:00
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
2015-02-17 03:19:30 +00:00
BUILD = "NO"
else
BUILD = "YES"
fi
OUT = ` git submodule foreach git pull origin master`
2015-03-21 00:58:39 +00:00
cd $WORK
2015-02-17 03:19:30 +00:00
else
echo "cloning repo..."
git clone --depth= 1 " $URL " " $DIR "
cd $DIR
git submodule update --init
BUILD = "YES"
fi
2015-03-21 00:58:39 +00:00
cd $WORK
2015-02-17 03:19:30 +00:00
fi
2015-03-09 12:28:13 +00:00
if [ " ${ BUILD } " = "YES" -o " ${ FORCE } " = "YES" ] ; then
2015-09-15 18:38:35 +00:00
touch $TMPDIR /built-cores
2015-09-13 17:02:40 +00:00
CORES_BUILT = YES
2016-01-14 23:16:40 +00:00
echo " buildbot job: building $NAME "
2015-03-09 12:28:13 +00:00
if [ " ${ COMMAND } " = "GENERIC" ] ; then
2015-02-17 03:19:30 +00:00
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${ FORMAT_COMPILER_TARGET } " ${ ARGS } "
2015-06-17 23:49:20 +00:00
elif [ " ${ COMMAND } " = "LEIRADEL" ] ; then
2015-08-13 21:11:32 +00:00
build_libretro_leiradel_makefile $NAME $DIR $SUBDIR $MAKEFILE ${ PLATFORM } " ${ ARGS } "
2015-03-09 12:28:13 +00:00
elif [ " ${ COMMAND } " = "GENERIC_GL" ] ; then
2015-02-17 03:19:30 +00:00
build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${ FORMAT_COMPILER_TARGET } " ${ ARGS } "
2015-03-09 12:28:13 +00:00
elif [ " ${ COMMAND } " = "GENERIC_ALT" ] ; then
2015-02-17 03:19:30 +00:00
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${ FORMAT_COMPILER_TARGET_ALT } " ${ ARGS } "
2015-03-09 12:28:13 +00:00
elif [ " ${ COMMAND } " = "GENERIC_JNI" ] ; then
2015-02-17 03:19:30 +00:00
build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${ FORMAT_COMPILER_TARGET_ALT } " ${ ARGS } "
2015-03-09 12:28:13 +00:00
elif [ " ${ COMMAND } " = "BSNES_JNI" ] ; then
2015-02-17 03:19:30 +00:00
build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${ FORMAT_COMPILER_TARGET_ALT } " ${ ARGS } "
2015-03-09 12:28:13 +00:00
elif [ " ${ COMMAND } " = "GENERIC_THEOS" ] ; then
2015-02-17 03:19:30 +00:00
build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${ FORMAT_COMPILER_TARGET_ALT } " ${ ARGS } "
2015-03-09 12:28:13 +00:00
elif [ " ${ COMMAND } " = "BSNES" ] ; then
2015-02-17 03:19:30 +00:00
build_libretro_bsnes $NAME $DIR " ${ ARGS } " $MAKEFILE ${ FORMAT_COMPILER_TARGET } ${ CXX11 }
2015-03-09 12:23:17 +00:00
fi
else
2016-01-14 23:16:40 +00:00
echo " buildbot job: building $NAME up-to-date "
2015-02-17 03:19:30 +00:00
fi
echo
fi
cd " ${ BASE_DIR } "
PREVCORE = $NAME
PREVBUILD = $BUILD
2015-03-18 03:46:52 +00:00
BUILD = $OLDBUILD
2016-01-14 23:16:40 +00:00
FORCE = $FORCE_ORIG
2015-03-09 12:23:17 +00:00
done < $1
2014-11-06 00:25:06 +00:00
2015-10-13 23:18:23 +00:00
2016-01-14 23:41:14 +00:00
echo " buildbot job: $jobid Building Retroarch- $PLATFORM "
echo --------------------------------------------------
2015-03-21 00:58:39 +00:00
echo
2014-12-17 23:59:08 +00:00
cd $WORK
BUILD = ""
2014-12-07 08:08:27 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ PLATFORM } " = = "osx" ] && [ " ${ RA } " = = "YES" ] ; then
2015-02-17 03:19:30 +00:00
while read line; do
2015-03-10 19:25:22 +00:00
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 " " `
2015-02-17 03:19:30 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ ENABLED } " = = "YES" ] ; then
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-02-17 03:19:30 +00:00
echo NAME: $NAME
echo DIR: $DIR
echo PARENT: $PARENTDIR
echo URL: $URL
echo REPO TYPE: $TYPE
echo ENABLED: $ENABLED
2016-01-14 23:41:14 +00:00
echo
echo
2015-02-17 03:19:30 +00:00
ARGS = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 9 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 10 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 11 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 12 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 13 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 14 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-17 03:19:30 +00:00
ARGS = " ${ ARGS } ${ TEMP } "
fi
ARGS = " ${ ARGS % " ${ ARGS ##*[![ : space : ]] } " } "
2015-03-09 12:23:17 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
2015-02-17 03:19:30 +00:00
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = = "PROJECT" ] ; then
2015-02-17 03:19:30 +00:00
RADIR = $DIR
2015-03-09 12:23:17 +00:00
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
2015-02-17 03:19:30 +00:00
BUILD = "NO"
else
BUILD = "YES"
fi
fi
2015-10-21 22:18:38 +00:00
cd $WORK
2015-02-17 03:19:30 +00:00
else
echo "cloning repo..."
cd $PARENTDIR
git clone " $URL " " $DIR " --depth= 1
cd $DIR
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = = "PROJECT" ] ; then
2015-02-17 03:19:30 +00:00
BUILD = "YES"
RADIR = $DIR
2015-10-21 22:18:38 +00:00
2015-02-17 03:19:30 +00:00
fi
cd $WORK
fi
fi
echo
echo
2015-10-21 22:18:38 +00:00
done < $1 .ra
2015-03-10 19:25:22 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ BUILD } " = = "YES" -o " ${ FORCE } " = = "YES" -o " ${ FORCE_RETROARCH_BUILD } " = = "YES" -o " ${ CORES_BUILT } " = = "YES" ] ; then
2015-09-15 18:38:35 +00:00
touch $TMPDIR /built-frontend
2015-03-09 12:23:17 +00:00
cd $RADIR
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-03-21 21:34:02 +00:00
echo
2015-03-09 12:23:17 +00:00
2015-10-21 22:18:38 +00:00
cd pkg/apple
2016-01-14 23:43:18 +00:00
2015-10-21 22:18:38 +00:00
xcodebuild -project RetroArch.xcodeproj -target RetroArch -configuration Release & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-07-03 14:40:27 +00:00
2015-10-21 22:18:38 +00:00
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
2015-03-21 21:34:02 +00:00
2015-10-21 22:18:38 +00:00
buildbot_log " $MESSAGE "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-03-09 12:23:17 +00:00
2015-10-21 22:18:38 +00:00
xcodebuild -project RetroArch.xcodeproj -target "RetroArch Cg" -configuration Release & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_CG_${ PLATFORM } .log
2015-10-21 16:02:46 +00:00
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " retroarch build succeeded [ $jobid ] "
2015-03-09 12:23:17 +00:00
echo $MESSAGE
2015-02-24 19:00:38 +00:00
else
2015-10-21 22:18:38 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_CG_${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-10-13 23:52:34 +00:00
MESSAGE = " retroarch build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-03-09 12:23:17 +00:00
echo $MESSAGE
2015-02-24 19:00:38 +00:00
fi
2015-10-21 22:18:38 +00:00
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-21 22:18:38 +00:00
cd $WORK /$RADIR
echo "Packaging"
2015-02-17 03:19:30 +00:00
fi
2014-12-17 18:32:42 +00:00
fi
2015-10-21 22:18:38 +00:00
if [ " ${ PLATFORM } " = = "ios" ] && [ " ${ RA } " = = "YES" ] ; then
2015-02-17 03:19:30 +00:00
while read line; do
2015-03-10 19:25:22 +00:00
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 " " `
2015-02-17 03:19:30 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ ENABLED } " = = "YES" ] ; then
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-09-13 16:37:15 +00:00
echo
2015-02-17 03:19:30 +00:00
echo NAME: $NAME
echo DIR: $DIR
echo PARENT: $PARENTDIR
echo URL: $URL
echo REPO TYPE: $TYPE
echo ENABLED: $ENABLED
2015-10-21 22:18:38 +00:00
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 } "
2015-07-21 05:31:15 +00:00
fi
2015-10-21 22:18:38 +00:00
TEMP = ""
TEMP = ` echo $line | cut -f 14 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
ARGS = " ${ ARGS % " ${ ARGS ##*[![ : space : ]] } " } "
2015-07-21 05:31:15 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-10-21 22:18:38 +00:00
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-07-21 05:31:15 +00:00
echo $OUT
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = = "PROJECT" ] ; then
2015-07-21 05:31:15 +00:00
RADIR = $DIR
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
BUILD = "NO"
else
BUILD = "YES"
fi
fi
2015-10-21 22:18:38 +00:00
2015-07-21 05:31:15 +00:00
cd $WORK
else
echo "cloning repo..."
cd $PARENTDIR
git clone " $URL " " $DIR " --depth= 1
cd $DIR
2015-02-17 03:19:30 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = = "PROJECT" ] ; then
2015-02-17 03:19:30 +00:00
BUILD = "YES"
2015-07-21 05:31:15 +00:00
RADIR = $DIR
2015-10-21 22:18:38 +00:00
2015-02-17 03:19:30 +00:00
fi
2015-07-21 05:31:15 +00:00
cd $WORK
2015-02-17 03:19:30 +00:00
fi
fi
2015-10-21 22:18:38 +00:00
echo
echo
done < $1 .ra
if [ " ${ BUILD } " = = "YES" -o " ${ FORCE } " = = "YES" -o " ${ FORCE_RETROARCH_BUILD } " = = "YES" -o " ${ CORES_BUILT } " = = "YES" ] ; then
2015-09-15 18:38:35 +00:00
touch $TMPDIR /built-frontend
2015-02-17 03:19:30 +00:00
cd $RADIR
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-09-13 16:37:15 +00:00
echo
2015-02-17 03:19:30 +00:00
2015-10-21 22:18:38 +00:00
cd pkg/apple
2015-10-21 22:22:04 +00:00
xcodebuild clean build CODE_SIGN_IDENTITY = "" CODE_SIGNING_REQUIRED = NO -project RetroArch_iOS.xcodeproj -configuration Release & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-06-17 04:28:53 +00:00
2015-03-09 12:23:17 +00:00
if [ $? -eq 0 ] ; then
2015-10-21 22:18:38 +00:00
MESSAGE = " retroarch build succeeded [ $jobid ] "
echo $MESSAGE
2015-02-17 03:19:30 +00:00
else
2015-10-21 22:18:38 +00:00
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
2015-02-17 03:19:30 +00:00
fi
2015-06-17 04:28:53 +00:00
2015-10-21 22:18:38 +00:00
buildbot_log " $MESSAGE "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-21 22:18:38 +00:00
cd $WORK /$RADIR
2015-04-07 04:57:26 +00:00
2015-10-21 22:18:38 +00:00
echo "Packaging"
2015-03-25 02:15:09 +00:00
2015-10-21 22:18:38 +00:00
fi
fi
2015-03-25 02:15:09 +00:00
2015-04-16 16:40:42 +00:00
2015-10-28 23:42:23 +00:00
if [ " ${ PLATFORM } " = = "ios9" ] && [ " ${ 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
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-10-28 23:42:23 +00:00
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 : ]] } " } "
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-10-28 23:42:23 +00:00
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
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
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-10-28 23:42:23 +00:00
echo
cd pkg/apple
xcodebuild clean build CODE_SIGN_IDENTITY = "" CODE_SIGNING_REQUIRED = NO -project RetroArch_iOS.xcodeproj -configuration Release -target "RetroArch iOS9" & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
if [ $? -eq 0 ] ; then
MESSAGE = " retroarch build succeeded [ $jobid ] "
2015-10-30 06:23:19 +00:00
cd build/Release-iphoneos
security unlock-keychain -p buildbot /Users/buildbot/Library/Keychains/login.keychain
2015-10-30 06:50:30 +00:00
codesign -fs "buildbot" RetroArch.app
2015-10-30 06:23:19 +00:00
2015-10-28 23:42:23 +00:00
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 "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-28 23:42:23 +00:00
cd $WORK /$RADIR
echo "Packaging"
fi
fi
2015-10-21 22:18:38 +00:00
if [ " ${ PLATFORM } " = "android" ] && [ " ${ RA } " = "YES" ] ; then
2015-10-28 23:42:23 +00:00
2015-02-26 01:32:07 +00:00
while read line; do
2015-03-10 19:25:22 +00:00
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 " " `
2015-02-26 01:32:07 +00:00
2015-03-09 12:28:13 +00:00
if [ " ${ ENABLED } " = "YES" ] ; then
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-06-17 04:28:53 +00:00
echo
2015-02-26 01:32:07 +00:00
echo NAME: $NAME
echo DIR: $DIR
echo PARENT: $PARENTDIR
echo URL: $URL
echo REPO TYPE: $TYPE
echo ENABLED: $ENABLED
ARGS = ""
2015-03-10 19:25:22 +00:00
TEMP = ` echo $line | cut -f 9 -d " " `
2015-03-09 12:23:17 +00:00
if [ -n ${ TEMP } ] ; then
2015-02-26 01:32:07 +00:00
ARGS = " ${ TEMP } "
2015-03-10 19:25:22 +00:00
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
2015-02-26 01:32:07 +00:00
2015-03-10 19:25:22 +00:00
ARGS = " ${ ARGS % " ${ ARGS ##*[![ : space : ]] } " } "
2015-02-26 01:32:07 +00:00
2015-03-10 19:25:22 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
2015-10-21 22:18:38 +00:00
cd $PARENTDIR
2015-03-10 19:25:22 +00:00
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-10-22 22:25:25 +00:00
git reset --hard
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-03-10 19:25:22 +00:00
echo $OUT
if [ " ${ TYPE } " = "PROJECT" ] ; then
RADIR = $DIR
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
BUILD = "NO"
2015-06-17 04:28:53 +00:00
else
2015-03-10 19:25:22 +00:00
BUILD = "YES"
fi
fi
cd $WORK
2015-10-21 22:18:38 +00:00
2015-03-10 19:25:22 +00:00
else
echo "cloning repo..."
cd $PARENTDIR
git clone " $URL " " $DIR " --depth= 1
cd $DIR
if [ " ${ TYPE } " = "PROJECT" ] ; then
2015-02-26 01:32:07 +00:00
BUILD = "YES"
2015-03-10 19:25:22 +00:00
RADIR = $DIR
2015-02-26 01:32:07 +00:00
fi
2015-03-10 19:25:22 +00:00
cd $WORK
2015-02-26 01:32:07 +00:00
fi
fi
2015-03-10 19:25:22 +00:00
echo
echo
2015-03-09 12:23:17 +00:00
done < $1 .ra
2015-02-26 01:32:07 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ BUILD } " = "YES" -o " ${ FORCE } " = "YES" -o " ${ FORCE_RETROARCH_BUILD } " = = "YES" ] ; then
2015-09-15 18:38:35 +00:00
touch $TMPDIR /built-frontend
2016-01-14 23:41:14 +00:00
echo " buildbot job: $jobid compiling shaders "
2015-10-21 22:18:38 +00:00
echo
echo RADIR $RADIR
2015-02-26 01:32:07 +00:00
cd $RADIR
2015-10-21 22:18:38 +00:00
$MAKE -f Makefile.griffin shaders-convert-glsl PYTHON3 = $PYTHON
2016-01-14 23:41:14 +00:00
echo " buildbot job: $jobid processing assets "
2015-10-21 22:18:38 +00:00
echo
rm -rf pkg/android/phoenix/assets/assets
rm -rf pkg/android/phoenix/assets/cores
rm -rf pkg/android/phoenix/assets/info
rm -rf pkg/android/phoenix/assets/overlays
rm -rf pkg/android/phoenix/assets/shaders/shaders_glsl/
rm -rf pkg/android/phoenix/assets/database
rm -rf pkg/android/phoenix/assets/autoconfig
rm -rf pkg/android/phoenix/assets/cheats
rm -rf pkg/android/phoenix/assets/playlists
rm -rf pkg/android/phoenix/assets/dowloads
rm -rf pkg/android/phoenix/assets/remaps
rm -rf pkg/android/phoenix/assets/system
mkdir -p pkg/android/phoenix/assets
mkdir -p pkg/android/phoenix/assets/
mkdir -p pkg/android/phoenix/assets/assets
mkdir -p pkg/android/phoenix/assets/cores
mkdir -p pkg/android/phoenix/assets/info
mkdir -p pkg/android/phoenix/assets/overlays
2016-01-13 15:22:13 +00:00
mkdir -p pkg/android/phoenix/assets/shaders/shaders_glsl
mkdir -p pkg/android/phoenix/assets/database/cursors
mkdir -p pkg/android/phoenix/assets/database/rdb
2015-10-21 22:18:38 +00:00
mkdir -p pkg/android/phoenix/assets/autoconfig
mkdir -p pkg/android/phoenix/assets/cheats
mkdir -p pkg/android/phoenix/assets/playlists
mkdir -p pkg/android/phoenix/assets/dowloads
mkdir -p pkg/android/phoenix/assets/remaps
mkdir -p pkg/android/phoenix/assets/saves/
mkdir -p pkg/android/phoenix/assets/states/
mkdir -p pkg/android/phoenix/assets/system/
2015-11-28 02:04:43 +00:00
mkdir -p pkg/android/phoenix/assets/filters/video
mkdir -p pkg/android/phoenix/assets/filters/audio
2016-01-12 18:36:22 +00:00
2015-10-21 22:18:38 +00:00
2015-10-28 02:37:32 +00:00
cp -rf media/assets/glui pkg/android/phoenix/assets/assets/
cp -rf media/assets/xmb pkg/android/phoenix/assets/assets/
cp -rf media/assets/zarch pkg/android/phoenix/assets/assets/
2015-10-21 22:18:38 +00:00
cp -rf media/autoconfig/* pkg/android/phoenix/assets/autoconfig/
cp -rf media/overlays/* pkg/android/phoenix/assets/overlays/
2016-01-13 15:22:13 +00:00
cp -rf media/shaders_glsl/* pkg/android/phoenix/assets/shaders/shaders_glsl/
cp -rf media/libretrodb/cursors/* pkg/android/phoenix/assets/database/cursors/
cp -rf media/libretrodb/rdb/* pkg/android/phoenix/assets/database/rdb/
2015-11-28 02:04:43 +00:00
cp -rf audio/audio_filters/*.dsp pkg/android/phoenix/assets/filters/audio/
cp -rf gfx/video_filters/*.filt pkg/android/phoenix/assets/filters/video/
2016-01-13 15:22:13 +00:00
2015-10-21 22:18:38 +00:00
cp -rf media/shaders_glsl $TMPDIR /
touch pkg/android/phoenix/assets/cheats/.empty-folder
touch pkg/android/phoenix/assets/saves/.empty-folder
touch pkg/android/phoenix/assets/states/.empty-folder
touch pkg/android/phoenix/assets/system/.empty-folder
cp -rf $RARCH_DIR /info/* pkg/android/phoenix/assets/info/
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-02-09 22:31:46 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-09-13 16:37:15 +00:00
echo
2015-10-21 22:18:38 +00:00
cd pkg/android/phoenix
rm bin/*.apk
2016-02-23 17:13:07 +00:00
cat << EOF > local.properties
2016-02-20 18:59:34 +00:00
sdk.dir= /home/buildbot/tools/android/android-sdk-linux
key.store= /home/buildbot/.android/release.keystore
key.alias= buildbot
key.store.password= buildbot
key.alias.password= buildbot
EOF
2015-02-26 01:32:07 +00:00
2015-10-21 22:18:38 +00:00
$NDK clean & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
$NDK -j${ JOBS } & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-10-22 22:25:25 +00:00
python ./version_increment.py
2015-10-21 22:18:38 +00:00
ant clean & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
android update project --path . --target android-22 & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
android update project --path libs/googleplay --target android-21 & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
android update project --path libs/appcompat --target android-21 & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2016-02-23 17:19:16 +00:00
echo RELEASE BUILD: $RELEASE $RARCH_DIR
2016-02-09 22:31:46 +00:00
ant release & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2016-02-23 17:19:16 +00:00
cp -rv bin/retroarch-release.apk $RARCH_DIR /retroarch-release.apk & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
cp -rv bin/retroarch-release.apk $RARCH_DIR /retroarch-release.apk
2016-02-10 00:15:06 +00:00
2016-02-10 00:30:13 +00:00
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
2016-02-10 01:06:20 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2016-02-10 00:30:13 +00:00
buildbot_log " $MESSAGE "
2016-02-09 23:00:38 +00:00
2016-02-23 17:13:07 +00:00
$NDK clean & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2016-02-10 00:30:13 +00:00
$NDK -j${ JOBS } DEBUG = 1 & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
python ./version_increment.py
ant clean & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
android update project --path . --target android-22 & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
android update project --path libs/googleplay --target android-21 & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
android update project --path libs/appcompat --target android-21 & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
echo RELEASE BUILD: $RELEASE
2016-02-12 06:10:27 +00:00
ant set-debuggable release & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2016-02-23 17:19:16 +00:00
cp -rv bin/retroarch-release.apk $RARCH_DIR /retroarch-debug.apk & >> $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
cp -rv bin/retroarch-release.apk $RARCH_DIR /retroarch-debug.apk
2016-02-09 23:00:38 +00:00
2015-09-13 17:02:40 +00:00
if [ $? -eq 0 ] ; then
2016-02-10 00:30:13 +00:00
MESSAGE = " retroarch debug build succeeded [ $jobid ] "
2016-02-23 17:19:16 +00:00
echo $MESSAGE $RARCH_DIR
2015-09-13 17:02:40 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-10-13 23:52:34 +00:00
MESSAGE = " retroarch build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-09-13 17:02:40 +00:00
echo $MESSAGE
fi
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2015-02-26 01:32:07 +00:00
fi
fi
2015-10-23 07:22:01 +00:00
if [ " ${ PLATFORM } " = "MINGW64" ] || [ " ${ PLATFORM } " = "MINGW32" ] || [ " ${ PLATFORM } " = "windows" ] && [ " ${ RA } " = "YES" ] ; then
2015-03-07 21:08:46 +00:00
while read line; do
2015-03-10 19:25:22 +00:00
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 " " `
2015-10-21 22:18:38 +00:00
if [ " ${ ENABLED } " = "YES" ] ; then
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-07-19 18:59:14 +00:00
echo
2015-03-07 21:08:46 +00:00
echo NAME: $NAME
echo DIR: $DIR
echo PARENT: $PARENTDIR
echo URL: $URL
echo REPO TYPE: $TYPE
echo ENABLED: $ENABLED
2015-10-21 22:18:38 +00:00
if [ " ${ NAME } " = "retroarch" ] ; then
ARGS = ""
TEMP = ` echo $line | cut -f 7 -d " " `
if [ -n ${ TEMP } ] ;
then
ARGS = " ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 8 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut -f 9 -d " " `
if [ -n ${ TEMP } ] ; then
ARGS = " ${ ARGS } ${ TEMP } "
fi
ARGS = " ${ ARGS % " ${ ARGS ##*[![ : space : ]] } " } "
2016-01-18 17:59:40 +00:00
2015-03-10 19:25:22 +00:00
fi
2015-03-07 21:08:46 +00:00
2015-03-10 19:25:22 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-03-10 19:25:22 +00:00
echo $OUT
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = "PROJECT" ] ; then
2015-03-10 19:25:22 +00:00
RADIR = $DIR
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
BUILD = "NO"
2015-10-06 05:32:57 +00:00
else
2015-03-10 19:25:22 +00:00
BUILD = "YES"
fi
2015-03-07 21:08:46 +00:00
fi
2015-03-10 19:25:22 +00:00
cd $WORK
else
echo "cloning repo..."
cd $PARENTDIR
git clone " $URL " " $DIR " --depth= 1
cd $DIR
2015-03-11 03:10:11 +00:00
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = "PROJECT" ] ; then
2015-03-10 19:25:22 +00:00
BUILD = "YES"
RADIR = $DIR
fi
cd $WORK
2015-03-07 21:08:46 +00:00
fi
fi
2015-10-21 22:18:38 +00:00
echo
echo
done < $1 .ra
if [ " ${ BUILD } " = "YES" -o " ${ FORCE } " = "YES" -o " ${ FORCE_RETROARCH_BUILD } " = = "YES" ] ; then
2015-09-15 18:38:35 +00:00
touch $TMPDIR /built-frontend
2015-03-07 21:08:46 +00:00
cd $RADIR
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-03-07 21:51:20 +00:00
echo
2015-03-07 21:08:46 +00:00
2015-10-21 22:18:38 +00:00
echo "compiling audio filters"
cd audio/audio_filters
echo " audio filter build command: ${ MAKE } "
$MAKE
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid audio filter build success!
2015-10-21 22:18:38 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid audio filter build failed!
2015-03-07 21:08:46 +00:00
fi
2015-10-21 22:18:38 +00:00
cd ..
cd ..
2015-01-27 23:34:52 +00:00
2015-10-21 22:18:38 +00:00
echo "compiling video filters"
cd gfx/video_filters
echo " audio filter build command: ${ MAKE } "
$MAKE
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid video filter build success!
2015-10-21 22:18:38 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid video filter build failed!
2015-10-21 22:18:38 +00:00
fi
2015-03-11 02:38:12 +00:00
2015-10-21 22:18:38 +00:00
cd ..
cd ..
2015-03-11 02:38:12 +00:00
2015-10-21 22:18:38 +00:00
echo "configuring..."
echo " configure command: $CONFIGURE $ARGS "
${ CONFIGURE } ${ ARGS }
2015-03-11 02:38:12 +00:00
2015-10-21 22:18:38 +00:00
echo "cleaning up..."
echo " cleanup command: $MAKE clean "
$MAKE clean
2015-03-11 02:38:12 +00:00
2015-10-21 22:18:38 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid retroarch cleanup success!
2015-10-21 22:18:38 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid retroarch cleanup failed!
2015-03-11 02:38:12 +00:00
fi
2015-09-15 03:53:02 +00:00
2015-10-21 22:18:38 +00:00
if [ $? -eq 0 ] ; then
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid retroarch configure success!
2015-03-11 02:38:12 +00:00
else
2016-01-14 23:32:14 +00:00
echo buildbot job: $jobid retroarch configure failed!
2015-03-11 02:38:12 +00:00
fi
2015-10-21 22:18:38 +00:00
echo "building..."
echo " build command: $MAKE -j ${ JOBS } "
2015-11-02 17:40:31 +00:00
$MAKE -j${ JOBS } 2>& 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-10-21 22:18:38 +00:00
strip -s retroarch.exe
2015-06-17 04:28:53 +00:00
2015-10-21 22:18:38 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " retroarch build succeeded [ $jobid ] "
2015-09-13 16:52:57 +00:00
echo $MESSAGE
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-10-21 22:18:38 +00:00
buildbot_log " $MESSAGE "
echo "Packaging"
2016-01-14 23:32:14 +00:00
2015-10-21 22:18:38 +00:00
cp retroarch.cfg retroarch.default.cfg
rm -rf windows
mkdir -p windows
mkdir -p windows/overlays
mkdir -p windows/shaders/shaders_cg
mkdir -p windows/autoconfig
mkdir -p windows/filters
mkdir -p windows/filters/video
mkdir -p windows/filters/audio
mkdir -p windows/assets
mkdir -p windows/cheats
mkdir -p windows/database
mkdir -p windows/database/cursors
mkdir -p windows/database/rdb
mkdir -p windows/playlists
mkdir -p windows/content
mkdir -p windows/downloads
mkdir -p windows/info
mkdir -p windows/cores
mkdir -p windows/config/remap
mkdir -p windows/system
mkdir -p windows/saves
mkdir -p windows/states
cat << EOF > windows/retroarch.cfg
dpi_override_value = "160"
menu_driver = "xmb"
assets_directory = ":\assets"
audio_filter_dir = ":\filters\audio"
cheat_database_path = ":\cheats"
config_save_on_exit = "true"
content_database_path = ":\database\rdb"
cursor_directory = ":\database\cursors"
input_joypad_driver = "winxinput"
input_osk_overlay_enable = "false"
input_remapping_directory = ":\config\remap"
2016-01-18 18:00:39 +00:00
joypad_autoconfig_dir = ":\autoconf"
2015-10-21 22:18:38 +00:00
libretro_directory = ":\cores"
libretro_directory = ":\cores"
load_dummy_on_core_shutdown = "false"
menu_collapse_subgroups_enable = "true"
osk_overlay_directory = ":\overlays"
overlay_directory = ":\overlays"
playlist_directory = ":\playlists"
rgui_config_directory = ":\config"
screenshot_directory = ":\screenshots"
video_driver = "gl"
video_filter_dir = ":\filters\video"
video_shader_dir = ":\shaders"
core_assets_directory = ":\downloads"
2016-02-13 01:47:28 +00:00
system_directory = ":\system"
2015-10-21 22:18:38 +00:00
EOF
cp -v retroarch.default.cfg windows/
cp -v *.exe tools/*.exe windows/
cp -rf audio/audio_filters/*.dll windows/filters/audio
cp -rf audio/audio_filters/*.dsp windows/filters/audio
cp -rf gfx/video_filters/*.dll windows/filters/video
cp -rf gfx/video_filters/*.filt windows/filters/video
2015-10-28 23:42:23 +00:00
2015-10-28 22:25:24 +00:00
$MAKE clean
V = 1 $MAKE -j${ JOBS } DEBUG = 1 | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_DEBUG_${ PLATFORM } .log
cp -v retroarch.exe windows/retroarch_debug.exe
2015-09-13 16:52:57 +00:00
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-10-13 23:52:34 +00:00
MESSAGE = " retroarch build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-09-13 16:52:57 +00:00
echo $MESSAGE
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-10-21 22:18:38 +00:00
buildbot_log " $MESSAGE "
2015-03-11 02:38:12 +00:00
fi
fi
fi
2015-10-21 22:18:38 +00:00
if [ " ${ PLATFORM } " = "psp1" ] && [ " ${ RA } " = "YES" ] ; then
2015-09-07 19:39:28 +00:00
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 " " `
2015-10-21 22:18:38 +00:00
if [ " ${ ENABLED } " = "YES" ] ; then
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-09-07 19:39:28 +00:00
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 : ]] } " } "
2016-01-18 17:59:40 +00:00
2015-09-07 19:39:28 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
2015-10-21 22:18:38 +00:00
cd $PARENTDIR
2015-09-07 19:39:28 +00:00
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-09-07 19:39:28 +00:00
echo $OUT
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = "PROJECT" ] ; then
2015-09-07 19:39:28 +00:00
RADIR = $DIR
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
BUILD = "NO"
2015-09-10 23:14:34 +00:00
else
2015-09-07 19:39:28 +00:00
BUILD = "YES"
fi
fi
cd $WORK
else
echo "cloning repo..."
cd $PARENTDIR
git clone " $URL " " $DIR " --depth= 1
cd $DIR
2015-10-21 22:18:38 +00:00
if [ " ${ TYPE } " = "PROJECT" ] ; then
2015-09-07 19:39:28 +00:00
BUILD = "YES"
RADIR = $DIR
fi
cd $WORK
fi
fi
echo
echo
2015-10-21 22:18:38 +00:00
done < $1 .ra
2015-09-07 19:39:28 +00:00
2015-09-13 17:02:40 +00:00
if [ " ${ BUILD } " = = "YES" -o " ${ FORCE } " = = "YES" -o " ${ FORCE_RETROARCH_BUILD } " = = "YES" -o " ${ CORES_BUILT } " = = "YES" ] ; then
2015-10-21 22:18:38 +00:00
touch $TMPDIR /built-frontend
2015-09-07 19:39:28 +00:00
cd $RADIR
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-09-07 19:39:28 +00:00
echo
2015-09-13 16:54:11 +00:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR /*.a .
2015-09-07 19:39:28 +00:00
2015-10-21 22:18:38 +00:00
./dist-cores.sh psp1 & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-09-13 16:54:11 +00:00
if [ $? -eq 0 ] ; then
2015-10-16 05:09:13 +00:00
MESSAGE = " retroarch build succeeded [ $jobid ] "
2015-09-13 16:54:11 +00:00
echo $MESSAGE
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-10-13 23:52:34 +00:00
MESSAGE = " retroarch build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-09-13 16:54:11 +00:00
echo $MESSAGE
2015-09-07 19:39:28 +00:00
fi
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-09-07 19:39:28 +00:00
echo "Packaging"
2016-01-14 23:32:14 +00:00
2015-10-21 22:18:38 +00:00
cd $WORK /$RADIR
2015-09-07 19:39:28 +00:00
cp retroarch.cfg retroarch.default.cfg
2015-10-21 22:18:38 +00:00
mkdir -p pkg/psp1/
mkdir -p pkg/psp1/cheats
cp -p $RARCH_DIST_DIR /../info/*.info pkg/psp1/cores/
2015-09-07 19:39:28 +00:00
fi
fi
2015-10-21 22:18:38 +00:00
if [ " ${ PLATFORM } " = = "wii" ] && [ " ${ RA } " = = "YES" ] ; then
2015-09-14 23:25:58 +00:00
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
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-09-14 23:25:58 +00:00
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 : ]] } " } "
2016-01-18 17:59:40 +00:00
2015-09-14 23:25:58 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-09-15 04:11:34 +00:00
OUT = ` git pull`
2015-09-15 03:53:02 +00:00
2015-09-14 23:25:58 +00:00
echo $OUT
if [ " ${ TYPE } " = = "PROJECT" ] ; then
RADIR = $DIR
if [ [ $OUT = = *"Already up-to-date" * ] ] ; then
BUILD = "NO"
else
BUILD = "YES"
fi
fi
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
2015-10-21 22:18:38 +00:00
if [ " ${ BUILD } " = = "YES" -o " ${ FORCE } " = = "YES" -o " ${ FORCE_RETROARCH_BUILD } " = = "YES" -o " ${ CORES_BUILT } " = = "YES" ] ; then
touch $TMPDIR /built-frontend
cd $RADIR
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-10-21 22:18:38 +00:00
echo
if [ " ${ BUILD } " = = "YES" -o " ${ FORCE } " = = "YES" ] ; then
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR /*.a .
sh ./dist-cores.sh wii & > $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 "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-21 22:18:38 +00:00
cd $WORK /$RADIR
fi
echo "Packaging"
2016-01-14 23:32:14 +00:00
2015-10-21 22:18:38 +00:00
cp retroarch.cfg retroarch.default.cfg
mkdir -p pkg/wii
mkdir -p pkg/wii/overlays
mkdir -p pkg/wii/cheats
mkdir -p pkg/wii/remaps
cp -rf media/overlays/wii/* pkg/wii/overlays
fi
fi
if [ " ${ PLATFORM } " = = "ngc" ] && [ " ${ RA } " = = "YES" ] ; then
while read line; do
NAME = ` echo $line | cut --fields= 1 --delimiter= " " `
DIR = ` echo $line | cut --fields= 2 --delimiter= " " `
URL = ` echo $line | cut --fields= 3 --delimiter= " " `
TYPE = ` echo $line | cut --fields= 4 --delimiter= " " `
ENABLED = ` echo $line | cut --fields= 5 --delimiter= " " `
PARENTDIR = ` echo $line | cut --fields= 6 --delimiter= " " `
if [ " ${ ENABLED } " = = "YES" ] ;
then
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-10-21 22:18:38 +00:00
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 --fields= 9 --delimiter= " " `
if [ -n ${ TEMP } ] ;
then
ARGS = " ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut --fields= 10 --delimiter= " " `
if [ -n ${ TEMP } ] ;
then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut --fields= 11 --delimiter= " " `
if [ -n ${ TEMP } ] ;
then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut --fields= 12 --delimiter= " " `
if [ -n ${ TEMP } ] ;
then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut --fields= 13 --delimiter= " " `
if [ -n ${ TEMP } ] ;
then
ARGS = " ${ ARGS } ${ TEMP } "
fi
TEMP = ""
TEMP = ` echo $line | cut --fields= 14 --delimiter= " " `
if [ -n ${ TEMP } ] ;
then
ARGS = " ${ ARGS } ${ TEMP } "
fi
ARGS = " ${ ARGS % " ${ ARGS ##*[![ : space : ]] } " } "
2016-01-18 17:59:40 +00:00
2015-10-21 22:18:38 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ;
then
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-10-21 22:18:38 +00:00
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
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
2015-09-14 23:25:58 +00:00
if [ " ${ BUILD } " = = "YES" -o " ${ FORCE } " = = "YES" -o " ${ FORCE_RETROARCH_BUILD } " = = "YES" -o " ${ CORES_BUILT } " = = "YES" ] ; then
2015-09-15 18:38:35 +00:00
touch $TMPDIR /built-frontend
2015-09-14 23:25:58 +00:00
cd $RADIR
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-09-14 23:25:58 +00:00
echo
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR /*.a .
2015-10-21 22:18:38 +00:00
sh ./dist-cores.sh ngc & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
if [ $? -eq 0 ] ;
then
2015-10-16 05:09:13 +00:00
MESSAGE = " retroarch build succeeded [ $jobid ] "
2015-09-14 23:25:58 +00:00
echo $MESSAGE
else
2015-09-15 18:38:35 +00:00
ERROR = ` cat $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log | tail -n 100`
2015-10-14 00:02:37 +00:00
HASTE = ` curl -XPOST http://hastebin.com/documents -d" $ERROR " `
2015-10-18 19:30:45 +00:00
HASTE = ` echo $HASTE | cut -d"\"" -f4`
2015-10-13 23:52:34 +00:00
MESSAGE = " retroarch build failed [ $jobid ] LOG: http://hastebin.com/ $HASTE "
2015-09-14 23:25:58 +00:00
echo $MESSAGE
fi
2015-09-25 03:01:01 +00:00
buildbot_log " $MESSAGE "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-21 22:18:38 +00:00
cd ..
2015-09-14 23:25:58 +00:00
echo "Packaging"
2016-01-14 23:32:14 +00:00
2015-09-14 23:25:58 +00:00
cp retroarch.cfg retroarch.default.cfg
2015-10-21 22:18:38 +00:00
mkdir -p pkg/ngc/
mkdir -p pkg/ngc/cheats
mkdir -p pkg/ngc/remaps
mkdir -p pkg/ngc/overlays
cp -rf media/overlays/wii/* pkg/ngc/overlays
2015-09-14 23:25:58 +00:00
fi
2015-10-21 22:18:38 +00:00
2015-09-14 23:25:58 +00:00
fi
2015-10-21 22:18:38 +00:00
if [ " ${ PLATFORM } " = = "ctr" ] && [ " ${ RA } " = = "YES" ] ; then
2015-10-19 19:47:52 +00:00
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
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-10-19 19:47:52 +00:00
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 : ]] } " } "
2016-01-18 17:59:40 +00:00
2015-10-19 19:47:52 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-10-19 19:47:52 +00:00
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
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
cd $RADIR
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-10-19 19:47:52 +00:00
echo
2015-10-21 22:18:38 +00:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR /*.a .
2015-10-19 19:47:52 +00:00
2015-10-21 22:18:38 +00:00
JOBS = 1 sh ./dist-cores.sh ctr & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-10-19 19:47:52 +00:00
if [ $? -eq 0 ] ; then
MESSAGE = " retroarch build succeeded [ $jobid ] "
echo $MESSAGE
2015-10-23 05:29:10 +00:00
touch $TMPDIR /built-frontend
2015-10-19 19:47:52 +00:00
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 "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-19 19:47:52 +00:00
cd $WORK /$RADIR
echo "Packaging"
2016-01-14 23:32:14 +00:00
2015-10-21 22:18:38 +00:00
cp retroarch.cfg retroarch.default.cfg
2015-10-19 19:47:52 +00:00
2015-10-21 22:18:38 +00:00
mkdir -p pkg/3ds
mkdir -p pkg/3ds/remaps
mkdir -p pkg/3ds/cheats
cp -rf media/overlays/* pkg/3ds/overlays/
2015-10-19 19:47:52 +00:00
fi
fi
2015-10-21 22:18:38 +00:00
if [ " ${ PLATFORM } " = = "vita" ] && [ " ${ RA } " = = "YES" ] ; then
2015-10-21 21:57:27 +00:00
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
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Processing $NAME "
2015-10-21 21:57:27 +00:00
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 : ]] } " } "
2016-01-18 17:59:40 +00:00
2015-10-21 21:57:27 +00:00
if [ -d " ${ PARENTDIR } / ${ DIR } /.git " ] ; then
cd $PARENTDIR
cd $DIR
2016-01-14 23:41:14 +00:00
echo "pulling changes from repo... "
2015-10-21 21:57:27 +00:00
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
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
2016-01-14 23:32:14 +00:00
echo " buildbot job: $jobid Building "
2016-01-12 18:36:22 +00:00
buildbot_log " retroarch build starting [ $jobid ] "
2015-10-21 21:57:27 +00:00
echo
2015-10-21 22:18:38 +00:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR /*.a .
2015-10-21 21:57:27 +00:00
2015-10-21 22:18:38 +00:00
JOBS = 1 sh ./dist-cores.sh vita & > $TMPDIR /log/${ BOT } /${ LOGDATE } /${ LOGDATE } _RetroArch_${ PLATFORM } .log
2015-10-21 21:57:27 +00:00
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 "
2016-01-14 23:32:14 +00:00
echo buildbot job: $MESSAGE | tee -a $TMPDIR /log/${ BOT } /${ LOGDATE } .log
2015-10-21 21:57:27 +00:00
cd $WORK /$RADIR
echo "Packaging"
2016-01-14 23:32:14 +00:00
2015-10-21 22:18:38 +00:00
cp retroarch.cfg retroarch.default.cfg
2015-10-21 21:57:27 +00:00
2015-10-21 22:18:38 +00:00
mkdir -p pkg/vita
mkdir -p pkg/vita/remaps
mkdir -p pkg/vita/cheats
cp -rf media/overlays/* pkg/vita/overlays/
2015-10-21 21:57:27 +00:00
fi
fi
2015-09-07 19:39:28 +00:00
2014-11-08 20:28:26 +00:00
PATH = $ORIGPATH