Merge pull request #152 from fr500/master

Android buildbot
This commit is contained in:
Twinaphex 2014-12-18 05:12:07 +01:00
commit 340ca84ac3
4 changed files with 165 additions and 4 deletions

89
buildbot-script Normal file
View File

@ -0,0 +1,89 @@
#!/bin/sh
cd buildbot_ndk
rm *.log
git pull
time PLATFORM=ndk ./libretro-buildbot-recipe.sh recipes/recipes-android | tee ndk-build.log
echo
echo
RA_DIR=$(pwd)/retroarch/android/
cd $RA_DIR
mkdir pkg
cd pkg
mkdir "$(date +%F)_cores" "$(date +%F)_cores"
cp -Rv ../../../dist/android/* "$(date +%F)_cores"
cp -v ../../../ndk-build.log "$(date +%F)_RetroArch.log"
cp -v ../phoenix/bin/retroarch-debug.apk "$(date +%F)_RetroArch.apk"
find . -type f -name '*.so' -exec zip '{}'.zip '{}' \;
rsync --progress * user@host:/home/buildbot/www/nightly/android/
cd
echo
echo
cd buildbot_x64
rm *.log
git pull
time ./libretro-buildbot-recipe.sh recipes/recipes.win-mingw64-seh | tee win-mingw64-seh-build.log
echo
echo
time ./libretro-buildbot-recipe.sh recipes/recipes.win-mingw64-sjlj | tee win-mingw64-sjlj-build.log
echo
echo
RA_DIR=$(pwd)/packages_x64/$(date +%F)_cores
mkdir $RA_DIR -p
cd $RA_DIR
cp -v ../../dist/win_x64/*.dll .
cp -v ../../dist/info/*.info .
cp -v ../../win-mingw64*.log .
7z u -mx9 "${RA_DIR}.7z" *
rsync --progress ../*.7z user@host:/home/buildbot/www/nightly/win-x86_64
cd
echo
echo
cd buildbot_x86
rm *.log
git pull
time ./libretro-buildbot-recipe.sh recipes/recipes.win-mingw32-dw2 | tee win-mingw32-dw2-build.log
echo
echo
time ./libretro-buildbot-recipe.sh recipes/recipes.win-mingw32-sjlj | tee win-mingw32-sjlj-build.log
echo
echo
RA_DIR=$(pwd)/packages_x86/$(date +%F)_cores
mkdir $RA_DIR -p
cd $RA_DIR
cp -v ../../dist/win_x86/*.dll .
cp -v ../../dist/info/*.info .
cp -v ../../win-mingw32*.log .
7z u -mx9 "${RA_DIR}.7z" *
rsync --progress ../*.7z user@host:/home/buildbot/www/nightly/win-x86
cd
echo
echo
cd buildbot_psp
rm *.log
git pull
time SUFFIX=_psp1 PLATFORM=psp1 ./libretro-buildbot-recipe.sh recipes/recipes.pspsdk | tee psp-build.log
echo
echo
RA_DIR=$(pwd)/retroarch/psp1/pkg/
cd $RA_DIR
cp -v ../../../dist/info/fceumm_libretro.info ../../../dist/info/fmsx_libretro.info ../../../dist/info/gambatte_libretro.info ../../../dist/info/mednafen_pce_fast_libretro.info ../../../dist/info/nxengine_libretro.info ../../../dist/info/prboom_libretro.info ../../../dist/info/tempgba_libretro.info ./cores/
cp -v ../../../psp*.log .
7z u -mx9 "$(date +%F)_RetroArch.7z" *
rsync --progress *.7z user@host:/home/buildbot/www/nightly/psp
cd
echo
echo

View File

@ -70,7 +70,16 @@ if [ -z "$RARCH_DIST_DIR" ]; then
fi
mkdir -p "$RARCH_DIST_DIR"
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
if [ "$HOST_CC" ]; then
CC="${HOST_CC}-gcc"
CXX="${HOST_CC}-g++"
@ -208,6 +217,60 @@ build_libretro_generic_makefile() {
}
build_libretro_generic_jni() {
NAME=$1
DIR=$2
SUBDIR=$3
MAKEFILE=$4
PLATFORM=$5
ARGS=$6
cd $DIR
cd $SUBDIR
if [ -z "${NOCLEAN}" ];
then
echo "cleaning up..."
echo "cleanup command: ${NDK} -j${JOBS} ${ARGS} clean"
${NDK} -j${JOBS} ${ARGS} clean
if [ $? -eq 0 ];
then
echo success!
else
echo error while cleaning up
fi
fi
for a in "${ABIS[@]}"; do
echo "compiling for ${a}..."
if [ -z "${ARGS}" ]
then
echo "buid command: ${NDK} -j${JOBS} APP_ABI=${a}"
${NDK} -j${JOBS} APP_ABI=${a}
else
echo "buid command: ${NDK} -j${JOBS} APP_ABI=${a} ${ARGS} "
${NDK} -j${JOBS} APP_ABI=${a} ${ARGS}
fi
done
if [ $? -eq 0 ];
then
echo success!
for a in "${ABIS[@]}"; do
cp -v ../obj/local/${a}/libretro.${FORMAT_EXT} $RARCH_DIST_DIR/${a}/${1}_libretro${FORMAT}.${FORMAT_EXT}
done
else
echo error while compiling $1
fi
}
build_libretro_generic_gl_makefile() {
@ -500,6 +563,8 @@ while read line; do
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" ]; then
build_libretro_bsnes $NAME $DIR "${ARGS}" $MAKEFILE ${FORMAT_COMPILER_TARGET} ${CXX11}
@ -625,7 +690,7 @@ then
fi
if [ "${PLATFORM}" == "ndk" ];
if [ "${PLATFORM}" == "android" ];
then
while read line; do
@ -750,11 +815,13 @@ then
cd android/phoenix
rm bin/*.apk
ndk-build.cmd clean
ndk-build.cmd -j8
android.bat update project --path . --target android-21
android.bat update project --path libs/googleplay --target android-21
android.bat update project --path libs/appcompat --target android-21
ant clean
ant debug
fi

View File

@ -51,6 +51,10 @@ case "$platform" in
FORMAT_EXT='a'
FORMAT_COMPILER_TARGET=psp1
DIST_DIR=psp1;;
*android*)
FORMAT_EXT='so'
FORMAT_COMPILER_TARGET=android
DIST_DIR=android;;
*)
FORMAT_EXT='so'
FORMAT_COMPILER_TARGET=unix

View File

@ -2,6 +2,7 @@ ANDROID_HOME /c/Toolchains/android/
NDK_ROOT /c/Toolchains/android/ndk/
ANDROID_NDK /c/Toolchains/android/ndk/
PATH /c/Toolchains/android/ant/bin:/c/Toolchains/android/ndk:/c/Toolchains/android/tools:/c/Toolchains/jdk/bin:/c/Toolchains/tools/cg/bin
PLATFORM ndk
PLATFORM android
MAKE make
NDK ndk-build.cmd
PYTHON /c/Toolchains/python3/python.exe