Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[atv2/ios/osx] - add buildsteps for usage with jenkins

  • Loading branch information...
commit c48cae66e84209953e38c039562e3383e3d23bd5 1 parent 9bb5650
@Memphiz Memphiz authored
Showing with 328 additions and 0 deletions.
  1. +9 −0 tools/buildsteps/README
  2. +13 −0 tools/buildsteps/atv2/configure-depends
  3. +5 −0 tools/buildsteps/atv2/configure-xbmc
  4. +8 −0 tools/buildsteps/atv2/make-depends
  5. +8 −0 tools/buildsteps/atv2/make-xbmc
  6. +9 −0 tools/buildsteps/atv2/package
  7. +14 −0 tools/buildsteps/atv2/prepare-depends
  8. +6 −0 tools/buildsteps/atv2/prepare-xbmc
  9. +80 −0 tools/buildsteps/defaultenv
  10. +12 −0 tools/buildsteps/ios/configure-depends
  11. +5 −0 tools/buildsteps/ios/configure-xbmc
  12. +8 −0 tools/buildsteps/ios/make-depends
  13. +9 −0 tools/buildsteps/ios/make-xbmc
  14. +9 −0 tools/buildsteps/ios/package
  15. +13 −0 tools/buildsteps/ios/prepare-depends
  16. +6 −0 tools/buildsteps/ios/prepare-xbmc
  17. +12 −0 tools/buildsteps/osx32/configure-depends
  18. +5 −0 tools/buildsteps/osx32/configure-xbmc
  19. +8 −0 tools/buildsteps/osx32/make-depends
  20. +8 −0 tools/buildsteps/osx32/make-xbmc
  21. +6 −0 tools/buildsteps/osx32/package
  22. +13 −0 tools/buildsteps/osx32/prepare-depends
  23. +5 −0 tools/buildsteps/osx32/prepare-xbmc
  24. +12 −0 tools/buildsteps/osx64/configure-depends
  25. +5 −0 tools/buildsteps/osx64/configure-xbmc
  26. +8 −0 tools/buildsteps/osx64/make-depends
  27. +8 −0 tools/buildsteps/osx64/make-xbmc
  28. +6 −0 tools/buildsteps/osx64/package
  29. +13 −0 tools/buildsteps/osx64/prepare-depends
  30. +5 −0 tools/buildsteps/osx64/prepare-xbmc
