mirror of
https://github.com/libretro/libretro-super
synced 2025-02-03 20:54:12 +00:00
libretro-buildbot-recipe.sh: Handle disabled cores with fewer nested tests.
This commit is contained in:
parent
a9325132e7
commit
8f37982927
@ -577,98 +577,98 @@ while read line; do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${ENABLED}" = "YES" ]; then
|
[ "${ENABLED}" != "YES" ] && { echo "${NAME} is disabled, skipping"; continue; }
|
||||||
echo -ne "buildbot job started at: "
|
|
||||||
date
|
|
||||||
echo
|
|
||||||
echo "buildbot job: $jobid processing $NAME"
|
|
||||||
echo --------------------------------------------------
|
|
||||||
echo Variables:
|
|
||||||
echo URL $URL
|
|
||||||
echo ENABLED $ENABLED
|
|
||||||
echo COMMAND $COMMAND
|
|
||||||
echo MAKEFILE $MAKEFILE
|
|
||||||
echo DIR $DIR
|
|
||||||
echo SUBDIR $SUBDIR
|
|
||||||
echo
|
|
||||||
echo
|
|
||||||
|
|
||||||
BUILD="NO"
|
echo -ne "buildbot job started at: "
|
||||||
BUILD_ORIG=$BUILD
|
date
|
||||||
FORCE_ORIG=$FORCE
|
echo
|
||||||
|
echo "buildbot job: $jobid processing $NAME"
|
||||||
|
echo --------------------------------------------------
|
||||||
|
echo Variables:
|
||||||
|
echo URL $URL
|
||||||
|
echo ENABLED $ENABLED
|
||||||
|
echo COMMAND $COMMAND
|
||||||
|
echo MAKEFILE $MAKEFILE
|
||||||
|
echo DIR $DIR
|
||||||
|
echo SUBDIR $SUBDIR
|
||||||
|
echo
|
||||||
|
echo
|
||||||
|
|
||||||
if [ ! -d "${DIR}/.git" ] || [ "${CLEANUP}" = "YES" ]; then
|
BUILD="NO"
|
||||||
rm -rfv -- "$DIR"
|
BUILD_ORIG=$BUILD
|
||||||
echo "cloning repo $URL..."
|
FORCE_ORIG=$FORCE
|
||||||
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
|
|
||||||
BUILD="YES"
|
|
||||||
else
|
|
||||||
if [ -f "$DIR/.forcebuild" ]; then
|
|
||||||
echo "found $DIR/.forcebuild file, building $NAME"
|
|
||||||
BUILD="YES"
|
|
||||||
fi
|
|
||||||
|
|
||||||
HEAD="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" || \
|
if [ ! -d "${DIR}/.git" ] || [ "${CLEANUP}" = "YES" ]; then
|
||||||
{ echo "git directory broken, removing $DIR and skipping $NAME."; \
|
rm -rfv -- "$DIR"
|
||||||
rm -rfv -- "$DIR" && continue; }
|
echo "cloning repo $URL..."
|
||||||
echo "pulling changes from repo $URL..."
|
git clone --depth=1 -b "$GIT_BRANCH" "$URL" "$DIR"
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" pull
|
BUILD="YES"
|
||||||
|
else
|
||||||
if [ "$HEAD" = "$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
|
if [ -f "$DIR/.forcebuild" ]; then
|
||||||
BUILD="NO"
|
echo "found $DIR/.forcebuild file, building $NAME"
|
||||||
else
|
|
||||||
echo "resetting repo state $URL..."
|
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" reset --hard FETCH_HEAD
|
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" clean -xdf
|
|
||||||
BUILD="YES"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
CURRENT_BRANCH="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse --abbrev-ref HEAD)"
|
|
||||||
|
|
||||||
if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ] && [ "${TRAVIS:-0}" = "0" ]; then
|
|
||||||
echo "Changing to the branch ${GIT_BRANCH} from ${CURRENT_BRANCH}"
|
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" remote set-branches origin "${GIT_BRANCH}"
|
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" fetch --depth 1 origin "${GIT_BRANCH}"
|
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" checkout "${GIT_BRANCH}"
|
|
||||||
git --work-tree="$DIR" --git-dir="$DIR/.git" branch -D "${CURRENT_BRANCH}"
|
|
||||||
BUILD="YES"
|
BUILD="YES"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if git config --file "$DIR/.gitmodules" --name-only --get-regexp path 2>&1 >/dev/null; then
|
HEAD="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" || \
|
||||||
git --work-tree="." --git-dir=".git" -C "$DIR" submodule update --init --recursive
|
{ echo "git directory broken, removing $DIR and skipping $NAME."; \
|
||||||
fi
|
rm -rfv -- "$DIR" && continue; }
|
||||||
|
echo "pulling changes from repo $URL..."
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" pull
|
||||||
|
|
||||||
for core in 81 emux_nes emux_sms fuse gw mgba; do
|
if [ "$HEAD" = "$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse HEAD)" ] && [ "${BUILD}" != "YES" ]; then
|
||||||
if [ "${PREVCORE}" = "$core" ] && [ "${PREVBUILD}" = "YES" ] && [ "${NAME}" = "$core" ]; then
|
BUILD="NO"
|
||||||
FORCE="YES"
|
|
||||||
BUILD="YES"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "${BUILD}" = "YES" ] || [ "${FORCE}" = "YES" ]; then
|
|
||||||
touch $TMPDIR/built-cores
|
|
||||||
CORES_BUILT=YES
|
|
||||||
echo "buildbot job: building $NAME"
|
|
||||||
case "${COMMAND}" in
|
|
||||||
BSNES|CMAKE|GENERIC|GENERIC_GL|HIGAN )
|
|
||||||
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" ;;
|
|
||||||
BSNES_JNI|GENERIC_JNI )
|
|
||||||
build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" ;;
|
|
||||||
GENERIC_ALT ) build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" ;;
|
|
||||||
LEIRADEL ) build_libretro_leiradel_makefile $NAME $DIR $SUBDIR $MAKEFILE ${PLATFORM} "${ARGS}" ;;
|
|
||||||
* ) : ;;
|
|
||||||
esac
|
|
||||||
echo "Cleaning repo state after build $URL..."
|
|
||||||
git --work-tree="${BASE_DIR}/${DIR}" --git-dir="${BASE_DIR}/${DIR}/.git" clean -xdf
|
|
||||||
else
|
else
|
||||||
echo "buildbot job: building $NAME up-to-date"
|
echo "resetting repo state $URL..."
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" reset --hard FETCH_HEAD
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" clean -xdf
|
||||||
|
BUILD="YES"
|
||||||
fi
|
fi
|
||||||
echo
|
|
||||||
echo -ne "buildbot job finished at: "
|
|
||||||
date
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
CURRENT_BRANCH="$(git --work-tree="$DIR" --git-dir="$DIR/.git" rev-parse --abbrev-ref HEAD)"
|
||||||
|
|
||||||
|
if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ] && [ "${TRAVIS:-0}" = "0" ]; then
|
||||||
|
echo "Changing to the branch ${GIT_BRANCH} from ${CURRENT_BRANCH}"
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" remote set-branches origin "${GIT_BRANCH}"
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" fetch --depth 1 origin "${GIT_BRANCH}"
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" checkout "${GIT_BRANCH}"
|
||||||
|
git --work-tree="$DIR" --git-dir="$DIR/.git" branch -D "${CURRENT_BRANCH}"
|
||||||
|
BUILD="YES"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if git config --file "$DIR/.gitmodules" --name-only --get-regexp path 2>&1 >/dev/null; then
|
||||||
|
git --work-tree="." --git-dir=".git" -C "$DIR" submodule update --init --recursive
|
||||||
|
fi
|
||||||
|
|
||||||
|
for core in 81 emux_nes emux_sms fuse gw mgba; do
|
||||||
|
if [ "${PREVCORE}" = "$core" ] && [ "${PREVBUILD}" = "YES" ] && [ "${NAME}" = "$core" ]; then
|
||||||
|
FORCE="YES"
|
||||||
|
BUILD="YES"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "${BUILD}" = "YES" ] || [ "${FORCE}" = "YES" ]; then
|
||||||
|
touch $TMPDIR/built-cores
|
||||||
|
CORES_BUILT=YES
|
||||||
|
echo "buildbot job: building $NAME"
|
||||||
|
case "${COMMAND}" in
|
||||||
|
BSNES|CMAKE|GENERIC|GENERIC_GL|HIGAN )
|
||||||
|
build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "${ARGS}" ;;
|
||||||
|
BSNES_JNI|GENERIC_JNI )
|
||||||
|
build_libretro_generic_jni $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" ;;
|
||||||
|
GENERIC_ALT ) build_libretro_generic_makefile $NAME $DIR $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET_ALT} "${ARGS}" ;;
|
||||||
|
LEIRADEL ) build_libretro_leiradel_makefile $NAME $DIR $SUBDIR $MAKEFILE ${PLATFORM} "${ARGS}" ;;
|
||||||
|
* ) : ;;
|
||||||
|
esac
|
||||||
|
echo "Cleaning repo state after build $URL..."
|
||||||
|
git --work-tree="${BASE_DIR}/${DIR}" --git-dir="${BASE_DIR}/${DIR}/.git" clean -xdf
|
||||||
|
else
|
||||||
|
echo "buildbot job: building $NAME up-to-date"
|
||||||
|
fi
|
||||||
|
echo
|
||||||
|
echo -ne "buildbot job finished at: "
|
||||||
|
date
|
||||||
|
|
||||||
cd "${BASE_DIR}"
|
cd "${BASE_DIR}"
|
||||||
PREVCORE=$NAME
|
PREVCORE=$NAME
|
||||||
PREVBUILD=$BUILD
|
PREVBUILD=$BUILD
|
||||||
|
Loading…
x
Reference in New Issue
Block a user