summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar James Rowe2017-08-11 08:39:14 -0600
committerGravatar GitHub2017-08-11 08:39:14 -0600
commit8fd28244e4bf14a2c5329dee58f2765ac39d55e7 (patch)
treec14dc96e7e972409cad8e3190474d79ba46a0aa5
parentMerge pull request #2867 from j-selby/tag-naming (diff)
parentTravis: Use Docker to build for Linux (diff)
downloadyuzu-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.sh20
-rwxr-xr-x.travis-build.sh10
-rwxr-xr-x.travis-deps.sh30
-rw-r--r--.travis.yml16
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
3set -e
4set -x
5
6cd /citra
7
8apt-get update
9apt-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
12wget https://cmake.org/files/v3.9/cmake-3.9.0-Linux-x86_64.sh
13echo y | sh cmake-3.9.0-Linux-x86_64.sh --prefix=cmake
14export PATH=/citra/cmake/cmake-3.9.0-Linux-x86_64/bin:$PATH
15
16mkdir build && cd build
17cmake .. -DCMAKE_BUILD_TYPE=Release
18make -j4
19
20ctest -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
46if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then 46if [ "$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
56elif [ "$TRAVIS_OS_NAME" = "osx" ]; then 48elif [ "$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
7if [ "$TRAVIS_OS_NAME" = "linux" -o -z "$TRAVIS_OS_NAME" ]; then 7if [ "$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
37elif [ "$TRAVIS_OS_NAME" = "osx" ]; then 9elif [ "$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
11services:
12 - docker
13
11addons: 14addons:
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
24cache:
25 directories:
26 - "$HOME/.local"
27
28install: "./.travis-deps.sh" 20install: "./.travis-deps.sh"
29script: "./.travis-build.sh" 21script: "./.travis-build.sh"
30after_success: "./.travis-upload.sh" 22after_success: "./.travis-upload.sh"