From: divverent Date: Wed, 27 Aug 2014 12:46:22 +0000 (+0000) Subject: Add Travis-CI integration for Xonotic. X-Git-Tag: xonotic-v0.8.0~45 X-Git-Url: https://git.xonotic.org/?a=commitdiff_plain;h=b362752c7bf71c326ae6e8407030a98afd0df2a6;p=xonotic%2Fdarkplaces.git Add Travis-CI integration for Xonotic. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12091 d7cf8633-e32d-0410-b094-e92efae38249 ::stable-branch::merge=d2e14a4b7c95b0cd90fe509c2127e9fd0ce65eee --- diff --git a/.travis-before_install-xonotic.sh b/.travis-before_install-xonotic.sh new file mode 100755 index 00000000..adb87e90 --- /dev/null +++ b/.travis-before_install-xonotic.sh @@ -0,0 +1,64 @@ +#!/bin/sh + +set -ex + +if [ "`uname`" = 'Linux' ]; then + sudo apt-get update -qq +fi + +for os in "$@"; do + case "$os" in + linux32) + # Prepare an i386 chroot. This is required as we otherwise can't install + # our dependencies to be able to compile a 32bit binary. Ubuntu... + chroot="$PWD"/buildroot.i386 + mkdir -p "$chroot$PWD" + sudo apt-get install -y debootstrap + sudo i386 debootstrap --arch=i386 precise "$chroot" + sudo mount --rbind "$PWD" "$chroot$PWD" + sudo i386 chroot "$chroot" apt-get install -y \ + build-essential + # Now install our dependencies. + sudo i386 chroot "$chroot" apt-get install -y \ + libxpm-dev libsdl1.2-dev libxxf86vm-dev + wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz + tar xf SDL2-2.0.3.tar.gz + ( + cd SDL2-2.0.3 + sudo i386 chroot "$chroot" sh -c "cd $PWD && ./configure --enable-static --disable-shared" + sudo i386 chroot "$chroot" make -C "$PWD" + sudo i386 chroot "$chroot" make -C "$PWD" install + ) + ;; + linux64) + sudo apt-get install -y \ + libxpm-dev libsdl1.2-dev libxxf86vm-dev + wget https://www.libsdl.org/release/SDL2-2.0.3.tar.gz + tar xf SDL2-2.0.3.tar.gz + ( + cd SDL2-2.0.3 + ./configure --enable-static --disable-shared + make + sudo make install + ) + ;; + win32) + sudo apt-get install -y \ + mingw-w64 mingw32- mingw32-binutils- + ;; + win64) + sudo apt-get install -y \ + mingw-w64 mingw32- mingw32-binutils- + ;; + osx) + git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \ + --prefix=SDL.framework/ master:misc/buildfiles/osx/Xonotic.app/Contents/Frameworks/SDL.framework | tar xvf - + ;; + esac +done + +git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \ + --prefix=.deps/ master:misc/builddeps | tar xvf - +for X in .deps/*; do + rsync --remove-source-files -aL "$X"/*/ "$X"/ || true +done diff --git a/.travis-id_rsa-xonotic b/.travis-id_rsa-xonotic new file mode 100644 index 00000000..c8446b58 Binary files /dev/null and b/.travis-id_rsa-xonotic differ diff --git a/.travis-script-xonotic.sh b/.travis-script-xonotic.sh new file mode 100755 index 00000000..a8a19b97 --- /dev/null +++ b/.travis-script-xonotic.sh @@ -0,0 +1,65 @@ +#!/bin/sh + +set -ex + +openssl aes-256-cbc \ + -K $encrypted_08aaf016324d_key -iv $encrypted_08aaf016324d_iv \ + -in .travis-id_rsa-xonotic -out id_rsa-xonotic -d +chmod 0600 id_rsa-xonotic +ssh-keygen -y -f id_rsa-xonotic + +rev=`git rev-parse HEAD` + +sftp -oStrictHostKeyChecking=no -i id_rsa-xonotic -P 2222 -b - autobuild-bin-uploader@beta.xonotic.org <