[jenkins/buildsteps] - add scripts for android x86
authorMemphiz <memphis@machzwo.de>
Fri, 11 Oct 2013 14:25:02 +0000 (16:25 +0200)
committerMemphiz <memphis@machzwo.de>
Sat, 12 Oct 2013 10:18:26 +0000 (12:18 +0200)
tools/buildsteps/README
tools/buildsteps/androidx86/configure-depends [new file with mode: 0644]
tools/buildsteps/androidx86/configure-xbmc [new file with mode: 0644]
tools/buildsteps/androidx86/make-depends [new file with mode: 0644]
tools/buildsteps/androidx86/make-xbmc [new file with mode: 0644]
tools/buildsteps/androidx86/package [new file with mode: 0644]
tools/buildsteps/androidx86/prepare-depends [new file with mode: 0644]
tools/buildsteps/androidx86/prepare-xbmc [new file with mode: 0644]
tools/buildsteps/defaultenv

index 68c5354..782e2c4 100644 (file)
@@ -11,5 +11,6 @@ $XBMC_DEPENDS_ROOT - root for installing the xbmc build depends and toolchain he
 Additional ENV variables might be specified by the buildnodes. For android buildslaves these are:
 
 TOOLCHAIN - the used toolchain dir
+TOOLCHAIN_X86 - this is the toolchain dir for x86 toolchain of android. This needs this extra var for beeing able to specify both toolchains (arm & x86) at the same slave.
 NDK_PATH  - the path to the android native ndk
-SDK_PATH  - the path to the android sdk
\ No newline at end of file
+SDK_PATH  - the path to the android sdk
diff --git a/tools/buildsteps/androidx86/configure-depends b/tools/buildsteps/androidx86/configure-depends
new file mode 100644 (file)
index 0000000..4213455
--- /dev/null
@@ -0,0 +1,15 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+  cd $WORKSPACE/tools/depends;./configure \
+    --with-tarballs=$TARBALLS \
+    --host=i686-linux-android \
+    --with-sdk-path=$SDK_PATH \
+    --with-ndk=$NDK_PATH \
+    $(if [ "$SDK_VERSION" != "Default" ]; then echo --with-sdk=android-$SDK_VERSION;fi) \
+    --with-toolchain=$TOOLCHAIN_X86 \
+    --prefix=$XBMC_DEPENDS_ROOT
+fi
diff --git a/tools/buildsteps/androidx86/configure-xbmc b/tools/buildsteps/androidx86/configure-xbmc
new file mode 100644 (file)
index 0000000..afdd82a
--- /dev/null
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
diff --git a/tools/buildsteps/androidx86/make-depends b/tools/buildsteps/androidx86/make-depends
new file mode 100644 (file)
index 0000000..2deb44a
--- /dev/null
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+  cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && tagSuccessFulBuild .
+fi
+
diff --git a/tools/buildsteps/androidx86/make-xbmc b/tools/buildsteps/androidx86/make-xbmc
new file mode 100644 (file)
index 0000000..738656f
--- /dev/null
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS
diff --git a/tools/buildsteps/androidx86/package b/tools/buildsteps/androidx86/package
new file mode 100644 (file)
index 0000000..d95392b
--- /dev/null
@@ -0,0 +1,10 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make apk
+
+#rename for upload
+#e.x. xbmc-20130314-8c2fb31-Frodo-x86.apk
+UPLOAD_FILENAME="xbmc-$(getBuildRevDateStr)-x86.apk"
+mv xbmcapp-x86-*.apk $UPLOAD_FILENAME
diff --git a/tools/buildsteps/androidx86/prepare-depends b/tools/buildsteps/androidx86/prepare-depends
new file mode 100644 (file)
index 0000000..8aabe48
--- /dev/null
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+cd $WORKSPACE;git clean -xfd -e "tools/depends"
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+  #clean up the rest too
+  cd $WORKSPACE;git clean -xfd
+  cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/androidx86/prepare-xbmc b/tools/buildsteps/androidx86/prepare-xbmc
new file mode 100644 (file)
index 0000000..020bc03
--- /dev/null
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=android
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on android
index 5d75149..eb67fef 100644 (file)
@@ -67,14 +67,14 @@ fi
 
 #helper functions
 
-#hash a dir based on the git revision, SDK_PATH, NDK_PATH, SDK_VERSION, TOOLCHAIN and XBMC_DEPENDS_ROOT
+#hash a dir based on the git revision, SDK_PATH, NDK_PATH, SDK_VERSION, TOOLCHAIN TOOLCHAIN_X86 (for droidx86) and XBMC_DEPENDS_ROOT
 function getBuildHash ()
 {
   local checkPath
   checkPath="$1"
   local hashStr
   hashStr="$(git rev-list HEAD --max-count=1  -- $checkPath)"
-  hashStr="$hashStr $SDK_PATH $NDK_PATH $SDK_VERSION $TOOLCHAIN $XBMC_DEPENDS_ROOT"
+  hashStr="$hashStr $SDK_PATH $NDK_PATH $SDK_VERSION $TOOLCHAIN $TOOLCHAIN_X86 $XBMC_DEPENDS_ROOT"
   echo $hashStr
 }