aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRechi <Rechi@users.noreply.github.com>2018-02-12 13:47:56 +0100
committernotspiff <spiff@kodi.tv>2018-02-13 11:17:32 +0100
commitbeb763b13e024cf8997b26d3337f26a078e6b20a (patch)
tree3983ca47ecfdb312991e8af35c5fa03366324fb0 /tools
parent704251134cffe628ec997915113e0ffd42febc66 (diff)
[buildsteps] add freebsd
Diffstat (limited to 'tools')
-rw-r--r--tools/buildsteps/defaultenv4
-rw-r--r--tools/buildsteps/freebsd/configure-depends5
-rw-r--r--tools/buildsteps/freebsd/configure-xbmc8
-rw-r--r--tools/buildsteps/freebsd/make-binary-addons28
-rw-r--r--tools/buildsteps/freebsd/make-depends5
-rw-r--r--tools/buildsteps/freebsd/make-native-depends5
-rw-r--r--tools/buildsteps/freebsd/make-xbmc5
-rw-r--r--tools/buildsteps/freebsd/package5
-rw-r--r--tools/buildsteps/freebsd/prepare-depends8
-rw-r--r--tools/buildsteps/freebsd/prepare-xbmc9
-rw-r--r--tools/buildsteps/freebsd/run-tests14
11 files changed, 96 insertions, 0 deletions
diff --git a/tools/buildsteps/defaultenv b/tools/buildsteps/defaultenv
index d8e2464ead..08eea0bc33 100644
--- a/tools/buildsteps/defaultenv
+++ b/tools/buildsteps/defaultenv
@@ -50,6 +50,10 @@ case $XBMC_PLATFORM_DIR in
DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
DEFAULT_CONFIGURATION="Debug"
;;
+
+ freebsd)
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
esac
if [ "$SDK_VERSION" == "Default" ]
diff --git a/tools/buildsteps/freebsd/configure-depends b/tools/buildsteps/freebsd/configure-depends
new file mode 100644
index 0000000000..d152e7c3cc
--- /dev/null
+++ b/tools/buildsteps/freebsd/configure-depends
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing for freebsd atm
diff --git a/tools/buildsteps/freebsd/configure-xbmc b/tools/buildsteps/freebsd/configure-xbmc
new file mode 100644
index 0000000000..0c069d2742
--- /dev/null
+++ b/tools/buildsteps/freebsd/configure-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+
+mkdir -p $WORKSPACE/build
+cd $WORKSPACE/build
+cmake -DCMAKE_BUILD_TYPE=$Configuration ..
diff --git a/tools/buildsteps/freebsd/make-binary-addons b/tools/buildsteps/freebsd/make-binary-addons
new file mode 100644
index 0000000000..0647693ca7
--- /dev/null
+++ b/tools/buildsteps/freebsd/make-binary-addons
@@ -0,0 +1,28 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $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;gmake -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/freebsd/make-depends b/tools/buildsteps/freebsd/make-depends
new file mode 100644
index 0000000000..d152e7c3cc
--- /dev/null
+++ b/tools/buildsteps/freebsd/make-depends
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing for freebsd atm
diff --git a/tools/buildsteps/freebsd/make-native-depends b/tools/buildsteps/freebsd/make-native-depends
new file mode 100644
index 0000000000..d152e7c3cc
--- /dev/null
+++ b/tools/buildsteps/freebsd/make-native-depends
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing for freebsd atm
diff --git a/tools/buildsteps/freebsd/make-xbmc b/tools/buildsteps/freebsd/make-xbmc
new file mode 100644
index 0000000000..70fadedb2f
--- /dev/null
+++ b/tools/buildsteps/freebsd/make-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/build;gmake -j$BUILDTHREADS || gmake
diff --git a/tools/buildsteps/freebsd/package b/tools/buildsteps/freebsd/package
new file mode 100644
index 0000000000..d152e7c3cc
--- /dev/null
+++ b/tools/buildsteps/freebsd/package
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing for freebsd atm
diff --git a/tools/buildsteps/freebsd/prepare-depends b/tools/buildsteps/freebsd/prepare-depends
new file mode 100644
index 0000000000..7aae09bfe4
--- /dev/null
+++ b/tools/buildsteps/freebsd/prepare-depends
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $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
+#freebsd doesn't use depends atm
+cd $WORKSPACE;git clean -xfd -e "cmake/.last_success_revision" -e "tools/depends" ${DEPLOYED_BINARY_ADDONS}
diff --git a/tools/buildsteps/freebsd/prepare-xbmc b/tools/buildsteps/freebsd/prepare-xbmc
new file mode 100644
index 0000000000..e2dbcf6012
--- /dev/null
+++ b/tools/buildsteps/freebsd/prepare-xbmc
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#build binary addons before building xbmc...
+#make sure that binary_addons don't clean the native tools
+#here (e.x. on release builds where pathChanged always returns 1
+BINARY_ADDONS_CLEAN_NATIVETOOLS="0"
+. $WORKSPACE/tools/buildsteps/$XBMC_PLATFORM_DIR/make-binary-addons
diff --git a/tools/buildsteps/freebsd/run-tests b/tools/buildsteps/freebsd/run-tests
new file mode 100644
index 0000000000..9ee91ce613
--- /dev/null
+++ b/tools/buildsteps/freebsd/run-tests
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=freebsd
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/build;gmake -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" gmake 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