From 3a7b4a7b58c265534bafdab8558aa0ba7e9ea1d0 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 11 Jan 2017 21:50:45 +0000 Subject: [PATCH] Travis changes for Xonotic: - Do not require root any more. - Change the i386 build to build on Ubuntu directly, not in a chroot created using debootstrap. - Remove the -isysroot option for OS X as the path broke after some Travis change. git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12321 d7cf8633-e32d-0410-b094-e92efae38249 --- .travis-before_install-xonotic.sh | 34 +++++++++---------------------- .travis-script-xonotic.sh | 22 ++++++++++++-------- .travis.yml | 24 ++++++++++++++++++++++ 3 files changed, 47 insertions(+), 33 deletions(-) diff --git a/.travis-before_install-xonotic.sh b/.travis-before_install-xonotic.sh index 5ed56f85..5b03c090 100755 --- a/.travis-before_install-xonotic.sh +++ b/.travis-before_install-xonotic.sh @@ -2,9 +2,8 @@ set -ex -if [ "`uname`" = 'Linux' ]; then - sudo apt-get update -qq -fi +export USRLOCAL="$PWD"/usrlocal +mkdir "$USRLOCAL" for os in "$@"; do git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \ @@ -12,50 +11,37 @@ 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.4.tar.gz tar xf SDL2-2.0.4.tar.gz ( cd SDL2-2.0.4 - 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 + export CC="gcc -m32" + i386 ./configure --enable-static --disable-shared --prefix="$USRLOCAL" || cat config.log + i386 make + i386 make install ) ;; linux64) - sudo apt-get install -y \ - libxpm-dev libsdl1.2-dev libxxf86vm-dev wget https://www.libsdl.org/release/SDL2-2.0.4.tar.gz tar xf SDL2-2.0.4.tar.gz ( cd SDL2-2.0.4 - ./configure --enable-static --disable-shared + ./configure --enable-static --disable-shared --prefix="$USRLOCAL" make - sudo make install + make install ) ;; win32) git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \ --prefix=".icons/" master:"misc/logos/icons_ico" | tar xvf - mv .icons/xonotic.ico darkplaces.ico - wget -qO- http://beta.xonotic.org/win-builds.org/cross_toolchain_32.tar.xz | sudo tar xaJvf - -C/ opt/cross_toolchain_32 + wget -qO- http://beta.xonotic.org/win-builds.org/cross_toolchain_32.tar.xz | tar xaJvf - -C"$USRLOCAL" opt/cross_toolchain_32 ;; win64) git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \ --prefix=".icons/" master:"misc/logos/icons_ico" | tar xvf - mv .icons/xonotic.ico darkplaces.ico - wget -qO- http://beta.xonotic.org/win-builds.org/cross_toolchain_64.tar.xz | sudo tar xvJf - -C/ opt/cross_toolchain_64 + wget -qO- http://beta.xonotic.org/win-builds.org/cross_toolchain_64.tar.xz | tar xvJf - -C"$USRLOCAL" opt/cross_toolchain_64 ;; osx) git archive --format=tar --remote=git://de.git.xonotic.org/xonotic/xonotic.git \ diff --git a/.travis-script-xonotic.sh b/.travis-script-xonotic.sh index c8e2b8b1..9b77373c 100755 --- a/.travis-script-xonotic.sh +++ b/.travis-script-xonotic.sh @@ -9,6 +9,8 @@ set -x chmod 0600 id_rsa-xonotic # ssh-keygen -y -f id_rsa-xonotic +export USRLOCAL="$PWD"/usrlocal + rev=`git rev-parse HEAD` sftp -oStrictHostKeyChecking=no -i id_rsa-xonotic -P 2222 -b - autobuild-bin-uploader@beta.xonotic.org <