summaryrefslogtreecommitdiffstats
path: root/tools/buildsteps/linux
diff options
context:
space:
mode:
Diffstat (limited to 'tools/buildsteps/linux')
-rwxr-xr-xtools/buildsteps/linux/configure-depends9
-rwxr-xr-xtools/buildsteps/linux/configure-xbmc5
-rwxr-xr-xtools/buildsteps/linux/make-binary-addons28
-rwxr-xr-xtools/buildsteps/linux/make-depends9
-rwxr-xr-xtools/buildsteps/linux/make-native-depends9
-rwxr-xr-xtools/buildsteps/linux/make-xbmc5
-rwxr-xr-xtools/buildsteps/linux/package5
-rwxr-xr-xtools/buildsteps/linux/prepare-depends15
-rwxr-xr-xtools/buildsteps/linux/prepare-xbmc9
-rwxr-xr-xtools/buildsteps/linux/run-tests14
10 files changed, 108 insertions, 0 deletions
diff --git a/tools/buildsteps/linux/configure-depends b/tools/buildsteps/linux/configure-depends
new file mode 100755
index 0000000..7046717
--- /dev/null
+++ b/tools/buildsteps/linux/configure-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-toolchain=/usr --prefix=$XBMC_DEPENDS_ROOT --host=$BUILD_HOST --with-rendersystem=$RENDER_SYSTEM --with-tarballs=$TARBALLS $DEBUG_SWITCH
+fi
diff --git a/tools/buildsteps/linux/configure-xbmc b/tools/buildsteps/linux/configure-xbmc
new file mode 100755
index 0000000..92557bf
--- /dev/null
+++ b/tools/buildsteps/linux/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/cmakebuildsys
diff --git a/tools/buildsteps/linux/make-binary-addons b/tools/buildsteps/linux/make-binary-addons
new file mode 100755
index 0000000..1f93c3e
--- /dev/null
+++ b/tools/buildsteps/linux/make-binary-addons
@@ -0,0 +1,28 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+. $WORKSPACE/tools/buildsteps/$XBMC_PLATFORM_DIR/make-native-depends
+
+#clear the build failed file
+rm -f $WORKSPACE/cmake/$FAILED_BUILD_FILENAME
+
+ALL_BINARY_ADDONS_BUILT="1"
+#only build binary addons when requested by env/jenkins
+if [ "$BUILD_BINARY_ADDONS" == "true" ]
+then
+ for addon in $BINARY_ADDONS
+ do
+ echo "building $addon"
+ git clean -xffd $WORKSPACE/$BINARY_ADDONS_ROOT/$addon
+ cd $WORKSPACE/$BINARY_ADDONS_ROOT/$addon;make -j $BUILDTHREADS V=99 VERBOSE=1 || ALL_BINARY_ADDONS_BUILT="0"
+ done
+fi
+
+if [ "$ALL_BINARY_ADDONS_BUILT" == "1" ]
+then
+ tagSuccessFulBuild $WORKSPACE/cmake
+else
+ #mark the build failure in the filesystem but leave jenkins running
+ tagFailedBuild $WORKSPACE/cmake
+fi
diff --git a/tools/buildsteps/linux/make-depends b/tools/buildsteps/linux/make-depends
new file mode 100755
index 0000000..224d4e5
--- /dev/null
+++ b/tools/buildsteps/linux/make-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS || make && tagSuccessFulBuild $WORKSPACE/tools/depends
+fi
+
diff --git a/tools/buildsteps/linux/make-native-depends b/tools/buildsteps/linux/make-native-depends
new file mode 100755
index 0000000..5ac21af
--- /dev/null
+++ b/tools/buildsteps/linux/make-native-depends
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ] && [ "$BINARY_ADDONS_CLEAN_NATIVETOOLS" != "0" ]
+then
+ git clean -xffd $WORKSPACE/tools/depends/native
+ cd $WORKSPACE/tools/depends/native;make -j $BUILDTHREADS && tagSuccessFulBuild $WORKSPACE/tools/depends
+fi
diff --git a/tools/buildsteps/linux/make-xbmc b/tools/buildsteps/linux/make-xbmc
new file mode 100755
index 0000000..534b578
--- /dev/null
+++ b/tools/buildsteps/linux/make-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/build;make -j$BUILDTHREADS || make
diff --git a/tools/buildsteps/linux/package b/tools/buildsteps/linux/package
new file mode 100755
index 0000000..09da07b
--- /dev/null
+++ b/tools/buildsteps/linux/package
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing for linux atm
diff --git a/tools/buildsteps/linux/prepare-depends b/tools/buildsteps/linux/prepare-depends
new file mode 100755
index 0000000..ec5219a
--- /dev/null
+++ b/tools/buildsteps/linux/prepare-depends
@@ -0,0 +1,15 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#clean without depends for skipping depends build if possible
+#also skip binary addons (pvr, audioencoder) as long as they are deployed in tree
+cd $WORKSPACE;git clean -xfd -e "cmake/.last_success_revision" -e "tools/depends" ${DEPLOYED_BINARY_ADDONS}
+
+# if depends path has changed - cleanout everything and do a full rebuild
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ #clean up the rest too
+ cd $WORKSPACE;git clean -xffd
+ cd $WORKSPACE/tools/depends/;./bootstrap
+fi
diff --git a/tools/buildsteps/linux/prepare-xbmc b/tools/buildsteps/linux/prepare-xbmc
new file mode 100755
index 0000000..84a96e5
--- /dev/null
+++ b/tools/buildsteps/linux/prepare-xbmc
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#build binary addons before building xbmc...
+#make sure that binary_addons don't clean the native tools
+#here
+BINARY_ADDONS_CLEAN_NATIVETOOLS="0"
+. $WORKSPACE/tools/buildsteps/$XBMC_PLATFORM_DIR/make-binary-addons
diff --git a/tools/buildsteps/linux/run-tests b/tools/buildsteps/linux/run-tests
new file mode 100755
index 0000000..f11d5f1
--- /dev/null
+++ b/tools/buildsteps/linux/run-tests
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=linux
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/build;make -j$BUILDTHREADS kodi-test
+if [ "$Configuration" != "Coverage" ]; then
+ cd $WORKSPACE;build/kodi-test --gtest_output=xml:gtestresults.xml
+else
+ cd $WORKSPACE/build;GTEST_OUTPUT="xml:$WORKSPACE/gtestresults.xml" make coverage
+fi
+
+awk '{ if ($1 == "<testcase" && match($0, "notrun")) print substr($0,0,length($0)-2) "><skipped/></testcase>"; else print $0;}' gtestresults.xml > gtestresults-skipped.xml
+rm gtestresults.xml
+mv gtestresults-skipped.xml gtestresults.xml