diff options
| author | 2018-06-08 18:51:59 -0400 | |
|---|---|---|
| committer | 2018-06-08 18:51:59 -0400 | |
| commit | 83517cb53a61a36ed66f6f0cb5f787b507421066 (patch) | |
| tree | 87ff9eeed34d528bd53179f6c9b6807b4f709b36 | |
| parent | Merge pull request #533 from mailwl/array-to-buffer (diff) | |
| parent | Cache ccache on Travis (diff) | |
| download | yuzu-83517cb53a61a36ed66f6f0cb5f787b507421066.tar.gz yuzu-83517cb53a61a36ed66f6f0cb5f787b507421066.tar.xz yuzu-83517cb53a61a36ed66f6f0cb5f787b507421066.zip | |
Merge pull request #505 from janisozaur/ccache-travis
Enable ccache usage on Travis
Diffstat (limited to '')
| -rw-r--r-- | .travis.yml | 4 | ||||
| -rwxr-xr-x | .travis/linux/build.sh | 2 | ||||
| -rwxr-xr-x | .travis/linux/docker.sh | 12 | ||||
| -rwxr-xr-x | .travis/macos/build.sh | 4 | ||||
| -rwxr-xr-x | .travis/macos/deps.sh | 2 |
5 files changed, 17 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index 6740ea2cf..c225d4a2c 100644 --- a/.travis.yml +++ b/.travis.yml | |||
| @@ -42,3 +42,7 @@ notifications: | |||
| 42 | webhooks: | 42 | webhooks: |
| 43 | urls: | 43 | urls: |
| 44 | - https://api.yuzu-emu.org/code/travis/notify | 44 | - https://api.yuzu-emu.org/code/travis/notify |
| 45 | |||
| 46 | cache: | ||
| 47 | directories: | ||
| 48 | - $HOME/.ccache | ||
diff --git a/.travis/linux/build.sh b/.travis/linux/build.sh index bea898171..213feb25b 100755 --- a/.travis/linux/build.sh +++ b/.travis/linux/build.sh | |||
| @@ -1,3 +1,3 @@ | |||
| 1 | #!/bin/bash -ex | 1 | #!/bin/bash -ex |
| 2 | 2 | ||
| 3 | docker run -v $(pwd):/yuzu ubuntu:18.04 /bin/bash /yuzu/.travis/linux/docker.sh | 3 | docker run -e CCACHE_DIR=/ccache -v $HOME/.ccache:/ccache -v $(pwd):/yuzu ubuntu:18.04 /bin/bash /yuzu/.travis/linux/docker.sh |
diff --git a/.travis/linux/docker.sh b/.travis/linux/docker.sh index bc541216c..376ad28dd 100755 --- a/.travis/linux/docker.sh +++ b/.travis/linux/docker.sh | |||
| @@ -1,16 +1,18 @@ | |||
| 1 | #!/bin/bash -ex | 1 | #!/bin/bash -ex |
| 2 | 2 | ||
| 3 | apt-get update | 3 | apt-get update |
| 4 | apt-get install -y build-essential git libqt5opengl5-dev libsdl2-dev libssl-dev python qtbase5-dev wget ninja-build | 4 | apt-get install --no-install-recommends -y build-essential git libqt5opengl5-dev libsdl2-dev libssl-dev python qtbase5-dev wget cmake ninja-build ccache |
| 5 | |||
| 6 | # Get a recent version of CMake | ||
| 7 | wget https://cmake.org/files/v3.10/cmake-3.10.1-Linux-x86_64.sh | ||
| 8 | sh cmake-3.10.1-Linux-x86_64.sh --exclude-subdir --prefix=/ --skip-license | ||
| 9 | 5 | ||
| 10 | cd /yuzu | 6 | cd /yuzu |
| 11 | 7 | ||
| 8 | export PATH=/usr/lib/ccache:$PATH | ||
| 9 | ln -sf /usr/bin/ccache /usr/lib/ccache/cc | ||
| 10 | ln -sf /usr/bin/ccache /usr/lib/ccache/c++ | ||
| 12 | mkdir build && cd build | 11 | mkdir build && cd build |
| 12 | ccache --show-stats > ccache_before | ||
| 13 | cmake .. -DYUZU_BUILD_UNICORN=ON -DCMAKE_BUILD_TYPE=Release -G Ninja | 13 | cmake .. -DYUZU_BUILD_UNICORN=ON -DCMAKE_BUILD_TYPE=Release -G Ninja |
| 14 | ninja | 14 | ninja |
| 15 | ccache --show-stats > ccache_after | ||
| 16 | diff -U100 ccache_before ccache_after || true | ||
| 15 | 17 | ||
| 16 | ctest -VV -C Release | 18 | ctest -VV -C Release |
diff --git a/.travis/macos/build.sh b/.travis/macos/build.sh index f633f618f..5816b1d6e 100755 --- a/.travis/macos/build.sh +++ b/.travis/macos/build.sh | |||
| @@ -7,8 +7,12 @@ export Qt5_DIR=$(brew --prefix)/opt/qt5 | |||
| 7 | export UNICORNDIR=$(pwd)/externals/unicorn | 7 | export UNICORNDIR=$(pwd)/externals/unicorn |
| 8 | 8 | ||
| 9 | mkdir build && cd build | 9 | mkdir build && cd build |
| 10 | export PATH=/usr/local/opt/ccache/libexec:$PATH | ||
| 11 | ccache --show-stats > ccache_before | ||
| 10 | cmake --version | 12 | cmake --version |
| 11 | cmake .. -DYUZU_BUILD_UNICORN=ON -DCMAKE_BUILD_TYPE=Release | 13 | cmake .. -DYUZU_BUILD_UNICORN=ON -DCMAKE_BUILD_TYPE=Release |
| 12 | make -j4 | 14 | make -j4 |
| 15 | ccache --show-stats > ccache_after | ||
| 16 | diff -U100 ccache_before ccache_after || true | ||
| 13 | 17 | ||
| 14 | ctest -VV -C Release | 18 | ctest -VV -C Release |
diff --git a/.travis/macos/deps.sh b/.travis/macos/deps.sh index 3cd13a39b..1a547c060 100755 --- a/.travis/macos/deps.sh +++ b/.travis/macos/deps.sh | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | #!/bin/sh -ex | 1 | #!/bin/sh -ex |
| 2 | 2 | ||
| 3 | brew update | 3 | brew update |
| 4 | brew install dylibbundler p7zip qt5 sdl2 | 4 | brew install dylibbundler p7zip qt5 sdl2 ccache |
| 5 | brew outdated cmake || brew upgrade cmake | 5 | brew outdated cmake || brew upgrade cmake |