citra-emu
/
citra-canary
Archived
1
0
Fork 0

Merge pull request #3649 from liushuyu/ci-cache

travis: use ccache to speed up build
This commit is contained in:
Weiyi Wang 2018-04-15 14:24:10 +03:00 committed by GitHub
commit 17e14d5615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 13 additions and 9 deletions

View File

@ -25,6 +25,7 @@ matrix:
install: "./.travis/linux/deps.sh" install: "./.travis/linux/deps.sh"
script: "./.travis/linux/build.sh" script: "./.travis/linux/build.sh"
after_success: "./.travis/linux/upload.sh" after_success: "./.travis/linux/upload.sh"
cache: ccache
- if: branch = master AND type = push - if: branch = master AND type = push
os: linux os: linux
env: NAME="transifex push" env: NAME="transifex push"
@ -40,11 +41,13 @@ matrix:
install: "./.travis/macos/deps.sh" install: "./.travis/macos/deps.sh"
script: "./.travis/macos/build.sh" script: "./.travis/macos/build.sh"
after_success: "./.travis/macos/upload.sh" after_success: "./.travis/macos/upload.sh"
cache: ccache
- os: linux - os: linux
env: NAME="linux build (frozen versions of dependencies)" env: NAME="linux build (frozen versions of dependencies)"
sudo: required sudo: required
dist: trusty dist: trusty
services: docker services: docker
cache: ccache
script: "./.travis/linux-frozen/build.sh" script: "./.travis/linux-frozen/build.sh"
deploy: deploy:

View File

@ -1,4 +1,4 @@
#!/bin/bash -ex #!/bin/bash -ex
mkdir -p "$HOME/.ccache"
docker pull ubuntu:18.04 docker pull ubuntu:18.04
docker run -e ENABLE_COMPATIBILITY_REPORTING -v $(pwd):/citra ubuntu:18.04 /bin/bash -ex /citra/.travis/linux-frozen/docker.sh docker run -e ENABLE_COMPATIBILITY_REPORTING -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache ubuntu:18.04 /bin/bash -ex /citra/.travis/linux-frozen/docker.sh

View File

@ -3,7 +3,7 @@
cd /citra cd /citra
apt-get update apt-get update
apt-get install -y build-essential wget git python-launchpadlib apt-get install -y build-essential wget git python-launchpadlib ccache
# Install specific versions of packages with their dependencies # Install specific versions of packages with their dependencies
# The apt repositories remove older versions regularly, so we can't use # The apt repositories remove older versions regularly, so we can't use
@ -20,7 +20,7 @@ echo y | sh cmake-3.10.1-Linux-x86_64.sh --prefix=cmake
export PATH=/citra/cmake/cmake-3.10.1-Linux-x86_64/bin:$PATH export PATH=/citra/cmake/cmake-3.10.1-Linux-x86_64/bin:$PATH
mkdir build && cd build mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"}
make -j4 make -j4
ctest -VV -C Release ctest -VV -C Release

View File

@ -1,3 +1,3 @@
#!/bin/bash -ex #!/bin/bash -ex
mkdir -p "$HOME/.ccache"
docker run -e ENABLE_COMPATIBILITY_REPORTING -v $(pwd):/citra ubuntu:18.04 /bin/bash -ex /citra/.travis/linux/docker.sh docker run -e ENABLE_COMPATIBILITY_REPORTING -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache ubuntu:18.04 /bin/bash -ex /citra/.travis/linux/docker.sh

View File

@ -3,7 +3,7 @@
cd /citra cd /citra
apt-get update apt-get update
apt-get install -y build-essential libsdl2-dev qtbase5-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools wget git apt-get install -y build-essential libsdl2-dev qtbase5-dev libqt5opengl5-dev qttools5-dev qttools5-dev-tools wget git ccache
# Get a recent version of CMake # Get a recent version of CMake
wget https://cmake.org/files/v3.10/cmake-3.10.1-Linux-x86_64.sh wget https://cmake.org/files/v3.10/cmake-3.10.1-Linux-x86_64.sh
@ -11,7 +11,7 @@ echo y | sh cmake-3.10.1-Linux-x86_64.sh --prefix=cmake
export PATH=/citra/cmake/cmake-3.10.1-Linux-x86_64/bin:$PATH export PATH=/citra/cmake/cmake-3.10.1-Linux-x86_64/bin:$PATH
mkdir build && cd build mkdir build && cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"}
make -j4 make -j4
ctest -VV -C Release ctest -VV -C Release

View File

@ -4,6 +4,7 @@ set -o pipefail
export MACOSX_DEPLOYMENT_TARGET=10.12 export MACOSX_DEPLOYMENT_TARGET=10.12
export Qt5_DIR=$(brew --prefix)/opt/qt5 export Qt5_DIR=$(brew --prefix)/opt/qt5
export PATH="/usr/local/opt/ccache/libexec:$PATH"
mkdir build && cd build mkdir build && cd build
cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;x86_64h" -DCMAKE_BUILD_TYPE=Release -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"}

View File

@ -1,4 +1,4 @@
#!/bin/sh -ex #!/bin/sh -ex
brew update brew update
brew install qt5 sdl2 dylibbundler p7zip brew install qt5 sdl2 dylibbundler p7zip ccache