libretro-super/libretro-buildbot-recipe.sh

2139 lines
70 KiB
Bash
Raw Normal View History

#!/bin/bash
# vim: set ts=3 sw=3 noet ft=sh : bash
2016-03-17 23:16:42 -05:00
# ----- setup -----
2015-07-25 21:25:59 -04:00
LOGDATE=`date +%Y-%m-%d`
ORIGPATH=$PATH
2014-12-17 18:59:08 -05:00
WORK=$PWD
2016-03-17 23:13:41 -05:00
RECIPE=$1
2016-03-22 17:36:43 -05:00
BRANCH=""
ENTRY_ID=""
2016-01-14 18:16:40 -05:00
# ----- read variables from recipe config -----
while read line; do
KEY=`echo $line | cut -f 1 -d " "`
2016-08-27 22:49:49 -05:00
VALUE=`echo $line | cut -f 2 -d " "`
2017-06-04 20:05:51 -05:00
rm $TMPDIR/vars
if [ "${KEY}" = "PATH" ]; then
export PATH=${VALUE}:${ORIGPATH}
2017-06-04 20:05:51 -05:00
echo PATH=${VALUE}:${ORIGPATH} >> $TMPDIR/vars
else
export ${KEY}=${VALUE}
2017-06-04 20:05:51 -05:00
echo ${KEY}=${VALUE} >> $TMPDIR/vars
fi
2016-08-11 00:07:57 -05:00
echo Setting: ${KEY} ${VALUE}
2015-03-09 05:23:17 -07:00
done < $1.conf
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
}
convert_xmb_assets()
{
2017-06-04 20:05:51 -05:00
local src_dir=$1
local dst_dir=$2
local scale_icon=$3
local scale_bg=$4
# dots per inch, a value of 90 seems to produce a 64x64 resolution for most icons
local density=$5
mkdir -p "$dst_dir"
IFS_old=$IFS
IFS=$(echo -en "\n\b")
for theme in `ls $src_dir`; do
if [ -d $src_dir/$theme ] ; then
theme=`basename "$theme"`
cp $src_dir/$theme/*.* $dst_dir/$theme/
mkdir -p "$dst_dir/$theme/png"
for png in `ls $src_dir/$theme/png/*.png -d`; do
local name=`basename "$png" .png`
local src_file="$src_dir/$theme/src/$name.svg"
local is_svg=1
if [ ! -e $src_file ] ; then
src_file="$src_dir/$theme/png/$name.png"
is_svg=
fi
local dst_file="$dst_dir/$theme/png/$name.png"
if [ ! -e $src_file ] || [ $src_file -nt $dst_file ] ; then
local scale_factor=$scale_icon
if [ $name = "bg" ] ; then
scale_factor=$scale_bg
fi
if [ $is_svg ] ; then
echo convert -background none -density $density "$src_file" -resize $scale_factor "$dst_file"
convert -background none -density $density "$src_file" -resize $scale_factor "$dst_file"
else
echo convert -background none "$src_file" -resize $scale_factor "$dst_file"
convert -background none "$src_file" -resize $scale_factor "$dst_file"
fi
fi
done
fi
done
IFS=$IFS_old
}
2016-01-14 18:16:40 -05:00
if [ "${CORE_JOB}" == "YES" ]; then
2016-01-18 12:59:40 -05:00
# ----- set target -----
[[ "${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...'
. $WORK/libretro-config.sh
2016-01-14 18:16:40 -05:00
# ----- create dirs -----
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
mkdir -v -p "$RARCH_DIST_DIR"
if [ "${PLATFORM}" = "android" ]; then
2017-06-04 20:21:47 -05:00
if [ -n "$ABI_OVERRIDE" ]; then
echo ABIS-pre: $TARGET_ABIS
echo OVERRIDE: ${ABI_OVERRIDE}
2017-06-04 20:05:51 -05:00
TARGET_ABIS=${ABI_OVERRIDE}
export TARGET_ABIS=${ABI_OVERRIDE}
2017-06-04 20:21:47 -05:00
echo ABIS-post: $TARGET_ABIS
2017-06-04 20:05:51 -05:00
fi
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 12:59:40 -05:00
# ----- set compilers -----
if [ "$HOST_CC" ]; then
CC="${HOST_CC}-gcc"
CXX="${HOST_CC}-g++"
CXX11="${HOST_CC}-g++"
STRIP="${HOST_CC}-strip"
fi
2016-08-27 22:49:49 -05:00
if [ -z "${HELPER} ${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++
2017-10-09 18:13:08 -05:00
CXX11=clang++
elif uname -s | grep -i MINGW32 > /dev/null 2>&1; then
2016-05-16 00:12:49 -05:00
CXX=mingw32-g++f
CXX11=mingw32-g++
else
CXX=g++
CXX11=g++
fi
fi
if [ "${CC}" ] && [ "${CXX}" ]; then
2015-10-31 13:31:18 -05:00
COMPILER="CC="\""${CC}"\"" CXX="\""${CXX}"\"""
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
}
else
2016-03-01 23:58:42 -05: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/$PLATFORM"
fi
fi
2016-01-18 12:59:40 -05:00
# ----- set jobs -----
2015-08-29 04:24:40 +01:00
if [ -z "$JOBS" ]; then
2016-02-08 12:15:25 -05:00
JOBS=6
2015-08-29 04:24:40 +01:00
fi
2015-09-11 00:14:34 +01:00
2016-01-18 12:59:40 -05:00
# ----- set forceful rebuild on/off -----
2015-09-10 06:39:29 +01:00
if [ -z "$FORCE" ]; then
2015-09-13 17:52:57 +01:00
FORCE=NO
2015-09-10 06:39:29 +01:00
fi
2016-01-14 18:16:40 -05:00
if [ -z "$FORCE_RETROARCH_BUILD" ]; then
FORCE_RETROARCH_BUILD=NO
fi
2015-09-11 00:14:34 +01:00
2016-01-22 12:05:34 -05:00
# ----- set release on/off -----
if [ -z "$RELEASE" ]; then
RELEASE=NO
fi
2016-01-18 12:59:40 -05:00
# ----- set cleanup rules -----
2015-11-01 13:21:25 -05:00
CLEANUP=NO
DAY=`date '+%d'`
HOUR=`date '+%H'`
if [ $DAY == 01 -a $HOUR == 06 ]; then
FORCE=YES
2015-11-01 13:21:25 -05:00
CLEANUP=NO
fi
2016-01-18 12:59:40 -05:00
# ----- use to keep track of built cores -----
CORES_BUILT=NO
2015-09-11 00:14:34 +01:00
2016-01-14 18:16:40 -05:00
FORCE_ORIG=$FORCE
JOBS_ORIG=$JOBS
2015-08-29 04:24:40 +01:00
cd "${BASE_DIR}"
2015-02-01 14:48:09 -05:00
buildbot_log() {
2016-01-14 18:32:14 -05:00
echo buildbot message: $MESSAGE
2015-10-18 14:30:45 -05:00
MESSAGE=`echo -e $1`
2015-03-05 19:50:45 -05:00
if [ -n "$LOGURL" ]; then
HASH=`echo -n "$MESSAGE" | openssl sha1 -hmac $SIG | cut -f 2 -d " "`
curl --max-time 30 --data "message=$MESSAGE&sign=$HASH" $LOGURL
fi
}
buildbot_handle_message() {
RET=$1
ENTRY_ID=$2
NAME=$3
jobid=$4
ERROR=$5
if [ $RET -eq 0 ]; then
if [ -n "$LOGURL" ]; then
curl -X POST -d type="finish" -d index="$ENTRY_ID" -d status="done" http://buildbot.fiveforty.net/build_entry/
fi
MESSAGE="$NAME: [status: done] [$jobid]"
else
if [ -n "$LOGURL" ]; then
gzip -9fk $ERROR
HASTE=`curl -X POST http://p.0bl.net/ --data-binary @${ERROR}.gz`
MESSAGE="$NAME: [status: fail] [$jobid] LOG: $HASTE"
curl -X POST -d type="finish" -d index="$ENTRY_ID" -d status="fail" -d log="$HASTE" http://buildbot.fiveforty.net/build_entry/
else
MESSAGE="$NAME: [status: fail] [$jobid]"
fi
fi
echo buildbot job: $MESSAGE
buildbot_log "$MESSAGE"
2017-10-20 16:09:26 -04:00
if [ "$EXIT_ON_ERROR" = "1" ]; then
exit 1
fi
2015-02-01 14:48:09 -05:00
}
build_libretro_generic_makefile() {
NAME=$1
DIR=$2
SUBDIR=$3
MAKEFILE=$4
PLATFORM=$5
ARGS=$6
2015-08-02 22:36:17 -05:00
JOBS=$JOBS
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi
if [ "${COMMAND}" = "CMAKE" ]; then
mkdir -p $DIR/$SUBDIR
fi
cd $DIR
cd $SUBDIR
2016-01-14 18:16:40 -05:00
JOBS_ORIG=$JOBS
2015-11-03 16:08:00 +01:00
if [ "${NAME}" == "mame2003" ]; then
JOBS=1
fi
2015-10-06 06:29:39 +01:00
if [ "${NAME}" == "mame2010" ]; then
JOBS=1
fi
2017-06-04 20:05:51 -05:00
echo --------------------------------------------------| tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-12-31 14:31:30 -06:00
cat $TMPDIR/vars | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-12-08 21:27:12 -05:00
cd ${DIR}/${SUBDIR}
2016-12-31 14:31:30 -06:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2015-03-09 05:23:17 -07:00
if [ -z "${NOCLEAN}" ]; then
2017-06-15 15:36:20 +01:00
if [ "${COMMAND}" = "CMAKE" ]; then
echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} -j${JOBS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} -j${JOBS} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-05-30 16:54:13 -05:00
else
2017-06-15 15:36:20 +01:00
if [ -z "${ARGS}" ]; then
echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
else
echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
fi
2016-05-30 16:54:13 -05:00
fi
2017-06-15 15:36:20 +01:00
2015-03-09 05:23:17 -07:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup success!
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup failed!
fi
fi
2016-12-31 14:31:30 -06:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2015-10-18 14:30:45 -05:00
if [ "${NAME}" == "mame2010" ]; then
2016-12-31 14:31:30 -06:00
echo "BUILD CMD: PLATFORM="" platform="" ${HELPER} ${MAKE} -f ${MAKEFILE} "VRENDER=soft" "NATIVE=1" buildtools -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
PLATFORM="" platform="" ${HELPER} ${MAKE} -f ${MAKEFILE} "VRENDER=soft" "NATIVE=1" buildtools -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-01-14 18:16:40 -05:00
JOBS=$JOBS_ORIG
2015-10-18 14:30:45 -05:00
fi
2015-10-16 00:24:41 -05:00
if [ "${COMMAND}" = "CMAKE" ]; then
2017-09-27 13:42:48 -05:00
if [ "${PLATFORM}" = "android" ]; then
EXTRAARGS="-DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=${API_LEVEL} -DCMAKE_ANDROID_ARCH_ABI=${ABI_OVERRIDE} -DCMAKE_ANDROID_NDK=${NDK_ROOT}"
fi
if [ -z "${ARGS}" ]; then
echo "BUILD CMD: ${CMAKE}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${CMAKE} | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
else
2017-09-27 13:42:48 -05:00
echo "BUILD CMD: ${CMAKE} ${EXTRAARGS} ${ARGS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
echo ${EXTRAARGS} ${ARGS} | xargs ${CMAKE} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
fi
find . -mindepth 2 -name "${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" -exec cp -f "{}" . \;
else
if [ -z "${ARGS}" ]; then
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
else
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
fi
2017-06-15 15:24:32 +01:00
fi
2015-10-16 00:24:41 -05:00
2015-10-16 00:20:40 -05:00
if [ "${MAKEPORTABLE}" == "YES" ]; then
2016-12-31 14:31:30 -06:00
echo "BUILD CMD $WORK/retrolink.sh ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
$WORK/retrolink.sh ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2015-10-18 14:30:45 -05:00
fi
2015-10-16 00:20:40 -05:00
if [ "${PLATFORM}" == "windows" -o "${PLATFORM}" == "unix" ]; then
if [ -z "${STRIP}" ]; then
STRIP=strip
fi
${STRIP} -s ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
fi
2016-12-31 14:31:30 -06:00
echo "COPY CMD: 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
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-24 23:40:17 -05:00
cp -v ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${DIST}/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
2016-07-10 10:57:51 -05:00
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID $1 $jobid $ERROR
ENTRY_ID=""
2016-01-14 18:16:40 -05:00
JOBS=$JOBS_ORIG
}
2015-06-17 19:49:20 -04:00
build_libretro_leiradel_makefile() {
NAME=$1
DIR=$2
SUBDIR=$3
MAKEFILE=$4
PLATFORM=$5
ARGS=$6
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi
2015-09-13 17:52:57 +01:00
ARG1=`echo ${ARGS} | cut -f 1 -d " "`
mkdir -p $RARCH_DIST_DIR/${DIST}/${ARG1}
2015-08-13 23:11:51 +01:00
2015-06-17 19:49:20 -04:00
cd $DIR
cd $SUBDIR
2016-01-14 18:16:40 -05:00
JOBS_ORIG=$JOBS
2015-06-17 19:49:20 -04:00
2017-06-04 20:05:51 -05:00
echo --------------------------------------------------| tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2016-12-08 21:27:12 -05:00
cat $TMPDIR/vars | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
cd ${DIR}/${SUBDIR}
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2015-06-17 19:49:20 -04:00
if [ -z "${NOCLEAN}" ]; then
2016-12-31 14:31:30 -06:00
echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE}.${PLATFORM}_${ARGS} platform=${PLATFORM}_${ARGS} -j${JOBS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE}.${PLATFORM}_${ARGS} platform=${PLATFORM}_${ARGS} -j${JOBS} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2015-06-17 19:49:20 -04:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup success!
2015-06-17 19:49:20 -04:00
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup failed!
2015-06-17 19:49:20 -04:00
fi
fi
2016-12-31 14:31:30 -06:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE}.${PLATFORM}_${ARGS} platform=${PLATFORM}_${ARGS} -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${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 19:49:20 -04:00
echo "COPY CMD: cp -v ${NAME}_libretro.${PLATFORM}_${ARG1}.${FORMAT_EXT} $RARCH_DIST_DIR/${DIST}/${ARG1}/${NAME}_libretro${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
cp -v ${NAME}_libretro.${PLATFORM}_${ARG1}.${FORMAT_EXT} $RARCH_DIST_DIR/${DIST}/${ARG1}/${NAME}_libretro${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
cp -v ${NAME}_libretro.${PLATFORM}_${ARG1}.${FORMAT_EXT} $RARCH_DIST_DIR/${DIST}/${ARG1}/${NAME}_libretro${LIBSUFFIX}.${FORMAT_EXT}
2016-03-23 21:46:15 -05:00
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID $1 $jobid $ERROR
2015-11-01 12:28:14 -05:00
ENTRY_ID=""
JOBS=$JOBS_ORIG
2016-07-10 11:14:49 -05:00
}
build_libretro_generic_gl_makefile() {
NAME=$1
DIR=$2
SUBDIR=$3
MAKEFILE=$4
PLATFORM=$5
ARGS=$6
check_opengl
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi
2016-07-10 11:14:49 -05:00
cd $DIR
cd $SUBDIR
2017-06-04 20:05:51 -05:00
echo --------------------------------------------------| tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2016-12-08 21:27:12 -05:00
cat $TMPDIR/vars | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
cd ${DIR}/${SUBDIR}
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2015-11-01 12:28:14 -05:00
if [ -z "${NOCLEAN}" ]; then
2016-12-31 14:31:30 -06:00
echo "CLEANUP CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2015-11-01 12:28:14 -05:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup success!
2015-11-01 12:28:14 -05:00
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup failed!
2015-11-01 12:28:14 -05:00
fi
fi
2016-07-10 11:14:49 -05:00
2016-12-31 14:31:30 -06:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-07-10 11:14:49 -05:00
if [ -z "${ARGS}" ]; then
2016-12-31 14:31:30 -06:00
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-07-10 11:14:49 -05:00
else
2016-12-31 14:31:30 -06:00
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} ${COMPILER} -j${JOBS} ${ARGS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} -j${JOBS} ${ARGS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-07-10 11:14:49 -05:00
fi
2016-12-31 14:31:30 -06:00
echo "COPY CMD: cp -v ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
cp -v ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
2016-07-10 11:14:49 -05:00
cp -v ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID $1 $jobid $ERROR
ENTRY_ID=""
2016-07-10 11:14:49 -05:00
reset_compiler_targets
2014-12-23 18:11:56 -05:00
}
build_libretro_generic_jni() {
NAME=$1
DIR=$2
SUBDIR=$3
MAKEFILE=$4
PLATFORM=$5
ARGS=$6
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi
2016-12-02 01:13:03 -05:00
echo --------------------------------------------------| tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
cat $TMPDIR/vars | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
cd ${DIR}/${SUBDIR}
2016-12-02 01:13:03 -05:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
for a in "${ABIS[@]}"; do
2015-03-09 05:23:17 -07:00
if [ -z "${NOCLEAN}" ]; then
2016-07-10 10:57:51 -05:00
echo "CLEANUP CMD: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2015-10-06 00:32:57 -05:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $a $1 cleanup success!
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $a $1 cleanup failed!
fi
fi
2016-07-10 11:14:49 -05:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2015-03-09 05:23:17 -07:00
if [ -z "${ARGS}" ]; then
2016-07-10 10:57:51 -05:00
echo "BUILD CMD: ${NDK} -j${JOBS} APP_ABI=${a}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
${NDK} -j${JOBS} APP_ABI=${a} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
else
2016-07-10 10:57:51 -05:00
echo "BUILD CMD: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} " 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
fi
2016-12-31 14:31:30 -06:00
2016-07-23 00:22:52 -05:00
if [ "${NAME}" == "mupen64plus" ]; then
2016-07-23 00:41:09 -05:00
echo "COPY CMD: cp -v ../libs/${a}/libparallel_retro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/parallel_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2016-07-23 01:04:05 -05:00
cp -v ../libs/${a}/libparallel_retro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/parallel_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2016-07-23 00:41:09 -05:00
cp -v ../libs/${a}/libparallel_retro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/parallel_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
2016-07-22 12:39:13 -05:00
fi
2016-07-23 00:21:22 -05:00
echo "COPY CMD: cp -v ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2016-07-10 10:57:51 -05:00
cp -v ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
cp -v ../libs/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
buildbot_handle_message $RET $ENTRY_ID $1-$a $jobid $ERROR
2016-12-31 14:31:30 -06:00
ENTRY_ID=""
2015-11-01 12:28:14 -05:00
if [ -z "${NOCLEAN}" ]; then
2016-07-10 10:57:51 -05:00
echo "CLEANUP CMD: ${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
${NDK} -j${JOBS} ${ARGS} APP_ABI=${a} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PLATFORM}_${a}.log
2015-11-01 12:28:14 -05:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $a $1 cleanup success!
2015-11-01 12:28:14 -05:00
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $a $1 cleanup failed!
2015-11-01 12:28:14 -05:00
fi
fi
2015-11-01 13:04:03 -05:00
done
2016-07-10 11:14:49 -05:00
2014-12-17 22:39:09 -05:00
}
build_libretro_bsnes_jni() {
NAME=$1
DIR=$2
SUBDIR=$3
MAKEFILE=$4
PLATFORM=$5
PROFILE=$6
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi
cd ${DIR}/${SUBDIR}
2016-07-10 11:50:48 -05:00
echo -------------------------------------------------- 2>&1 | tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
for a in "${ABIS[@]}"; do
2015-03-09 05:23:17 -07:00
if [ -z "${NOCLEAN}" ]; then
2016-07-10 11:50:48 -05:00
echo "CLEANUP CMD: ${NDK} -j${JOBS} APP_ABI=${a} clean" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
${NDK} -j${JOBS} APP_ABI=${a} clean 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
2015-03-09 05:23:17 -07:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup success!
2015-03-09 05:23:17 -07:00
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup failed!
2015-03-09 05:23:17 -07:00
fi
fi
2016-07-10 11:50:48 -05:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
2016-03-01 23:48:19 -05:00
if [ -z "${ARGS}" ]; then
2016-07-10 11:50:48 -05:00
echo "BUILD CMD: ${NDK} -j${JOBS} APP_ABI=${a} profile=${PROFILE}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
${NDK} -j${JOBS} APP_ABI=${a} profile=${PROFILE} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
else
2016-07-10 11:50:48 -05:00
echo "BUILD CMD: ${NDK} -j${JOBS} APP_ABI=${a} profile=${PROFILE}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
${NDK} -j${JOBS} APP_ABI=${a} profile=${PROFILE} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
fi
2016-03-01 23:48:19 -05:00
2016-07-10 11:50:48 -05:00
echo "COPY CMD: cp -v ../libs/${a}/libretro_${NAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
cp -v ../libs/${a}/libretro_${NAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
2016-02-28 20:58:01 -05:00
cp -v ../libs/${a}/libretro_${NAME}_${PROFILE}.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${NAME}_${PROFILE}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
2016-03-23 21:46:15 -05:00
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}_${a}.log
buildbot_handle_message $RET $ENTRY_ID $1-$a $jobid $ERROR
ENTRY_ID=""
done
}
2017-10-08 09:34:08 -05:00
build_libretro_bsnes() {
2017-10-08 09:27:43 -05:00
NAME=$1
DIR=$2
2017-10-08 09:34:08 -05:00
PROFILE=$3
2017-10-08 09:27:43 -05:00
MAKEFILE=$4
2017-10-08 09:34:08 -05:00
PLATFORM=$5
BSNESCOMPILER=$6
2017-10-08 09:27:43 -05:00
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi
2017-10-08 09:27:43 -05:00
2017-10-08 09:34:08 -05:00
cd $DIR
2017-10-08 09:27:43 -05:00
echo -------------------------------------------------- 2>&1 | tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
if [ -z "${NOCLEAN}" ]; then
rm -f obj/*.{o,"${FORMAT_EXT}"} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
rm -f out/*.{o,"${FORMAT_EXT}"} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
2017-10-08 09:34:08 -05:00
if [ "${PROFILE}" = "cpp98" -o "${PROFILE}" = "bnes" ]; then
${HELPER} ${MAKE} clean 2>&1 | tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
fi
2017-10-08 09:27:43 -05:00
if [ $? -eq 0 ]; then
echo buildbot job: $jobid $1 cleanup success!
else
echo buildbot job: $jobid $1 cleanup failed!
fi
fi
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
2017-10-08 09:34:08 -05:00
if [ "${PROFILE}" = "cpp98" ]; then
${HELPER} ${MAKE} platform="${PLATFORM}" ${COMPILER} "-j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
elif [ "${PROFILE}" = "bnes" ]; then
echo "BUILD CMD: ${HELPER} ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler=${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
${HELPER} ${MAKE} -f Makefile ${COMPILER} "-j${JOBS}" compiler="${BSNESCOMPILER}" platform=${FORMAT_COMPILER_TARGET} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
else
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
${HELPER} ${MAKE} -f ${MAKEFILE} platform=${PLATFORM} compiler=${BSNESCOMPILER} ui='target-libretro' profile=${PROFILE} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
fi
2017-10-08 09:27:43 -05:00
2017-10-08 09:34:08 -05:00
if [ "${PROFILE}" = "cpp98" ]; then
echo "COPY CMD: cp -fv out/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
cp -fv "out/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
cp -fv "out/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1
elif [ "${PROFILE}" = "bnes" ]; then
echo "COPY CMD cp -fv ${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
cp -fv "${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
cp -fv "${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" "${RARCH_DIST_DIR}/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}"
else
echo "COPY CMD cp -fv "out/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
cp -fv "out/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
cp -fv "out/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
fi
2017-10-08 09:27:43 -05:00
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID $1-${PROFILE} $jobid $ERROR
ENTRY_ID=""
2017-10-08 09:27:43 -05:00
}
2017-10-08 09:34:08 -05:00
build_libretro_higan() {
NAME=$1
DIR=$2
2017-10-08 09:34:08 -05:00
SUBDIR=$3
MAKEFILE=$4
2017-10-08 10:02:23 -05:00
PLAT=$5
2017-10-08 09:39:42 -05:00
BSNESCOMPILER=$7
2017-10-08 09:34:08 -05:00
ARGS=$8
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="$NAME" http://buildbot.fiveforty.net/build_entry/`
fi
2017-10-08 09:34:08 -05:00
cd $DIR/$SUBDIR
2017-10-08 10:02:23 -05:00
echo -------------------------------------------------- 2>&1 | tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
2015-03-09 05:23:17 -07:00
if [ -z "${NOCLEAN}" ]; then
2017-10-08 10:02:23 -05:00
rm -f obj/*.{o,"${FORMAT_EXT}"} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
rm -f out/*.{o,"${FORMAT_EXT}"} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
2015-03-09 05:23:17 -07:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup success!
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid $1 cleanup failed!
fi
fi
2016-01-18 12:59:40 -05:00
2017-10-08 09:52:11 -05:00
unset $platform
2017-10-08 10:02:23 -05:00
unset $PLATFORM
2017-10-08 10:03:35 -05:00
platform=""
PLATFORM=""
2017-10-08 09:52:11 -05:00
2017-10-08 10:02:23 -05:00
echo -------------------------------------------------- 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
echo "BUILD CMD: ${HELPER} ${MAKE} -f ${MAKEFILE} compiler=${BSNESCOMPILER} ${ARGS} -j${JOBS}" 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
${HELPER} ${MAKE} -f ${MAKEFILE} compiler=${BSNESCOMPILER} ${ARGS} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
2017-10-08 09:34:08 -05:00
2017-10-08 10:02:23 -05:00
echo "COPY CMD cp -fv" "out/${NAME}_${PROFILE}_libretro${FORMAT}.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_${PROFILE}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
cp -fv "out/${NAME}_libretro${FORMAT}.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
2017-10-08 09:34:08 -05:00
cp -fv "out/${NAME}_libretro${FORMAT}.${FORMAT_EXT}" $RARCH_DIST_DIR/${NAME}_libretro${FORMAT}${LIBSUFFIX}.${FORMAT_EXT}
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_${NAME}_${PROFILE}_${PLAT}.log
buildbot_handle_message $RET $ENTRY_ID $1-${PROFILE} $jobid $ERROR
ENTRY_ID=""
2014-11-05 22:21:26 -08:00
}
2016-01-14 18:16:40 -05:00
# ----- buildbot -----
2016-01-14 18:16:40 -05:00
echo buildbot starting
echo --------------------------------------------------
echo Variables:
2016-03-01 23:58:42 -05:00
echo CC $CC
echo CXX $CXX
echo STRIP $STRIP
2016-01-14 18:16:40 -05:00
echo DISTDIR $RARCH_DIST_DIR
2016-03-01 23:58:42 -05:00
echo JOBS $JOBS
2016-01-14 18:16:40 -05:00
echo
echo
2015-10-13 18:18:23 -05:00
export jobid=$1
2015-01-17 00:56:23 -05:00
2016-01-14 18:16:40 -05:00
# ----- fetch a project -----
echo
echo
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 " "`
GIT_BRANCH=`echo $line | cut -f 4 -d " "`
TYPE=`echo $line | cut -f 5 -d " "`
ENABLED=`echo $line | cut -f 6 -d " "`
COMMAND=`echo $line | cut -f 7 -d " "`
MAKEFILE=`echo $line | cut -f 8 -d " "`
SUBDIR=`echo $line | cut -f 9 -d " "`
if [ "${ENABLED}" = "YES" ]; then
echo -ne "buildbot job started at: "
date
echo
2016-01-14 18:16:40 -05:00
echo "buildbot job: $jobid processing $NAME"
2016-03-01 23:58:42 -05:00
echo --------------------------------------------------
2016-01-14 18:16:40 -05:00
echo Variables:
2016-03-01 23:58:42 -05:00
echo URL $URL
2016-01-14 18:16:40 -05:00
echo REPO TYPE $TYPE
2016-03-01 23:58:42 -05:00
echo ENABLED $ENABLED
echo COMMAND $COMMAND
echo MAKEFILE $MAKEFILE
echo DIR $DIR
echo SUBDIR $SUBDIR
echo
echo
ARGS=""
TEMP=`echo $line | cut -f 10 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 11 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 12 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 13 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 14 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 15 -d " "`
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
2015-09-13 17:52:57 +01:00
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
TEMP=""
TEMP=`echo $line | cut -f 30 -d " "`
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
2015-03-09 05:23:17 -07:00
ARGS="${ARGS%"${ARGS##*[![:space:]]}"}"
BUILD="NO"
if [ "${TYPE}" = "PROJECT" ]; then
2015-03-09 05:23:17 -07:00
if [ -d "${DIR}/.git" ]; then
2015-11-01 12:34:23 -05:00
if [ "${CLEANUP}" == "YES" ]; then
rm -rfv $DIR
echo "cloning repo $URL..."
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
2015-11-01 12:34:23 -05:00
BUILD="YES"
else
cd $DIR
2017-03-15 09:39:15 -07:00
if [ -f .forcebuild ]; then
2017-03-15 10:20:56 -07:00
echo "found .forcebuild file, building $NAME"
2017-03-15 09:39:15 -07:00
BUILD="YES"
fi
echo "pulling changes from repo $URL... "
2015-11-01 12:34:23 -05:00
OUT=`git pull`
2017-03-17 22:19:04 -04:00
echo $OUT
2017-03-15 09:39:15 -07:00
if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then
2015-11-01 12:34:23 -05:00
BUILD="NO"
else
echo "resetting repo state... "
git reset --hard FETCH_HEAD
git clean -xdf
2015-11-01 12:34:23 -05:00
BUILD="YES"
fi
2016-03-01 23:48:19 -05:00
fi
2016-01-14 18:16:40 -05:00
FORCE_ORIG=$FORCE
2015-07-21 00:31:15 -05:00
OLDBUILD=$BUILD
2015-03-17 23:46:52 -04:00
2017-09-24 11:05:47 -05:00
if [ "${PREVCORE}" = "bsnes" -a "${PREVBUILD}" = "YES" -a "${COMMAND}" = "BSNES" ]; then
FORCE="YES"
BUILD="YES"
fi
2017-09-24 11:05:47 -05:00
if [ "${PREVCORE}" = "bsnes" -a "${PREVBUILD}" = "YES" -a "${COMMAND}" = "BSNES_JNI" ]; then
2016-02-28 20:12:30 -05:00
FORCE="YES"
BUILD="YES"
fi
2017-09-24 11:09:41 -05:00
2017-09-24 11:12:03 -05:00
if [ "${PREVCORE}" = "bsnes_mercury" -a "${PREVBUILD}" = "YES" -a "${COMMAND}" = "BSNES" ]; then
2017-09-24 11:09:41 -05:00
FORCE="YES"
BUILD="YES"
fi
2017-09-24 11:53:09 -05:00
if [ "${PREVCORE}" = "bsnes_mercury" -a "${PREVBUILD}" = "YES" -a "${COMMAND}" = "BSNES_JNI" ]; then
2017-09-24 11:09:41 -05:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "gw" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "gw" ]; then
2015-06-17 19:49:20 -04:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "fuse" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "fuse" ]; then
2015-06-17 19:56:58 -04:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "81" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "81" ]; then
2015-08-05 06:08:56 +01:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "snes9x-next" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "snes9x-next" ]; then
2015-08-05 06:08:56 +01:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "vba_next" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "vba_next" ]; then
2015-08-05 06:08:56 +01:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "emux_nes" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "emux_nes" ]; then
2015-08-13 23:19:20 +01:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "emux_sms" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "emux_sms" ]; then
2015-08-05 06:08:56 +01:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "mgba" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "mgba" ]; then
2015-08-05 06:08:56 +01:00
FORCE="YES"
BUILD="YES"
fi
2015-10-13 18:18:23 -05:00
if [ "${PREVCORE}" = "snes9x_next" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "snes9x_next" ]; then
2015-08-17 02:25:22 +01:00
FORCE="YES"
BUILD="YES"
fi
if [ "${PREVCORE}" = "bsnes_mercury" -a "${PREVBUILD}" = "YES" -a "${COMMAND}" = "BSNES" ]; then
FORCE="YES"
BUILD="YES"
fi
2015-08-02 23:34:38 -05:00
if [ "${PREVCORE}" = "mame2014" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "mess2014" ]; then
FORCE="YES"
BUILD="YES"
fi
2015-08-02 23:34:38 -05:00
if [ "${PREVCORE}" = "mess2014" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "ume2014" ]; then
FORCE="YES"
BUILD="YES"
fi
2017-03-20 19:56:24 -05:00
if [[ "${PREVCORE}" == *fbalpha2012* ]] && [[ "${PREVBUILD}" = "YES" ]] && [[ "${NAME}" == *fbalpha2012* ]]; then
2015-03-17 23:27:33 -04:00
FORCE="YES"
BUILD="YES"
fi
2015-10-06 06:29:39 +01:00
if [ "${PREVCORE}" = "mame2010" -a "${PREVBUILD}" = "YES" -a "${NAME}" = "mame2010" ]; then
FORCE="YES"
BUILD="YES"
fi
cd $WORK
else
echo "cloning repo $URL..."
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
BUILD="YES"
fi
elif [ "${TYPE}" = "psp_hw_render" ]; then
2015-03-09 05:23:17 -07:00
if [ -d "${DIR}/.git" ]; then
cd $DIR
2017-03-15 10:20:56 -07:00
if [ -f .forcebuild ]; then
echo "found .forcebuild file, building $NAME"
BUILD="YES"
fi
echo "pulling changes from repo $URL... "
2015-09-15 05:11:34 +01:00
OUT=`git pull`
2017-03-17 22:19:04 -04:00
echo $OUT
2015-09-15 04:53:02 +01:00
2017-03-15 10:20:56 -07:00
if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then
BUILD="NO"
else
echo "resetting repo state... "
git reset --hard FETCH_HEAD
git clean -xdf
BUILD="YES"
fi
cd $WORK
else
2016-01-14 18:16:40 -05:00
echo "pulling changes from repo... "
git clone -b "$GIT_BRANCH" "$URL" "$DIR"
cd $DIR
git checkout $TYPE
cd $WORK
BUILD="YES"
fi
2015-03-09 05:23:17 -07:00
elif [ "${TYPE}" == "SUBMODULE" ]; then
if [ -d "${DIR}/.git" ]; then
cd $DIR
2017-03-15 10:20:56 -07:00
if [ -f .forcebuild ]; then
echo "found .forcebuild file, building $NAME"
BUILD="YES"
fi
echo "pulling changes from repo $URL... "
2015-09-15 05:11:34 +01:00
OUT=`git pull`
2017-03-17 22:19:04 -04:00
echo $OUT
2015-09-15 04:53:02 +01:00
2017-03-15 10:20:56 -07:00
if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then
BUILD="NO"
else
echo "resetting repo state $URL... "
git reset --hard FETCH_HEAD
git clean -xdf
BUILD="YES"
fi
2016-05-16 00:12:49 -05:00
OUT=`git submodule update --init --recursive`
cd $WORK
2016-03-01 23:48:19 -05:00
else
echo "cloning repo $URL..."
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
cd $DIR
git submodule update --init --recursive
BUILD="YES"
fi
2016-03-01 23:48:19 -05:00
cd $WORK
fi
if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" ]; then
2015-09-15 19:38:35 +01:00
touch $TMPDIR/built-cores
CORES_BUILT=YES
2016-01-14 18:16:40 -05:00
echo "buildbot job: building $NAME"
if [ "${COMMAND}" = "GENERIC" ]; then
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}"
elif [ "${COMMAND}" = "CMAKE" ]; then
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}"
2015-06-17 19:49:20 -04:00
elif [ "${COMMAND}" = "LEIRADEL" ]; then
2015-08-13 22:11:32 +01:00
build_libretro_leiradel_makefile $NAME $DIR $SUBDIR $MAKEFILE ${PLATFORM} "${ARGS}"
elif [ "${COMMAND}" = "GENERIC_GL" ]; then
build_libretro_generic_gl_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}"
elif [ "${COMMAND}" = "GENERIC_ALT" ]; then
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}"
elif [ "${COMMAND}" = "GENERIC_JNI" ]; then
build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}"
elif [ "${COMMAND}" = "BSNES_JNI" ]; then
build_libretro_bsnes_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}"
elif [ "${COMMAND}" = "GENERIC_THEOS" ]; then
build_libretro_generic_theos $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}"
elif [ "${COMMAND}" = "BSNES" ]; then
build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11}
2017-10-08 09:27:43 -05:00
elif [ "${COMMAND}" = "HIGAN" ]; then
build_libretro_higan $NAME $DIR $SUBDIR $MAKEFILE $PLATFORM ${FORMAT_COMPILER_TARGET} ${CXX11} "${ARGS}"
2015-03-09 05:23:17 -07:00
fi
else
2016-01-14 18:16:40 -05:00
echo "buildbot job: building $NAME up-to-date"
fi
echo
echo -ne "buildbot job finished at: "
date
fi
cd "${BASE_DIR}"
PREVCORE=$NAME
PREVBUILD=$BUILD
2015-03-17 23:46:52 -04:00
BUILD=$OLDBUILD
2016-01-14 18:16:40 -05:00
FORCE=$FORCE_ORIG
2015-03-09 05:23:17 -07:00
done < $1
2016-03-17 23:06:49 -05:00
buildbot_pull(){
2016-03-17 23:22:20 -05: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 " "`
2016-03-17 23:06:49 -05:00
if [ "${ENABLED}" = "YES" ]; then
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Processing $NAME"
2016-03-17 23:06:49 -05: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 " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 10 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 11 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 12 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 13 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
TEMP=""
TEMP=`echo $line | cut -f 14 -d " "`
2015-03-09 05:23:17 -07:00
if [ -n ${TEMP} ]; then
ARGS="${ARGS} ${TEMP}"
fi
ARGS="${ARGS%"${ARGS##*[![:space:]]}"}"
2016-03-17 23:06:49 -05:00
if [ -d "${PARENTDIR}/${DIR}/.git" ]; then
cd $PARENTDIR
cd $DIR
2017-03-15 10:20:56 -07:00
if [ -f .forcebuild ]; then
echo "found .forcebuild file, building $NAME"
BUILD="YES"
fi
echo "pulling changes from repo $URL... "
2015-09-15 05:11:34 +01:00
OUT=`git pull`
2016-03-17 22:26:09 -05:00
echo $OUT
2017-03-17 22:19:04 -04:00
2016-03-17 22:26:09 -05:00
if [ "${TYPE}" = "PROJECT" ]; then
RADIR=$DIR
2017-03-15 10:20:56 -07:00
if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then
2016-03-17 22:26:09 -05:00
BUILD="NO"
else
echo "resetting repo state $URL... "
git reset --hard FETCH_HEAD
git clean -xdf
2016-03-17 22:26:09 -05:00
BUILD="YES"
fi
elif [ "${TYPE}" = "SUBMODULE" ]; then
RADIR=$DIR
2017-03-15 10:20:56 -07:00
if [[ $OUT == *"Already up-to-date"* ]] && [ ! "${BUILD}" = "YES" ]; then
BUILD="NO"
else
echo "resetting repo state $URL... "
git reset --hard FETCH_HEAD
git clean -xdf
BUILD="YES"
2016-03-21 14:12:39 -05:00
git submodule update --init --recursive
2016-05-16 00:12:49 -05:00
#git submodule foreach git pull origin master
fi
fi
2015-10-21 17:18:38 -05:00
cd $WORK
else
echo "cloning repo $URL..."
cd $PARENTDIR
2016-03-25 16:36:33 -05:00
if [ ! -z "$BRANCH" -a "${NAME}" == "retroarch" ]; then
2017-04-15 18:33:30 -05:00
git clone "$URL" "$DIR"
2017-04-15 18:41:39 -05:00
cd $DIR
2017-04-15 18:33:30 -05:00
git checkout "$BRANCH"
2017-04-15 16:52:36 -05:00
elif [ ! -z "$GIT_BRANCH" ]; then
git clone -b "$GIT_BRANCH" "$URL" "$DIR" --depth=1
2017-04-15 16:52:36 -05:00
else
git clone -b master "$URL" "$DIR" --depth=1
2016-03-22 17:36:43 -05:00
fi
2016-03-23 12:20:23 -05:00
cd $WORK
2016-03-17 22:26:09 -05:00
if [ "${TYPE}" = "PROJECT" ]; then
BUILD="YES"
RADIR=$DIR
2016-03-17 22:26:09 -05:00
elif [ "${TYPE}" == "SUBMODULE" ]; then
cd $PARENTDIR
cd $DIR
RADIR=$DIR
echo "updating submodules..."
2016-03-21 14:13:18 -05:00
git submodule update --init --recursive
2016-05-16 00:12:49 -05:00
#git submodule foreach git pull origin master
2016-03-17 22:26:09 -05:00
BUILD="YES"
fi
cd $WORK
fi
fi
echo
2016-03-23 12:20:23 -05:00
echo RADIR=$RADIR
2016-03-17 23:13:41 -05:00
done < $RECIPE.ra
2016-03-25 16:36:33 -05:00
cd $WORK
2016-03-17 23:06:49 -05:00
}
compile_audio_filters()
{
HELPER=$1
MAKE=$2
echo "compiling audio filters"
2017-01-09 12:32:32 +01:00
cd libretro-common/audio/dsp_filters
echo "audio filter BUILD CMD: ${HELPER} ${MAKE}"
${HELPER} ${MAKE}
if [ $? -eq 0 ]; then
echo buildbot job: $jobid audio filter build success!
else
echo buildbot job: $jobid audio filter: [status: fail]!
fi
2017-01-12 21:16:08 -05:00
cd ..
cd ..
}
compile_video_filters()
{
HELPER=$1
MAKE=$2
echo "compiling video filters"
cd gfx/video_filters
echo "audio filter BUILD CMD: ${HELPER} ${MAKE}"
${HELPER} ${MAKE}
if [ $? -eq 0 ]; then
2017-06-04 20:05:51 -05:00
echo buildbot job: $jobid video filter build success!
else
2017-06-04 20:05:51 -05:00
echo buildbot job: $jobid video filter: [status: fail]!
fi
2017-01-12 21:16:08 -05:00
cd ..
cd ..
}
2016-03-17 23:06:49 -05:00
echo "buildbot job: $jobid Building Retroarch-$PLATFORM"
echo --------------------------------------------------
echo
cd $WORK
BUILD=""
if [ "${PLATFORM}" == "osx" ] && [ "${RA}" == "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-10-21 17:18:38 -05:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 22:35:16 -05:00
git clean -xdf
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
echo
2015-03-09 05:23:17 -07:00
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2015-10-21 17:18:38 -05:00
cd pkg/apple
2016-01-14 18:43:18 -05:00
2016-12-31 14:31:30 -06:00
xcodebuild -project RetroArch.xcodeproj -target RetroArch -configuration Release | tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2015-07-03 10:40:27 -04:00
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
2015-03-09 05:23:17 -07:00
if [ -n "$LOGURL" ]; then
2017-10-20 15:12:03 -04:00
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2016-12-31 14:31:30 -06:00
xcodebuild -project RetroArch.xcodeproj -target "RetroArch Cg" -configuration Release | tee $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_CG_${PLATFORM}.log
2015-10-21 11:02:46 -05:00
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_CG_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
2015-10-21 17:18:38 -05:00
cd $WORK/$RADIR
echo "Packaging"
fi
fi
2015-10-21 17:18:38 -05:00
if [ "${PLATFORM}" == "ios" ] && [ "${RA}" == "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-10-21 17:18:38 -05:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-09-13 17:37:15 +01:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2015-10-21 17:18:38 -05:00
cd pkg/apple
2016-12-31 14:31:30 -06: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 00:28:53 -04:00
RET=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
2015-06-17 00:28:53 -04:00
ENTRY_ID=""
2015-10-21 17:18:38 -05:00
cd $WORK/$RADIR
2015-04-06 23:57:26 -05:00
2015-10-21 17:18:38 -05:00
echo "Packaging"
2015-03-24 22:15:09 -04:00
2015-10-21 17:18:38 -05:00
fi
fi
2015-03-24 22:15:09 -04:00
2015-04-16 11:40:42 -05:00
2015-10-28 18:42:23 -05:00
if [ "${PLATFORM}" == "ios9" ] && [ "${RA}" == "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-10-28 18:42:23 -05:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-10-28 18:42:23 -05:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2015-10-28 18:42:23 -05:00
cd pkg/apple
2016-12-31 14:31:30 -06:00
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
2015-10-28 18:42:23 -05:00
RET=$?
if [ $RET -eq 0 ]; then
touch $TMPDIR/built-frontend
2015-10-30 01:23:19 -05:00
cd build/Release-iphoneos
security unlock-keychain -p buildbot /Users/buildbot/Library/Keychains/login.keychain
2015-10-30 01:50:30 -05:00
codesign -fs "buildbot" RetroArch.app
2015-10-28 18:42:23 -05:00
fi
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
ENTRY_ID=""
2015-10-28 18:42:23 -05:00
cd $WORK/$RADIR
echo "Packaging"
fi
fi
2015-10-21 17:18:38 -05:00
if [ "${PLATFORM}" = "android" ] && [ "${RA}" = "YES" ]; then
2015-10-28 18:42:23 -05:00
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-03-22 17:36:43 -05:00
echo BRANCH=$BRANCH
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-10-28 18:42:23 -05:00
2016-03-17 23:06:49 -05:00
if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" ]; then
echo "buildbot job: $jobid compiling shaders"
echo
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:06:49 -05:00
git clean -xdf
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2017-04-15 17:12:40 -05:00
#${HELPER} ${MAKE} -f Makefile.griffin shaders-convert-glsl PYTHON3=$PYTHON
2015-02-25 20:32:07 -05:00
2016-03-17 23:06:49 -05:00
echo "buildbot job: $jobid processing assets"
echo
2015-02-25 20:32:07 -05:00
2016-03-17 23:06:49 -05:00
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
2015-10-21 17:18:38 -05:00
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/assets/xmb/monochrome
2015-10-21 17:18:38 -05:00
mkdir -p pkg/android/phoenix/assets/cores
mkdir -p pkg/android/phoenix/assets/info
mkdir -p pkg/android/phoenix/assets/overlays
2016-01-13 10:22:13 -05: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 17:18:38 -05: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-27 21:04:43 -05:00
mkdir -p pkg/android/phoenix/assets/filters/video
mkdir -p pkg/android/phoenix/assets/filters/audio
2016-01-12 13:36:22 -05:00
2016-03-01 23:58:42 -05:00
cp -rf media/assets/glui pkg/android/phoenix/assets/assets/
cp -rf media/assets/xmb/monochrome pkg/android/phoenix/assets/assets/xmb
2015-10-28 03:37:32 +01:00
cp -rf media/assets/zarch pkg/android/phoenix/assets/assets/
2017-03-07 00:30:00 -05:00
cp -rf media/assets/s* pkg/android/phoenix/assets/assets/
2015-10-21 17:18:38 -05:00
cp -rf media/autoconfig/* pkg/android/phoenix/assets/autoconfig/
cp -rf media/overlays/* pkg/android/phoenix/assets/overlays/
2016-01-13 10:22:13 -05: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/
2017-01-09 12:32:32 +01:00
cp -rf libretro-common/audio/dsp_filters/*.dsp pkg/android/phoenix/assets/filters/audio/
2015-11-27 21:04:43 -05:00
cp -rf gfx/video_filters/*.filt pkg/android/phoenix/assets/filters/video/
2017-04-15 18:08:24 -05:00
find pkg/android/phoenix/assets/assets/ -type d -name src -exec rm -rf {} \;
2015-11-27 21:04:43 -05:00
2016-01-13 10:22:13 -05:00
2017-04-15 18:08:24 -05:00
#cp -rf media/shaders_glsl $TMPDIR/
2016-03-02 00:11:49 -05:00
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
2015-10-21 17:18:38 -05:00
cp -rf $RARCH_DIR/info/* pkg/android/phoenix/assets/info/
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-09-13 17:37:15 +01:00
echo
2015-10-21 17:18:38 -05:00
cd pkg/android/phoenix
rm bin/*.apk
2016-02-23 18:13:07 +01:00
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2016-02-23 18:13:07 +01:00
cat << EOF > local.properties
2016-02-20 13:59:34 -05: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
2016-03-02 00:13:43 -05:00
2016-02-20 13:59:34 -05:00
EOF
2015-02-25 20:32:07 -05:00
if [ "${RELEASE}" == "NO" ]; then
python ./version_increment.py
2016-03-17 22:35:16 -05:00
else
2016-03-17 23:22:20 -05:00
git reset --hard
fi
2016-12-31 14:31:30 -06:00
ant clean | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
android update project --path . --target android-24 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
android update project --path libs/googleplay --target android-24 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
android update project --path libs/appcompat --target android-24 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
ant release | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2016-03-22 17:44:32 -05:00
if [ -z "$BRANCH" ]; then
2016-12-31 14:31:30 -06:00
cp -rv bin/retroarch-release.apk $RARCH_DIR/retroarch-release.apk | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2016-03-22 17:44:32 -05:00
cp -rv bin/retroarch-release.apk $RARCH_DIR/retroarch-release.apk
2016-03-22 18:13:33 -05:00
else
2017-07-24 12:05:01 -05:00
cp -rv bin/retroarch-release.apk $RARCH_DIR/retroarch-$BRANCH-release.apk | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
cp -rv bin/retroarch-release.apk $RARCH_DIR/retroarch-$BRANCH-release.apk
2016-03-22 17:44:32 -05:00
fi
RET=$?
buildbot_handle_message $RET $ENTRY_ID $1 $jobid $ERROR
2016-02-23 18:19:16 +01:00
if [ $RET -eq 0 ]; then
touch $TMPDIR/built-frontend
2016-02-09 19:30:13 -05:00
fi
ENTRY_ID=""
2015-02-25 20:32:07 -05:00
fi
fi
2015-10-23 02:22:01 -05:00
if [ "${PLATFORM}" = "MINGW64" ] || [ "${PLATFORM}" = "MINGW32" ] || [ "${PLATFORM}" = "windows" ] && [ "${RA}" = "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-03-07 16:08:46 -05:00
2015-10-21 17:18:38 -05:00
echo
echo
2016-03-17 23:10:46 -05:00
2015-10-21 17:18:38 -05:00
if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" ]; then
2017-01-12 21:16:08 -05:00
cd $RADIR
2017-01-12 21:34:15 -05:00
RADIR=$PWD
2017-06-04 20:05:51 -05:00
echo RetroArch Directory: $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-03-07 16:51:20 -05:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
compile_audio_filters ${HELPER} ${MAKE}
2017-01-12 21:34:15 -05:00
cd $RADIR
compile_video_filters ${HELPER} ${MAKE}
2017-01-12 21:34:15 -05:00
cd $RADIR
2015-03-10 21:38:12 -05:00
2015-10-21 17:18:38 -05:00
echo "configuring..."
echo "configure command: $CONFIGURE $ARGS"
${CONFIGURE} ${ARGS}
2015-03-10 21:38:12 -05:00
2015-10-21 17:18:38 -05:00
echo "cleaning up..."
2016-08-27 22:49:49 -05:00
echo "CLEANUP CMD: ${HELPER} ${MAKE} clean"
${HELPER} ${MAKE} clean
2016-12-31 14:31:30 -06:00
2016-06-04 19:56:19 -05:00
rm -rf windows
mkdir -p windows
2015-03-10 21:38:12 -05:00
2015-10-21 17:18:38 -05:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid retroarch cleanup success!
2015-10-21 17:18:38 -05:00
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid retroarch cleanup failed!
2015-03-10 21:38:12 -05:00
fi
2015-10-21 17:18:38 -05:00
if [ $? -eq 0 ]; then
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid retroarch configure success!
2015-03-10 21:38:12 -05:00
else
2016-01-14 18:32:14 -05:00
echo buildbot job: $jobid retroarch configure failed!
2015-03-10 21:38:12 -05:00
fi
2015-10-21 17:18:38 -05:00
echo "building..."
2016-08-27 22:49:49 -05:00
echo "BUILD CMD: ${HELPER} ${MAKE} -j${JOBS}"
2016-12-31 14:31:30 -06:00
${HELPER} ${MAKE} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2017-03-14 00:16:57 -07:00
if [ -n ${CUSTOM_BUILD} ]; then
${CUSTOM_BUILD} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
fi
2015-10-21 17:18:38 -05:00
strip -s retroarch.exe
2017-03-15 07:22:17 -07:00
cp -v retroarch.exe.manifest windows/retroarch.exe.manifest 2>/dev/null
2016-12-31 14:31:30 -06:00
cp -v retroarch.exe windows/retroarch.exe | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2016-06-04 11:27:25 -05:00
cp -v retroarch.exe windows/retroarch.exe
2016-12-31 14:31:30 -06:00
2016-06-04 19:47:00 -05:00
status=$?
2016-06-04 19:45:36 -05:00
echo $status
2015-06-17 00:28:53 -04:00
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $status $ENTRY_ID retroarch $jobid $ERROR
2016-06-04 19:45:36 -05:00
if [ $status -eq 0 ]; then
2016-12-28 11:20:06 -05:00
touch $TMPDIR/built-frontend
echo buildbot job: $MESSAGE >>$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2016-06-04 11:27:25 -05:00
2016-08-27 22:49:49 -05:00
${HELPER} ${MAKE} clean
2016-12-31 14:53:13 -06:00
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch-debug" http://buildbot.fiveforty.net/build_entry/`
fi
2017-03-15 07:22:17 -07:00
${HELPER} ${MAKE} -j${JOBS} DEBUG=1 GL_DEBUG=1 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_DEBUG_${PLATFORM}.log
for i in $(seq 3); do for bin in $(ntldd -R *exe | grep -i mingw | cut -d">" -f2 | cut -d" " -f2); do cp -vu "$bin" . ; done; done
2016-12-24 16:12:37 -05:00
if [ -n ${CUSTOM_BUILD_DEBUG} ]; then
2017-03-15 07:22:17 -07:00
${CUSTOM_BUILD_DEBUG} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_DEBUG_${PLATFORM}.log
fi
2017-03-15 07:22:17 -07:00
cp -v retroarch.exe.manifest windows/retroarch_debug.exe.manifest 2>/dev/null
cp -v retroarch.exe windows/retroarch_debug.exe | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_DEBUG_${PLATFORM}.log
2016-12-24 12:11:13 -05:00
cp -v *.dll windows/
2016-06-04 13:09:58 -05:00
cp -v retroarch.exe windows/retroarch_debug.exe
status=$?
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_DEBUG_${PLATFORM}.log
buildbot_handle_message $status $ENTRY_ID retroarch $jobid $ERROR
if [ $status -eq 0 ]; then
2016-06-04 11:27:25 -05:00
MESSAGE="retroarch debug: [status: done] [$jobid]"
echo buildbot job: $MESSAGE >>$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_DEBUG_${PLATFORM}.log
2017-03-15 07:22:17 -07:00
buildbot_log "$MESSAGE"
else
MESSAGE="retroarch-debug: [status: fail] [$jobid]"
echo buildbot job: $MESSAGE >>$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_DEBUG_${PLATFORM}.log
2016-06-04 11:27:25 -05:00
fi
2017-03-15 07:22:17 -07:00
ENTRY_ID=""
2015-10-21 17:18:38 -05:00
echo "Packaging"
cp retroarch.cfg retroarch.default.cfg
mkdir -p windows/filters
mkdir -p windows/filters/video
mkdir -p windows/filters/audio
2016-04-30 14:41:08 -05:00
mkdir -p windows/saves
mkdir -p windows/states
mkdir -p windows/system
2016-05-01 12:35:17 -05:00
mkdir -p windows/screenshots
2016-04-30 07:15:44 -05:00
2015-10-21 17:18:38 -05:00
cp -v retroarch.default.cfg windows/
2016-06-04 11:27:25 -05:00
cp -v tools/*.exe windows/
2017-01-09 12:32:32 +01:00
cp -rf libretro-common/audio/dsp_filters/*.dll windows/filters/audio
cp -rf libretro-common/audio/dsp_filters/*.dsp windows/filters/audio
2015-10-21 17:18:38 -05:00
cp -rf gfx/video_filters/*.dll windows/filters/video
cp -rf gfx/video_filters/*.filt windows/filters/video
2015-10-28 18:42:23 -05:00
2015-09-13 17:52:57 +01:00
else
MESSAGE="retroarch: [status: fail] [$jobid]"
ENTRY_ID=""
echo buildbot job: $MESSAGE >>$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2015-03-10 21:38:12 -05:00
fi
fi
fi
2015-10-21 17:18:38 -05:00
if [ "${PLATFORM}" = "psp1" ] && [ "${RA}" = "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-09-07 20:39:28 +01:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
2016-12-31 14:31:30 -06:00
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-09-07 20:39:28 +01:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2015-09-13 17:54:11 +01:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.a .
2015-09-07 20:39:28 +01:00
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh psp1 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
if [ $RET -eq 0 ]; then
2016-12-28 11:20:06 -05:00
touch $TMPDIR/built-frontend
2015-09-07 20:39:28 +01:00
fi
ENTRY_ID=""
2015-09-07 20:39:28 +01:00
echo "Packaging"
2016-01-14 18:32:14 -05:00
2015-10-21 17:18:38 -05:00
cd $WORK/$RADIR
2015-09-07 20:39:28 +01:00
cp retroarch.cfg retroarch.default.cfg
2015-10-21 17:18:38 -05:00
mkdir -p pkg/psp1/
2016-09-04 00:00:22 -05:00
mkdir -p pkg/psp1/info
2016-09-03 23:59:16 -05:00
cp -v $RARCH_DIST_DIR/../info/*.info pkg/psp1/info/
2015-10-21 17:18:38 -05:00
2015-09-07 20:39:28 +01:00
fi
fi
2015-10-21 17:18:38 -05:00
if [ "${PLATFORM}" == "wii" ] && [ "${RA}" == "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-10-21 17:18:38 -05:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
touch $TMPDIR/built-frontend
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-10-21 17:18:38 -05:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2016-03-19 12:32:42 -05:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.a .
2015-10-21 17:18:38 -05:00
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh wii 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
ENTRY_ID=""
2015-10-21 17:18:38 -05:00
echo "Packaging"
2016-01-14 18:32:14 -05:00
2016-03-19 12:32:42 -05:00
cd $WORK/$RADIR
2015-10-21 17:18:38 -05:00
cp retroarch.cfg retroarch.default.cfg
2016-03-19 12:32:42 -05:00
mkdir -p pkg/wii/
2015-10-21 17:18:38 -05:00
mkdir -p pkg/wii/cheats
mkdir -p pkg/wii/remaps
2016-03-19 12:32:42 -05:00
mkdir -p pkg/wii/overlays
2016-07-16 20:40:01 -05:00
cp -v $RARCH_DIST_DIR/../info/*.info pkg/
2015-10-21 17:18:38 -05:00
cp -rf media/overlays/wii/* pkg/wii/overlays
fi
fi
2016-11-07 15:53:03 -05:00
if [ "${PLATFORM}" == "wiiu" ] && [ "${RA}" == "YES" ]; then
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-11-07 15:53:03 -05:00
buildbot_pull
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
touch $TMPDIR/built-frontend
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-11-07 15:53:03 -05:00
git clean -xdf
echo "buildbot job: $jobid Building"
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2016-11-07 15:53:03 -05:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.a .
2016-11-07 16:21:48 -05:00
cp -v $RARCH_DIST_DIR/../info/*.info .
2016-11-07 16:25:51 -05:00
cp -v ../media/assets/pkg/wiiu/*.png .
2016-11-07 15:53:03 -05:00
2017-08-07 18:49:14 -05:00
time sh ./wiiu-cores.sh 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
ENTRY_ID=""
2016-11-07 15:53:03 -05:00
echo "Packaging"
cd $WORK/$RADIR
fi
fi
2015-10-21 17:18:38 -05:00
if [ "${PLATFORM}" == "ngc" ] && [ "${RA}" == "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-09-15 00:25:58 +01:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
2015-09-15 19:38:35 +01:00
touch $TMPDIR/built-frontend
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-09-15 00:25:58 +01:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2015-09-15 00:25:58 +01:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.a .
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh ngc 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
ENTRY_ID=""
2015-09-15 00:25:58 +01:00
echo "Packaging"
2016-01-14 18:32:14 -05:00
2016-03-19 12:32:42 -05:00
cd $WORK/$RADIR
2015-09-15 00:25:58 +01:00
cp retroarch.cfg retroarch.default.cfg
2015-10-21 17:18:38 -05:00
mkdir -p pkg/ngc/
mkdir -p pkg/ngc/cheats
mkdir -p pkg/ngc/remaps
mkdir -p pkg/ngc/overlays
2016-07-16 20:40:01 -05:00
cp -v $RARCH_DIST_DIR/../info/*.info pkg/
cp -rf media/overlays/ngc/* pkg/ngc/overlays
2015-09-15 00:25:58 +01:00
fi
fi
2015-10-21 17:18:38 -05:00
if [ "${PLATFORM}" == "ctr" ] && [ "${RA}" == "YES" ]; then
2016-03-17 23:22:20 -05:00
buildbot_pull
2016-03-23 12:28:58 -05:00
echo WORKINGDIR=$PWD $WORK
2016-03-23 12:27:48 -05:00
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2015-10-19 14:47:52 -05:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-10-19 14:47:52 -05:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2015-10-21 17:18:38 -05:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.a .
2015-10-19 14:47:52 -05:00
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh ctr 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
ENTRY_ID=""
2015-10-19 14:47:52 -05:00
cd $WORK/$RADIR
2016-03-23 12:28:58 -05:00
echo $PWD
2015-10-19 14:47:52 -05:00
echo "Packaging"
2016-01-14 18:32:14 -05:00
2015-10-21 17:18:38 -05:00
cp retroarch.cfg retroarch.default.cfg
2015-10-19 14:47:52 -05:00
2016-03-23 12:27:48 -05:00
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch
2016-10-08 00:14:17 +01:00
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/cores
2016-10-08 06:16:45 +01:00
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/cores/info
2016-03-23 12:27:48 -05:00
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/remaps
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/cheats
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/filters
2016-03-23 12:35:32 -05:00
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/filters/audio
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/filters/video
2016-10-08 06:16:45 +01:00
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/database
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/database/rdb
mkdir -p $WORK/$RADIR/pkg/3ds/retroarch/database/cursors
2016-10-08 00:14:17 +01:00
2016-03-23 12:42:31 -05:00
cp -v $WORK/$RADIR/gfx/video_filters/*.filt $WORK/$RADIR/pkg/3ds/retroarch/filters/video/
2017-01-09 12:32:32 +01:00
cp -v $WORK/$RADIR/libretro-common/audio/dsp_filters/*.dsp $WORK/$RADIR/pkg/3ds/retroarch/filters/audio/
2016-10-08 00:14:17 +01:00
cp -v $RARCH_DIST_DIR/../info/*.info $WORK/$RADIR/pkg/3ds/retroarch/cores/info/
2016-10-08 06:16:45 +01:00
cp -v $WORK/$RADIR/media/libretrodb/rdb/*.rdb $WORK/$RADIR/pkg/3ds/retroarch/database/rdb/
cp -v $WORK/$RADIR/media/libretrodb/cursors/*.dbc $WORK/$RADIR/pkg/3ds/retroarch/database/cursors/
convert_xmb_assets $WORK/$RADIR/media/assets/xmb $WORK/$RADIR/pkg/3ds/retroarch/media/xmb 64x32! 400x240! 90
2015-10-19 14:47:52 -05:00
fi
fi
2015-10-21 17:18:38 -05:00
if [ "${PLATFORM}" == "vita" ] && [ "${RA}" == "YES" ]; then
2016-03-17 23:22:20 -05:00
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-03-17 23:22:20 -05:00
buildbot_pull
2015-10-21 16:57:27 -05:00
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
touch $TMPDIR/built-frontend
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-03-17 23:16:10 -05:00
git clean -xdf
2016-01-14 18:32:14 -05:00
echo "buildbot job: $jobid Building"
2015-10-21 16:57:27 -05:00
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2015-10-21 17:18:38 -05:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.a .
2016-08-28 19:38:39 -05:00
cp -v $RARCH_DIST_DIR/arm/*.a .
2015-10-21 16:57:27 -05:00
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh vita 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
ENTRY_ID=""
2015-10-21 16:57:27 -05:00
echo "Packaging"
2016-01-14 18:32:14 -05:00
2016-03-19 12:32:42 -05:00
cd $WORK/$RADIR
2015-10-21 17:18:38 -05:00
cp retroarch.cfg retroarch.default.cfg
2015-10-21 16:57:27 -05:00
2015-10-21 17:18:38 -05: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 16:57:27 -05:00
fi
fi
if [ "${PLATFORM}" == "ps3" ] && [ "${RA}" == "YES" ]; then
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
buildbot_pull
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
touch $TMPDIR/built-frontend
2017-01-12 21:16:08 -05:00
cd $RADIR
git clean -xdf
echo "buildbot job: $jobid Building"
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.a .
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh dex-ps3 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}_dex.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}_dex.log
buildbot_handle_message $RET $ENTRY_ID retroarch-dex $jobid $ERROR
2017-10-20 15:12:03 -04:00
if [ -n "$LOGURL" ]; then
2017-10-20 15:12:03 -04:00
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh cex-ps3 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}_cex.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}_cex.log
buildbot_handle_message $RET $ENTRY_ID retroarch-cex $jobid $ERROR
if [ -n "$LOGURL" ]; then
2017-10-20 15:12:03 -04:00
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2017-08-07 18:39:22 -05:00
time sh ./dist-cores.sh ode-ps3 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}_ode.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}_ode.log
buildbot_handle_message $RET $ENTRY_ID retroarch-ode $jobid $ERROR
ENTRY_ID=""
fi
fi
2016-08-28 19:20:32 -05:00
if [ "${PLATFORM}" = "emscripten" ] && [ "${RA}" = "YES" ]; then
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
buildbot_pull
if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" -o "${CORES_BUILT}" == "YES" ]; then
touch $TMPDIR/built-frontend
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-08-28 19:20:32 -05:00
git clean -xdf
echo "buildbot job: $jobid Building"
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
2016-08-28 19:20:32 -05:00
cd dist-scripts
rm *.a
cp -v $RARCH_DIST_DIR/*.bc .
2016-12-31 14:31:30 -06:00
echo "BUILD CMD $HELPER ./dist-cores.sh emscripten" &> $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2017-08-07 18:39:22 -05:00
$HELPER ./dist-cores.sh emscripten 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
RET=${PIPESTATUS[0]}
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $RET $ENTRY_ID retroarch $jobid $ERROR
ENTRY_ID=""
2016-08-28 19:20:32 -05:00
echo "Packaging"
cd $WORK/$RADIR
fi
fi
2016-11-23 21:20:46 -05:00
if [ "${PLATFORM}" = "unix" ]; then
echo WORKINGDIR=$PWD
echo RELEASE=$RELEASE
echo FORCE=$FORCE_RETROARCH_BUILD
echo RADIR=$RADIR
2016-12-31 14:31:30 -06:00
2016-11-23 21:20:46 -05:00
buildbot_pull
echo
echo
if [ "${BUILD}" = "YES" -o "${FORCE}" = "YES" -o "${FORCE_RETROARCH_BUILD}" == "YES" ]; then
touch $TMPDIR/built-frontend
2017-01-12 21:16:08 -05:00
cd $RADIR
2016-11-23 21:20:46 -05:00
git clean -xdf
echo "buildbot job: $jobid Building"
echo
ENTRY_ID=""
if [ -n "$LOGURL" ]; then
ENTRY_ID=`curl -X POST -d type="start" -d master_log="$MASTER_LOG_ID" -d platform="$jobid" -d name="retroarch" http://buildbot.fiveforty.net/build_entry/`
fi
compile_audio_filters ${HELPER} ${MAKE}
2017-01-13 23:42:11 -05:00
cd $RADIR
compile_video_filters ${HELPER} ${MAKE}
2017-01-13 23:42:11 -05:00
cd $RADIR
2016-11-23 21:20:46 -05:00
echo "configuring..."
echo "configure command: $CONFIGURE $ARGS"
${CONFIGURE} ${ARGS}
echo "cleaning up..."
echo "CLEANUP CMD: ${HELPER} ${MAKE} clean"
${HELPER} ${MAKE} clean
2016-12-31 14:31:30 -06:00
2016-11-23 21:20:46 -05:00
if [ $? -eq 0 ]; then
echo buildbot job: $jobid retroarch cleanup success!
else
echo buildbot job: $jobid retroarch cleanup failed!
fi
if [ $? -eq 0 ]; then
echo buildbot job: $jobid retroarch configure success!
else
echo buildbot job: $jobid retroarch configure failed!
fi
echo "building..."
echo "BUILD CMD: ${HELPER} ${MAKE} -j${JOBS}"
2016-12-31 14:31:30 -06:00
${HELPER} ${MAKE} -j${JOBS} 2>&1 | tee -a $TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2016-11-23 21:20:46 -05:00
status=$?
echo $status
ERROR=$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
buildbot_handle_message $status $ENTRY_ID retroarch $jobid $ERROR
2016-11-23 21:20:46 -05:00
if [ $status -eq 0 ]; then
MESSAGE="retroarch: [status: done] [$jobid]"
echo buildbot job: $MESSAGE >>$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2016-11-23 21:20:46 -05:00
echo "Packaging"
else
MESSAGE="retroarch: [status: fail] [$jobid]"
echo buildbot job: $MESSAGE >>$TMPDIR/log/${BOT}/${LOGDATE}/${LOGDATE}_RetroArch_${PLATFORM}.log
2016-11-23 21:20:46 -05:00
fi
fi
fi
2015-09-07 20:39:28 +01:00
PATH=$ORIGPATH