View
9 tools/buildsteps/README
@@ -0,0 +1,9 @@
+This folder holds all the platform dependend build scripts which are called from the jenkins buildserver.
+
+The following ENV variables are available on all scripts:
+
+$WORKSPACE - the folder where jenkins checked out the source - XBMC_HOME so to say
+$Configuration - its either Debug, Release or Default and should be taken into account if possible (Defaults select platform default from <platformdir>/startbuild)
+$SDK_VERSION - the requested SDK_VERSION to be used for building. If "Default" is passed it uses the platform default from <platformdir>/startbuild
+$BUILDTHREADS - number of threads which can be used when building (e.x. use it for make -j$BUILDTHREADS)
+$XBMC_DEPENDS_ROOT - root for installing the xbmc build depends and toolchain helpers. If "Default" is passed it uses the platform default from <platformdir>/startbuild
View
13 tools/buildsteps/atv2/configure-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=arm-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
+
View
5 tools/buildsteps/atv2/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
View
8 tools/buildsteps/atv2/make-depends
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && git rev-list HEAD --max-count=1 -- . > $PATH_CHANGE_REV_FILENAME
+fi
View
8 tools/buildsteps/atv2/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+cd $WORKSPACE;xcodebuild -project XBMC-ATV2.xcodeproj -target XBMC -configuration $Configuration build \
+ ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
+ SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT
View
9 tools/buildsteps/atv2/package
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#ensure that dpkg tools are used from our toolchain
+export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-atv2/;./mkdeb-xbmc-atv2.sh $Configuration
+
View
14 tools/buildsteps/atv2/prepare-depends
@@ -0,0 +1,14 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $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
+
View
6 tools/buildsteps/atv2/prepare-xbmc
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=atv2
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on ios
+
View
80 tools/buildsteps/defaultenv
@@ -0,0 +1,80 @@
+BUILDTHREADS=${BUILDTHREADS:-1}
+SDK_VERSION=${SDK_VERSION:-"Default"}
+Configuration=${Configuration:-"Default"}
+XBMC_DEPENDS_ROOT=${XBMC_DEPENDS_ROOT:-"Default"}
+PATH_CHANGE_REV_FILENAME=".last_success_revision"
+
+#set platform defaults
+#$XBMC_PLATFORM_DIR matches the platform subdirs!
+case $XBMC_PLATFORM_DIR in
+ atv2)
+ DEFAULT_SDK_VERSION=4.3
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ ios)
+ DEFAULT_SDK_VERSION=4.3
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ osx32)
+ DEFAULT_SDK_VERSION=10.6
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+
+ osx64)
+ DEFAULT_SDK_VERSION=10.6
+ DEFAULT_XBMC_DEPENDS_ROOT=$WORKSPACE/tools/depends/xbmc-depends
+ DEFAULT_CONFIGURATION="Debug"
+ ;;
+esac
+
+if [ $SDK_VERSION == "Default" ]
+then
+ SDK_VERSION=$DEFAULT_SDK_VERSION
+fi
+
+if [ $XBMC_DEPENDS_ROOT == "Default" ]
+then
+ XBMC_DEPENDS_ROOT=$DEFAULT_XBMC_DEPENDS_ROOT
+fi
+
+if [ $Configuration == "Default" ]
+then
+ Configuration=$DEFAULT_CONFIGURATION
+fi
+
+#clamp release builds to 1 thread only
+if [ $Configuration == "Release" ]
+then
+ BUILDTHREADS=1
+fi
+
+#helper function
+function pathChanged ()
+{
+ local ret="0"
+ #no optims in release builds!
+ if [ $Configuration == "Release" ]
+ then
+ echo "1"
+ return
+ fi
+
+ checkPath="$1"
+ if [ -e $checkPath/$PATH_CHANGE_REV_FILENAME ]
+ then
+ if [ "$(cat $checkPath/$PATH_CHANGE_REV_FILENAME)" != "$(git rev-list HEAD --max-count=1 -- $checkPath)" ]
+ then
+ ret="1"
+ fi
+ else
+ ret="1"
+ fi
+
+ echo $ret
+}
+
View
12 tools/buildsteps/ios/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=arm-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
View
5 tools/buildsteps/ios/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
View
8 tools/buildsteps/ios/make-depends
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && git rev-list HEAD --max-count=1 -- . > $PATH_CHANGE_REV_FILENAME
+fi
View
9 tools/buildsteps/ios/make-xbmc
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+cd $WORKSPACE;xcodebuild -project XBMC-IOS.xcodeproj -target XBMC -configuration $Configuration build \
+ ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
+ SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT
+
View
9 tools/buildsteps/ios/package
@@ -0,0 +1,9 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#ensure that dpkg tools are used from our toolchain
+export PATH=$XBMC_DEPENDS_ROOT/buildtools-native/bin/:$PATH
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-ios/;./mkdeb-xbmc-ios.sh $Configuration
+
View
13 tools/buildsteps/ios/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $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
View
6 tools/buildsteps/ios/prepare-xbmc
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=ios
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on ios
+
View
12 tools/buildsteps/osx32/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=i386-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
View
5 tools/buildsteps/osx32/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
View
8 tools/buildsteps/osx32/make-depends
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && git rev-list HEAD --max-count=1 -- . > $PATH_CHANGE_REV_FILENAME
+fi
View
8 tools/buildsteps/osx32/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+
+cd $WORKSPACE;xcodebuild -sdk macosx$SDK_VERSION -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
+ ARCHS=i386 VALID_ARCHS=i386 XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT -configuration $Configuration build
View
6 tools/buildsteps/osx32/package
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+
View
13 tools/buildsteps/osx32/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $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
View
5 tools/buildsteps/osx32/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx32
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on osx
View
12 tools/buildsteps/osx64/configure-depends
@@ -0,0 +1,12 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;./configure \
+ --with-tarballs=/Users/Shared/xbmc-depends/tarballs \
+ --host=x86_64-apple-darwin \
+ --with-sdk=$SDK_VERSION \
+ --prefix=$XBMC_DEPENDS_ROOT
+fi
View
5 tools/buildsteps/osx64/configure-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+make -C $WORKSPACE/tools/depends/target/xbmc
View
8 tools/buildsteps/osx64/make-depends
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+if [ "$(pathChanged $WORKSPACE/tools/depends)" == "1" ]
+then
+ cd $WORKSPACE/tools/depends;make -j $BUILDTHREADS && git rev-list HEAD --max-count=1 -- . > $PATH_CHANGE_REV_FILENAME
+fi
View
8 tools/buildsteps/osx64/make-xbmc
@@ -0,0 +1,8 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
+
+cd $WORKSPACE;xcodebuild -sdk macosx$SDK_VERSION -project XBMC.xcodeproj -target XBMC.app ONLY_ACTIVE_ARCH=YES \
+ ARCHS=x86_64 VALID_ARCHS=x86_64 XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT -configuration $Configuration build
View
6 tools/buildsteps/osx64/package
@@ -0,0 +1,6 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+cd $WORKSPACE/tools/darwin/packaging/xbmc-osx/;./mkdmg-xbmc-osx.sh $Configuration
+
View
13 tools/buildsteps/osx64/prepare-depends
@@ -0,0 +1,13 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $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
View
5 tools/buildsteps/osx64/prepare-xbmc
@@ -0,0 +1,5 @@
+WORKSPACE=${WORKSPACE:-$( cd $(dirname $0)/../../.. ; pwd -P )}
+XBMC_PLATFORM_DIR=osx64
+. $WORKSPACE/tools/buildsteps/defaultenv
+
+#nothing on osx
Please sign in to comment.
Something went wrong with that request. Please try again.