From c2275b79f810980bc493d33fdd467d67ceb2c4b3 Mon Sep 17 00:00:00 2001 From: orbea Date: Sat, 2 Dec 2017 10:55:16 -0800 Subject: [PATCH 1/4] libretro-buildbot-recipe.sh: Always use the branch in the recipe file. If the checked out branch does not match the branch name in the recipe file the script will now make a shallow fetch of the correct branch, checkout the new branch and then remove the old one. If this is done it will also build a core with the new branch. --- libretro-buildbot-recipe.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index a6e8acd7..dbd400b7 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -750,6 +750,18 @@ while read line; do cd "$DIR" + CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" + + if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ]; then + echo "Changing to the branch ${GIT_BRANCH} from ${CURRENT_BRANCH}" + git remote set-branches origin "${GIT_BRANCH}" + git fetch --depth 1 origin "${GIT_BRANCH}" + git checkout "${GIT_BRANCH}" + git branch -D "${CURRENT_BRANCH}" + BUILD="YES" + UPDATE="NO" + fi + if [ "${UPDATE}" != "NO" ]; then if [ -f .forcebuild ]; then echo "found .forcebuild file, building $NAME" From fe1db129dc27b75b6e412ffe3c130cd5ad3675c9 Mon Sep 17 00:00:00 2001 From: orbea Date: Sat, 2 Dec 2017 11:27:57 -0800 Subject: [PATCH 2/4] recipes: Use the correct branch for bsnes-libretro. The default and up to date branch is 'libretro' and not 'master'. --- recipes/apple/cores-ios-generic | 6 +++--- recipes/apple/cores-ios9-generic | 6 +++--- recipes/apple/cores-osx-x64-generic | 6 +++--- recipes/linux/cores-linux-armhf-generic | 6 +++--- recipes/linux/cores-linux-x86-generic | 6 +++--- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/recipes/apple/cores-ios-generic b/recipes/apple/cores-ios-generic index 1e42b45a..e3cd304c 100644 --- a/recipes/apple/cores-ios-generic +++ b/recipes/apple/cores-ios-generic @@ -2,9 +2,9 @@ 4do libretro-4do https://github.com/libretro/4do-libretro.git master PROJECT YES GENERIC Makefile . atari800 libretro-atari800 https://github.com/libretro/libretro-atari800.git master PROJECT YES GENERIC Makefile . bluemsx libretro-bluemsx https://github.com/libretro/blueMSX-libretro.git master PROJECT YES GENERIC Makefile.libretro . -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . accuracy -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . balanced -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . performance +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . accuracy +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . balanced +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . performance bsnes_cplusplus98 libretro-bsnes_cplusplus98 https://github.com/libretro/bsnes-libretro-cplusplus98.git master PROJECT YES GENERIC Makefile . bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . accuracy bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . balanced diff --git a/recipes/apple/cores-ios9-generic b/recipes/apple/cores-ios9-generic index 135c1fad..6bae109c 100644 --- a/recipes/apple/cores-ios9-generic +++ b/recipes/apple/cores-ios9-generic @@ -2,9 +2,9 @@ 4do libretro-4do https://github.com/libretro/4do-libretro.git master PROJECT YES GENERIC Makefile . atari800 libretro-atari800 https://github.com/libretro/libretro-atari800.git master PROJECT YES GENERIC Makefile . bluemsx libretro-bluemsx https://github.com/libretro/blueMSX-libretro.git master PROJECT YES GENERIC Makefile.libretro . -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . accuracy -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . balanced -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . performance +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . accuracy +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . balanced +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . performance bsnes_cplusplus98 libretro-bsnes_cplusplus98 https://github.com/libretro/bsnes-libretro-cplusplus98.git master PROJECT YES GENERIC Makefile . bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . accuracy bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . balanced diff --git a/recipes/apple/cores-osx-x64-generic b/recipes/apple/cores-osx-x64-generic index b4c2ca18..ae0f093b 100644 --- a/recipes/apple/cores-osx-x64-generic +++ b/recipes/apple/cores-osx-x64-generic @@ -2,9 +2,9 @@ 4do libretro-4do https://github.com/libretro/4do-libretro.git master PROJECT YES GENERIC Makefile . atari800 libretro-atari800 https://github.com/libretro/libretro-atari800.git master PROJECT YES GENERIC Makefile . bluemsx libretro-bluemsx https://github.com/libretro/blueMSX-libretro.git master PROJECT YES GENERIC Makefile.libretro . -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . accuracy -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . balanced -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . performance +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . accuracy +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . balanced +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . performance bsnes_cplusplus98 libretro-bsnes_cplusplus98 https://github.com/libretro/bsnes-libretro-cplusplus98.git master PROJECT YES GENERIC Makefile . bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . accuracy bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . balanced diff --git a/recipes/linux/cores-linux-armhf-generic b/recipes/linux/cores-linux-armhf-generic index 6dafbb61..9058d9ca 100644 --- a/recipes/linux/cores-linux-armhf-generic +++ b/recipes/linux/cores-linux-armhf-generic @@ -3,9 +3,9 @@ 4do libretro-4do https://github.com/libretro/4do-libretro.git master PROJECT YES GENERIC Makefile . atari800 libretro-atari800 https://github.com/libretro/libretro-atari800.git master PROJECT YES GENERIC Makefile . bluemsx libretro-bluemsx https://github.com/libretro/blueMSX-libretro.git master PROJECT YES GENERIC Makefile.libretro . -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . accuracy -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . balanced -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . performance +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . accuracy +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . balanced +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . performance bsnes_cplusplus98 libretro-bsnes_cplusplus98 https://github.com/libretro/bsnes-libretro-cplusplus98.git master PROJECT YES GENERIC Makefile . bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . accuracy bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . balanced diff --git a/recipes/linux/cores-linux-x86-generic b/recipes/linux/cores-linux-x86-generic index 0aaceeba..3250780b 100644 --- a/recipes/linux/cores-linux-x86-generic +++ b/recipes/linux/cores-linux-x86-generic @@ -4,9 +4,9 @@ atari800 libretro-atari800 https://github.com/libretro/libretro-atari800.git master PROJECT YES GENERIC Makefile . bluemsx libretro-bluemsx https://github.com/libretro/blueMSX-libretro.git master PROJECT YES GENERIC Makefile.libretro . bnes libretro-bnes https://github.com/libretro/bnes-libretro.git master PROJECT YES GENERIC Makefile . -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . accuracy -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . balanced -bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git master PROJECT YES BSNES Makefile . performance +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . accuracy +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . balanced +bsnes libretro-bsnes https://github.com/libretro/bsnes-libretro.git libretro PROJECT YES BSNES Makefile . performance bsnes_cplusplus98 libretro-bsnes_cplusplus98 https://github.com/libretro/bsnes-libretro-cplusplus98.git master PROJECT YES GENERIC Makefile . bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . accuracy bsnes_mercury libretro-bsnes_mercury https://github.com/libretro/bsnes-mercury.git master PROJECT YES BSNES Makefile . balanced From 0f107ce404aef1f239b78f42ef3f0a5989cc05c9 Mon Sep 17 00:00:00 2001 From: orbea Date: Sun, 3 Dec 2017 13:05:16 -0800 Subject: [PATCH 3/4] libretro-buildbot-recipe.sh: Don't remove branches if travis is running the script. --- libretro-buildbot-recipe.sh | 2 +- travis/build-long.sh | 1 + travis/build.sh | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index dbd400b7..2af8de08 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -752,7 +752,7 @@ while read line; do CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)" - if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ]; then + if [ "${GIT_BRANCH}" != "${CURRENT_BRANCH}" ] && [ "${TRAVIS:-0}" = "0" ]; then echo "Changing to the branch ${GIT_BRANCH} from ${CURRENT_BRANCH}" git remote set-branches origin "${GIT_BRANCH}" git fetch --depth 1 origin "${GIT_BRANCH}" diff --git a/travis/build-long.sh b/travis/build-long.sh index eb548a1c..36d26f9a 100755 --- a/travis/build-long.sh +++ b/travis/build-long.sh @@ -4,6 +4,7 @@ export LOGDATE=`date +%Y-%m-%d` mkdir -p /tmp/log/${LOGDATE} export BOT=. export TMPDIR=/tmp +export TRAVIS=1 export EXIT_ON_ERROR=1 # taken from https://stackoverflow.com/questions/26082444/how-to-work-around-travis-cis-4mb-output-limit diff --git a/travis/build.sh b/travis/build.sh index 8a76b27d..58fc6d53 100755 --- a/travis/build.sh +++ b/travis/build.sh @@ -4,6 +4,7 @@ export LOGDATE=`date +%Y-%m-%d` mkdir -p /tmp/log/${LOGDATE} export BOT=. export TMPDIR=/tmp +export TRAVIS=1 export EXIT_ON_ERROR=1 ./build-${PLATFORM}.sh From 548bfd810e1db8a2b9aaee6253f9bfa9f07a24ea Mon Sep 17 00:00:00 2001 From: orbea Date: Mon, 4 Dec 2017 08:26:42 -0800 Subject: [PATCH 4/4] libretro-buildbot-recipe.sh: Skip the recipe if it fails to cd to the cloned repo. --- libretro-buildbot-recipe.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libretro-buildbot-recipe.sh b/libretro-buildbot-recipe.sh index 2af8de08..a436b714 100755 --- a/libretro-buildbot-recipe.sh +++ b/libretro-buildbot-recipe.sh @@ -748,7 +748,7 @@ while read line; do UPDATE="NO" fi - cd "$DIR" + cd "$DIR" || { echo "Failed to cd to ${DIR}, skipping ${NAME}"; continue; } CURRENT_BRANCH="$(git rev-parse --abbrev-ref HEAD)"