diff options
| author | 2017-08-11 08:39:14 -0600 | |
|---|---|---|
| committer | 2017-08-11 08:39:14 -0600 | |
| commit | 8fd28244e4bf14a2c5329dee58f2765ac39d55e7 (patch) | |
| tree | c14dc96e7e972409cad8e3190474d79ba46a0aa5 | |
| parent | Merge pull request #2867 from j-selby/tag-naming (diff) | |
| parent | Travis: Use Docker to build for Linux (diff) | |
| download | yuzu-8fd28244e4bf14a2c5329dee58f2765ac39d55e7.tar.gz yuzu-8fd28244e4bf14a2c5329dee58f2765ac39d55e7.tar.xz yuzu-8fd28244e4bf14a2c5329dee58f2765ac39d55e7.zip | |
Merge pull request #2869 from j-selby/docker-build
Travis: Use Docker to build for Linux
| -rw-r--r-- | .travis-build-docker.sh | 20 | ||||
| -rwxr-xr-x | .travis-build.sh | 10 | ||||
| -rwxr-xr-x | .travis-deps.sh | 30 | ||||
| -rw-r--r-- | .travis.yml | 16 |
4 files changed, 26 insertions, 50 deletions
diff --git a/.travis-build-docker.sh b/.travis-build-docker.sh new file mode 100644 index 000000000..ca6fae42b --- /dev/null +++ b/.travis-build-docker.sh | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | set -e | ||
| 4 | set -x | ||
| 5 | |||
| 6 | cd /citra | ||
| 7 | |||
| 8 | apt-get update | ||
| 9 | apt-get install -y build-essential libsdl2-dev qtbase5-dev libqt5opengl5-dev libcurl4-openssl-dev libssl-dev wget git | ||
| 10 | |||
| 11 | # Get a recent version of CMake | ||
| 12 | wget https://cmake.org/files/v3.9/cmake-3.9.0-Linux-x86_64.sh | ||
| 13 | echo y | sh cmake-3.9.0-Linux-x86_64.sh --prefix=cmake | ||
| 14 | export PATH=/citra/cmake/cmake-3.9.0-Linux-x86_64/bin:$PATH | ||
| 15 | |||
| 16 | mkdir build && cd build | ||
| 17 | cmake .. -DCMAKE_BUILD_TYPE=Release | ||
| 18 | make -j4 | ||
| 19 | |||
| 20 | ctest -VV -C Release | ||
diff --git a/.travis-build.sh b/.travis-build.sh index df6e236b6..64f5aed94 100755 --- a/.travis-build.sh +++ b/.travis-build.sh | |||
| @@ -44,15 +44,7 @@ fi | |||
| 44 | 44 | ||
| 45 | #if OS is linux or is not set | 45 | #if OS is linux or is not set |
| 46 | if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then | 46 | if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then |
| 47 | export CC=gcc-6 | 47 | docker run -v $(pwd):/citra ubuntu:16.04 /bin/bash /citra/.travis-build-docker.sh |
| 48 | export CXX=g++-6 | ||
| 49 | export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:$PKG_CONFIG_PATH | ||
| 50 | |||
| 51 | mkdir build && cd build | ||
| 52 | cmake .. | ||
| 53 | make -j4 | ||
| 54 | |||
| 55 | ctest -VV -C Release | ||
| 56 | elif [ "$TRAVIS_OS_NAME" = "osx" ]; then | 48 | elif [ "$TRAVIS_OS_NAME" = "osx" ]; then |
| 57 | set -o pipefail | 49 | set -o pipefail |
| 58 | 50 | ||
diff --git a/.travis-deps.sh b/.travis-deps.sh index 25a287c7f..0cee68041 100755 --- a/.travis-deps.sh +++ b/.travis-deps.sh | |||
| @@ -5,35 +5,7 @@ set -x | |||
| 5 | 5 | ||
| 6 | #if OS is linux or is not set | 6 | #if OS is linux or is not set |
| 7 | if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then | 7 | if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then |
| 8 | export CC=gcc-6 | 8 | docker pull ubuntu:16.04 |
| 9 | export CXX=g++-6 | ||
| 10 | mkdir -p $HOME/.local | ||
| 11 | |||
| 12 | if [ ! -e $HOME/.local/bin/cmake ]; then | ||
| 13 | echo "CMake not found in the cache, get and extract it..." | ||
| 14 | curl -L http://www.cmake.org/files/v3.6/cmake-3.6.3-Linux-x86_64.tar.gz \ | ||
| 15 | | tar -xz -C $HOME/.local --strip-components=1 | ||
| 16 | else | ||
| 17 | echo "Using cached CMake" | ||
| 18 | fi | ||
| 19 | |||
| 20 | if [ ! -e $HOME/.local/lib/libSDL2.la ]; then | ||
| 21 | echo "SDL2 not found in cache, get and build it..." | ||
| 22 | wget http://libsdl.org/release/SDL2-2.0.5.tar.gz -O - | tar xz | ||
| 23 | cd SDL2-2.0.5 | ||
| 24 | ./configure --prefix=$HOME/.local | ||
| 25 | make -j4 && make install | ||
| 26 | else | ||
| 27 | echo "Using cached SDL2" | ||
| 28 | fi | ||
| 29 | |||
| 30 | export DEBIAN_FRONTEND=noninteractive | ||
| 31 | # Amazing placebo security | ||
| 32 | curl http://apt.llvm.org/llvm-snapshot.gpg.key | sudo -E apt-key add - | ||
| 33 | sudo -E add-apt-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | ||
| 34 | sudo -E apt-get -yq update | ||
| 35 | sudo -E apt-get -yq install clang-format-3.9 | ||
| 36 | |||
| 37 | elif [ "$TRAVIS_OS_NAME" = "osx" ]; then | 9 | elif [ "$TRAVIS_OS_NAME" = "osx" ]; then |
| 38 | brew update | 10 | brew update |
| 39 | brew install qt5 sdl2 dylibbundler p7zip | 11 | brew install qt5 sdl2 dylibbundler p7zip |
diff --git a/.travis.yml b/.travis.yml index 3da22eb5d..b92d7f236 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -8,23 +8,15 @@ matrix: | |||
| 8 | sudo: false | 8 | sudo: false |
| 9 | osx_image: xcode7.3 | 9 | osx_image: xcode7.3 |
| 10 | 10 | ||
| 11 | services: | ||
| 12 | - docker | ||
| 13 | |||
| 11 | addons: | 14 | addons: |
| 12 | apt: | 15 | apt: |
| 13 | sources: | ||
| 14 | - ubuntu-toolchain-r-test | ||
| 15 | packages: | 16 | packages: |
| 16 | - gcc-6 | 17 | - clang-format-3.9 |
| 17 | - g++-6 | ||
| 18 | - qt5-default | ||
| 19 | - libqt5opengl5-dev | ||
| 20 | - xorg-dev | ||
| 21 | - lib32stdc++6 # For CMake | ||
| 22 | - p7zip-full | 18 | - p7zip-full |
| 23 | 19 | ||
| 24 | cache: | ||
| 25 | directories: | ||
| 26 | - "$HOME/.local" | ||
| 27 | |||
| 28 | install: "./.travis-deps.sh" | 20 | install: "./.travis-deps.sh" |
| 29 | script: "./.travis-build.sh" | 21 | script: "./.travis-build.sh" |
| 30 | after_success: "./.travis-upload.sh" | 22 | after_success: "./.travis-upload.sh" |